結合添付ファイルのサポート: WSDL の例

このタスクは、Web Services-Interoperability (WS-I) Attachments Profile Version 1.0 エンコードおよび添付ファイル付き SOAP メッセージのエンコードを使用する WSDL 断片の例を表示する場合に使用します。

このタスクについて

Web Services-Interoperability (WS-I) Attachments Profile Version 1.0 により、結合添付ファイルのコンテンツ ID を構築する規則が定義されています。 この規則により、メッセージ・パートの名前がエンコードされます。 その結果、サービス統合テクノロジーは、SOAP 本体にそのメッセージ・パートを表すエレメントが含まれているかどうかにかかわらず、結合添付ファイルを認識できます。 コンテンツ ID を構築する規則は以下のとおりです。
name=uuid@domain
ここで、name はエンコードされているメッセージ・パートの名前、 uuid はグローバルな固有 ID、domain はドメイン ID (例えば my.example.com) です。
注: この方法は、コンテンツ ID の規則を定義せず、SOAP 本体内のエレメントを使用してそのメッセージ・パートが添付ファイルとしてエンコードされていることを示す、添付ファイル・エンコード・スキーム付きの SOAP メッセージとは異なります。

この両方のケースを識別するため、サービス統合テクノロジーでは、メッセージの添付ファイルがコンテンツ ID を構築する規則のバージョン 1.0 に準拠していれば、それがバージョン 1.0 メッセージであると想定します。

以下に、両方のスタイルに準拠したメッセージ・インスタンスがある、結合添付ファイルに対する WSDL の断片を示します。

<wsdl:binding name="BoundSoapBinding" type="intf:BoundPortType">
    <soap:binding style="rpc"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="bound">
      <soap:operation soapAction=""/>
      <wsdl:input>
        <mime:multipartRelated>
          <mime:part>
            <soap:body parts="stringIn" namespace="http://bound"
                       use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="attachIn" type="text/xml"/>
          </mime:part>
        </mime:multipartRelated>
      </wsdl:input>

以下に、バージョン 1.0 エンコードを使用した SOAP インスタンスに対する WSDL の断片を示します。この断片では、メッセージ本体には attachIn パートのへの言及が含まれず、添付ファイルのコンテンツ ID によりエンコードされているパートが識別されます。

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <myStartID>

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ns0:bound xmlns:ns0="http://bound">
      <stringIn>some string data</stringIn>
    </ns0:bound>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <attachIn=someUUID@some.domain.name>

<someOtherXMLElement/>
--myBoundary--

以下に、添付ファイル・エンコード付きの SOAP メッセージを使用する SOAP インスタンスに対する WSDL の断片を示します。 この断片では、メッセージ本体に結合添付ファイルへの参照が含まれ、添付ファイルのコンテンツ ID は強制されません。

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <myStartID>

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ns0:bound xmlns:ns0="http://bound">
      <stringIn>some string data</stringIn>
      <attachIn href="cid:notTheStart"/>
    </ns0:bound>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <notTheStart>

<someOtherXMLElement/>
--myBoundary--

上記の 2 つのケースでは、メッセージ内に結合添付ファイルを識別するための十分な情報があります。 さらに、両方のケースにおいて、サービス統合テクノロジーは添付ファイル・リスト内に結合添付ファイル・エントリーを配置し、データ・グラフの本体セクションに添付ファイルからのデータを配置します。


トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tjw_attach_bound_wsdl
ファイル名:tjw_attach_bound_wsdl.html