WSDL バインディング
WSDL バインディングは、メッセージ・フォーマットと web サービスのプロトコルの詳細を定義します。
SOAPへのバインディング
要求-応答操作の例:
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>
</operation>
</portType>
<binding type="glossaryTerms" name="b1">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation>
<soap:operation
soapAction="http://example.com/getTerm"/>
<input><soap:body use="literal"/></input>
<output><soap:body use="literal"/></output>
</operation>
</binding> |
binding 要素は、name と type の2つの属性を持っていいます。
name 属性 (どのような名前でも使用できます) は、binding の名前を定義し、type 属性は binding のポート、
このケースでは "glossaryTerms" ポートをポイントします。
soap:binding 要素は、style と transport の2つの属性を持っています。
style 属性は、"rpc" か "document" を指定します。このケースでは、document を使用しています。
transport 属性は、使用する SOAP プロトコルを定義します。このケースでは、HTTP を使用しています。
operation 要素は、アクセス可能なポートのオペレーションを定義します。
各 operation に対応するSOAPアクションが定義されなければなりません。
入力と出力のエンコード方法も指定しなければなりません。このケースでは、"literal" を使用しています。
|