Defining a Web Service Using a WSDL file

This overview shows the format of an element for a message type in a WSDL file. A WSDL file is taken as input to the MfSvcUtil tool that generates service code.

Within your WSDL, elements for each type of message should be defined. The following example is the WSDL definition of messages for sending a pair of values to a service and receiving a sum in response.

          
          
          

          <xs:element name="TwoWayRequest" type="tns:TwoWayType" />
          <xs:complexType name="TwoWayType">
          <xs:sequence>
          <xs:element name="X" type="xs:int" />
          <xs:element name="Y" type="xs:int" />
          <xs:any minOccurs="0" maxOccurs="unbounded"
          namespace="##other" processContents="lax" />
          </xs:sequence>
          <xs:anyAttribute namespace="##other" processContents="lax" />
          </xs:complexType>

          <xs:element name="TwoWayResponse" type="tns:TwoWayResponseType" />
          <xs:complexType name="TwoWayResponseType">
          <xs:sequence>
          <xs:element name="Sum" type="xs:int" />
          <xs:any minOccurs="0" maxOccurs="unbounded"
          namespace="##other" processContents="lax" />
          </xs:sequence>
          <xs:anyAttribute namespace="##other" processContents="lax" />
          </xs:complexType>
        
Show: