Wsdl-service
提供:Dev Guides
WSDL-<service>要素
*<service>* 要素は、Webサービスでサポートされるポートを定義します。 サポートされているプロトコルごとに、1つのポート要素があります。 サービス要素はポートのコレクションです。
- Webサービスクライアントは、サービス要素から以下を学ぶことができます-
- サービスにアクセスする場所、
- どのポートを介してWebサービスにアクセスするか、および
- 通信メッセージの定義方法。
- サービス要素には、人間が読めるドキュメントを提供するドキュメント要素が含まれています。
ここに例の章からのコードの一部があります-
<service name = "Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port binding = "tns:Hello_Binding" name = "Hello_Port">
<soap:address
location = "http://www.examples.com/SayHello/">
</port>
</service>
_port_要素のバインディング属性は、サービスのアドレスをWebサービスで定義されたバインディング要素に関連付けます。 この例では、これは_Hello_Binding_です
<binding name =" Hello_Binding" type = "tns:Hello_PortType">
<soap:binding style = "rpc"
transport = "http://schemas.xmlsoap.org/soap/http"/>
<operation name = "sayHello">
<soap:operation soapAction = "sayHello"/>
<input>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice" use = "encoded"/>
</input>
<output>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice" use = "encoded"/>
</output>
</operation>
</binding>