分散トランザクション処理機能 TP1/Connector for .NET Framework 使用の手引

[目次][用語][索引][前へ][次へ]

1.9.2 TP1IntegrationBindingのサービスコントラクトおよびプロキシクラス

TP1IntegrationBindingで使用するサービスコントラクトおよびそのプロキシクラスは,アセンブリ(Hitachi.OpenTP1.ServiceModel.TP1Integration.dll)で提供します。そのため,サービスコントラクトをコーディングし,プロキシクラスを生成する必要はありません。

サービスコントラクトおよびそのプロキシクラスは次の名称で提供しています。

サービスコントラクト
Hitachi.OpenTP1.ServiceModel.TP1Integration.ITP1Rpc
プロキシクラス
Hitachi.OpenTP1.ServiceModel.TP1Integration.TP1RpcClient

TP1IntegrationBindingで提供するサービスコントラクトの内容を次に示します。

<この項の構成>
(1) サービスコントラクト(C#の場合)
(2) サービスコントラクト(Visual Basicの場合)

(1) サービスコントラクト(C#の場合)

 
using System.ServiceModel;
 
namespace Hitachi.OpenTP1.ServiceModel.TP1Integration
{
   [ServiceContract(
     CallbackContract=null,
     ConfigurationName=
        "Hitachi.OpenTP1.ServiceModel.TP1Integration.ITP1Rpc",
     Name="ITP1Rpc",
     ProtectionLevel=System.Net.Security.ProtectionLevel.None,
     SessionMode=SessionMode.NotAllowed)]
   public interface ITP1Rpc
   {
 
      [OperationContract(
        AsyncPattern=false,
        IsOneWay=false,
        Name="Call",
        ProtectionLevel=System.Net.Security.ProtectionLevel.None,
      [TransactionFlow(TransactionFlowOption.Allowed)]
      void Call(string serviceName, byte[] inData, int inLength,
                ref byte[] outData, ref int outLength);
 
   }
}
 

(2) サービスコントラクト(Visual Basicの場合)

 
Imports System.ServiceModel
 
Namespace Hitachi.OpenTP1.ServiceModel.TP1Integration
 
    <ServiceContract( _
     CallbackContract:=Nothing, _
     ConfigurationName:= _
        "Hitachi.OpenTP1.ServiceModel.TP1Integration.ITP1Rpc", _
     Name:="ITP1Rpc", _
     ProtectionLevel:=Net.Security.ProtectionLevel.None, _
     SessionMode:=SessionMode.NotAllowed)> _
    Public Interface ITP1Rpc
 
        <OperationContract( _
         AsyncPattern:=False, _
         IsOneWay:=False, _
         Name:="Call", _
         ProtectionLevel:= _
            System.Net.Security.ProtectionLevel.None, _
        <TransactionFlow(TransactionFlowOption.Allowed)> _
        Sub [Call](ByVal service As String, _
            ByVal inData() As Byte, ByVal inLength As Integer, _
            ByRef outData() As Byte, ByRef outLength As Integer)
    End Interface
 
End Namespace