ページの先頭行へ戻る
Interstage Application Server ebXML Message Serviceユーザーズガイド

C.9 Service/Actionの記述

  まず、取引に利用するServiceとActionのモデルを決めます。ここでは、下図のように2つのActionを持つ1つのServiceを想定します。

  上図に示した“urn:sample-service:order-1”というServiceは、FUJITSU_LIMITEDからebXML_Traderへの注文を示す“Order”というActionと、注文に対するebXML_TraderからFUJITSU_LIMITEDへの回答を示す“Order_Response”というActionを含んでいます。このモデルをCPAとして表現するには、CollaborationRole要素を利用します。CollaborationRole要素の記述条件については“B.1.2.7 CollaborationRole(取引における役割情報)”を参照してください。

CollaborationRole要素の例

  CollaborationRole要素は、Partyの役割を示すRole要素とServiceの構造を示すServiceBinding要素からなります。ServiceBinding要素は、Serviceの名前を示すService要素とServiceに属するActionの構造を示すCanSend要素およびCanReceive要素からなります。

  モデルでは、FUJITSU_LIMITEDはOrderについてCanSendであり、Order_ResponseについてCanReceiveです。逆に、ebXML_TraderはOrder_ResponseについてCanSendであり、OrderについてCanReceiveです。

  このモデルでは、各PartyはそれぞれひとつのRoleしか持たず、ServiceとActionも一意であるため、各PartyのThisPartyActionBinding要素をIDで関連付けることは必須ではありません。ですが、下記の例ではThisPartyActionBinding同士の関係を明示するため、ThisPartyActionBinding要素のid属性とOtherPartyActionBinding要素を用いた関連付けを記述しています。

<?xml version="1.0" encoding="UTF-8"?>
<tp:CollaborationProtocolAgreement
      xmlns:tp="http://www.oasis-open.org/committees/ebxml-cppa/schema/cpp-cpa-2_0.xsd"
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      tp:cpaid="FUJITSU_LIMITED-ebXML_Trader-20030115">
    <tp:Status tp:value="agreed"/>
    <tp:Start>2003-01-01T00:00:00Z</tp:Start>
    <tp:End>2005-12-31T23:59:59Z</tp:End>
    <tp:PartyInfo 
          tp:defaultMshChannelId=""
          tp:defaultMshPackageId="">
        <tp:PartyId tp:type=”Name”>FUJITSU_LIMITED</tp:PartyId>
        <tp:CollaborationRole>
            <tp:Role tp:name="urn:sample-service:Buyer"/>
            <tp:ServiceBinding>
                <tp:Service tp:type="anyURI">urn:sample-service:order-1</tp:Service>
                <tp:CanSend>
                    <tp:ThisPartyActionBinding
tp:id="Buyer-Order"
tp:action="Order" tp:packageId="FUJITSU_LIMITED-package001"> <tp:BusinessTransactionCharacteristics tp:isNonRepudiationRequired="false"/> <tp:ChannelId>FUJITSU_LIMITED-deliveryChannel001</tp:ChannelId> </tp:ThisPartyActionBinding>
<tp:OtherPartyActionBinding>Seller-Order</tp:OtherPartyActionBinding> </tp:CanSend> <tp:CanReceive> <tp:ThisPartyActionBinding
tp:id="Buyer-Order-Res"
tp:action="Order_Response" tp:packageId="ebXML_Trader-package001"> <tp:BusinessTransactionCharacteristics tp:isNonRepudiationRequired="false"/> <tp:ChannelId>FUJITSU_LIMITED-deliveryChannel001</tp:ChannelId> </tp:ThisPartyActionBinding>
<tp:OtherPartyActionBinding>Seller-Order-Res</tp:OtherPartyActionBinding> </tp:CanReceive> </tp:ServiceBinding> </tp:CollaborationRole> <tp:DeliveryChannel tp:channelId="FUJITSU_LIMITED-deliveryChannel001" tp:transportId="FUJITSU_LIMITED-transport001" tp:docExchangeId="FUJITSU_LIMITED-docExchange001"> <tp:MessagingCharacteristics tp:syncReplyMode="none" tp:ackRequested="always" tp:ackSignatureRequested="never" tp:duplicateElimination="always" tp:actor="urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH"/> </tp:DeliveryChannel> <tp:Transport tp:transportId="FUJITSU_LIMITED-transport001"> <tp:TransportSender> <tp:TransportProtocol>HTTP</tp:TransportProtocol> </tp:TransportSender> <tp:TransportReceiver> <tp:TransportProtocol>HTTP</tp:TransportProtocol> <tp:Endpoint tp:uri="http://www.div001.fujitsu.com/ebms/servlet/ebxmlListener" tp:type="allPurpose"/> </tp:TransportReceiver> </tp:Transport> <tp:DocExchange tp:docExchangeId="FUJITSU_LIMITED-docExchange001"> <tp:ebXMLSenderBinding tp:version="2.0"> <tp:ReliableMessaging> <tp:Retries>20</tp:Retries> <tp:RetryInterval>PT50S</tp:RetryInterval> <tp:MessageOrderSemantics>Guaranteed</tp:MessageOrderSemantics> </tp:ReliableMessaging> <tp:PersistDuration>P3D</tp:PersistDuration> </tp:ebXMLSenderBinding> <tp:ebXMLReceiverBinding tp:version="2.0"> <tp:ReliableMessaging> <tp:Retries>10</tp:Retries> <tp:RetryInterval>PT1M</tp:RetryInterval> <tp:MessageOrderSemantics>Guaranteed</tp:MessageOrderSemantics> </tp:ReliableMessaging> <tp:PersistDuration>P3D</tp:PersistDuration> </tp:ebXMLReceiverBinding> </tp:DocExchange> </tp:PartyInfo> <tp:PartyInfo tp:defaultMshChannelId="" tp:defaultMshPackageId=""> <tp:PartyId tp:type=”Name”>ebXML_Trader</tp:PartyId> <tp:CollaborationRole> <tp:Role tp:name="urn:sample-service:Seller"/> <tp:ServiceBinding> <tp:Service tp:type="anyURI">urn:sample-service:order-1</tp:Service> <tp:CanSend> <tp:ThisPartyActionBinding
tp:id="Seller-Order-Res"
tp:action="Order_Response" tp:packageId="ebXML_Trader-package001"> <tp:BusinessTransactionCharacteristics tp:isNonRepudiationRequired="false"/> <tp:ChannelId>ebXML_Trader-deliveryChannel001</tp:ChannelId> </tp:ThisPartyActionBinding>
<tp:OtherPartyActionBinding>Buyer-Order-Res</tp:OtherPartyActionBinding> </tp:CanSend> <tp:CanReceive> <tp:ThisPartyActionBinding
tp:id="Seller-Order"
tp:action="Order" tp:packageId="FUJITSU_LIMITED-package001"> <tp:BusinessTransactionCharacteristics tp:isNonRepudiationRequired="false"/> <tp:ChannelId>ebXML_Trader-deliveryChannel001</tp:ChannelId> </tp:ThisPartyActionBinding>
<tp:OtherPartyActionBinding>Buyer-Order</tp:OtherPartyActionBinding> </tp:CanReceive> </tp:ServiceBinding> </tp:CollaborationRole> <tp:DeliveryChannel tp:channelId="ebXML_Trader-deliveryChannel001" tp:transportId="ebXML_Trader-transport001" tp:docExchangeId="ebXML_Trader-docExchange001"> <tp:MessagingCharacteristics tp:syncReplyMode="none" tp:ackRequested="always" tp:ackSignatureRequested="never" tp:duplicateElimination="always" tp:actor="urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH"/> </tp:DeliveryChannel> <tp:Transport tp:transportId="ebXML_Trader-transport001"> <tp:TransportSender> <tp:TransportProtocol>HTTP</tp:TransportProtocol> </tp:TransportSender> <tp:TransportReceiver> <tp:TransportProtocol>HTTP</tp:TransportProtocol> <tp:Endpoint tp:uri="http://www.ebXMLTrader.com/ebms/servlet/ebxmlListener" tp:type="allPurpose"/> </tp:TransportReceiver> </tp:Transport> <tp:DocExchange tp:docExchangeId="ebXML_Trader-docExchange001"> <tp:ebXMLSenderBinding tp:version="2.0"> <tp:ReliableMessaging> <tp:Retries>10</tp:Retries> <tp:RetryInterval>PT1M</tp:RetryInterval> <tp:MessageOrderSemantics>Guaranteed</tp:MessageOrderSemantics> </tp:ReliableMessaging> <tp:PersistDuration>P3D</tp:PersistDuration> </tp:ebXMLSenderBinding> <tp:ebXMLReceiverBinding tp:version="2.0"> <tp:ReliableMessaging> <tp:Retries>20</tp:Retries> <tp:RetryInterval>PT50S</tp:RetryInterval> <tp:MessageOrderSemantics>Guaranteed</tp:MessageOrderSemantics> </tp:ReliableMessaging> <tp:PersistDuration>P3D</tp:PersistDuration> </tp:ebXMLReceiverBinding> </tp:DocExchange> </tp:PartyInfo> <tp:Packaging tp:id="FUJITSU_LIMITED-package001"/> <tp:Packaging tp:id="ebXML_Trader-package001"/> </tp:CollaborationProtocolAgreement>