
A service element describes a Web service as a collection of port elements. A port element defines a specific network address for a binding. The sample below shows the basic outline of a service that supplies an address for a SOAP binding:
<service name="ServiceName">
<port name="PortName" binding="BindingRef">
<soap:address location="URL"/>
</port>
</service>
The ServiceName sets the name of the service. The PortName sets the name of the specific address. The BindingRef refers to the name of a binding element. The BindingRef must be namespace qualified if the targetNamespace for the WSDL definitions element is not the same as the default namespace.
The sample below shows the service defined in WeatherSummary.wsdl:
<service name="WeatherSummary">
<documentation>WeatherSummary</documentation>
<port binding="tns:WeatherSummary" name="WeatherSummary">
<soap:address
location="http://localhost:8090/weather/WeatherSummary"/>
</port>
</service>
The binding attribute of the port element specifies that the element is a port for the binding named WeatherSummary. The soap:address element within the port states that the port receives SOAP messages directed to the URL http://localhost:8090/weather/WeatherSummary/.
At this point, the Web service is completely defined.
©2003-2005 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.