For this example, the following WSDL will be used to generate the service and a client. See Figure 1 - Example WSDL. As you can see the service has a single operation, called NewOperation, which takes a NewInputMessage type and returns a NewOutputMessage type.

Figure 1 - Example WSDL
Paste the following into a text file and save it as Example.wsdl.
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="WebServiceName"
targetNamespace="http://example.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://example.com/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://example.com/">
<xs:element name="InputType">
<xs:complexType>
<xs:sequence>
<xs:element name="input" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OutputType">
<xs:complexType>
<xs:sequence>
<xs:element name="output" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="NewInputMessage">
<wsdl:part name="InputMessagePart" element="tns:InputType" />
</wsdl:message>
<wsdl:message name="NewOutputMessage">
<wsdl:part name="OutputMessagePart" element="tns:OutputType" />
</wsdl:message>
<wsdl:portType name="NewPortType">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewInputMessage" />
<wsdl:output message="tns:NewOutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:NewPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="NewOperation">
<wsdl:input>
<soap:body />
</wsdl:input>
<wsdl:output>
<soap:body />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NewService">
<wsdl:port name="NewPort" binding="tns:NewBinding">
<soap:address location="http://example.com/example" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

  • No labels