Partager via


Service Element (Windows Embedded CE 6.0)

1/6/2010

The <service> element in a Web Services Description Language (WSDL) file identifies a service (a group of related ports).

Depending on the number of ports defined in the WSDL file and their association to each other, a WSDL file can define one or more <service> elements.

Each <service> element identifies the ports to group together by using the <port> child elements to identify each port.

The <port> child element has two attributes and one child element:

  • The name attribute, which provides a unique name among all ports defined in the WSDL document.
  • The binding attribute, which refers to the binding specified earlier in the WSDL file.
  • The <soap:address> element, which provides the address of the server-side SOAP request handler.

In the Calc.wsdl file, there is only one <portType> element and one <binding> element. Hence, there is only one <service> element.

The following code example shows this <service> element:

<service name='Calc' >
    <port name='CalcSoapPort' binding='wsdlns:CalcSoapBinding' >
      <soap:address location='http://MSSoapSampleServer/MSSoapSamples/Calc/Service/Rpc/IsapiCpp/Calc.wsdl' />
    </port>
</service>

When a client sends a SOAP request to the server requesting an operation, it must identify the following:

  • The service
  • A port in the service
  • The operation it wants executed
  • Input parameter values

The request handler then processes the client request and sends a SOAP response back to the client.

See Also

Concepts

About the Calc.wsdl File
Types Element
Message Element
PortType Element
Binding Element