Share via


Defining a Web Service Using a WSDL File

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

You can format a WSDL file for using the MfSvcUtil tool to define a web service.

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.

Example

<!-- ========================================================== -->
<!-- TwoWay message -->
<!-- This verifies 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>