English 中文(简体)
WSDL - <service>
  • 时间:2024-11-05

WSDL - <service> Element


Previous Page Next Page  

<service> 内容界定了网络服务支持的港口。 每项辅助议定书都有一个港口要素。 服务要素是收集港口。

    网络服务客户可从服务内容中学习以下内容:

      where to access the service,

      through which port to access the web service, and

      how the communication messages are defined.

    服务要素包括提供可读文件的文件内容。

这里是《例》一章中的一项法典。

<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要素的约束性特性将服务地址与网络服务中确定的具有约束力的内容联系起来。 例如,Hello_Bled

<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>
Advertisements