Latest web development tutorials

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>

name属性とtype属性- バインディング要素には次の2つの属性を持っています。

名前name属性は、この場合は「glossaryTerms」ポートであるで、結合ポートのバインディングを定義し、type属性を指します。

石鹸: -スタイルプロパティおよび輸送特性の結合要素は、2つの属性があります。

スタイルプロパティの値が「RPC」または「文書」。 この例では、文書を使用しています。 トランスポート属性は、使用するSOAPプロトコルを定義します。 この例では、HTTPを使用します。

操作要素は、毎に設けられたポート演算子を定義します。

操作ごとに、対応するSOAP行為を定義する必要があります。 あなたはどのように入力と出力のエンコードもしなければなりません。 この例では、「リテラル」を使用します。