Welcome to the SOAP WSDL tutorial! This page will guide you through the basics of SOAP and WSDL, which are essential components for web services communication.
What is SOAP?
SOAP (Simple Object Access Protocol) is a protocol for exchanging structured information in web services. It is used to exchange data between systems over a network.
- SOAP is based on XML.
- It uses HTTP or SMTP for transport.
- SOAP messages are self-describing.
What is WSDL?
WSDL (Web Services Description Language) is a language used to describe web services. It defines the operations that can be performed on a web service and the messages that are exchanged.
- WSDL is written in XML.
- It describes the interface of a web service.
- WSDL is used by SOAP to exchange messages.
Example of a SOAP Message
Here is a simple example of a SOAP message:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns1:getMessage xmlns:ns1="http://example.com/">
<ns1:messageType>Text</ns1:messageType>
</ns1:getMessage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example of a WSDL File
Here is a simple example of a WSDL file:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/" targetNamespace="http://example.com/">
<wsdl:message name="getMessageRequest">
<wsdl:part name="messageType" type="xs:string"/>
</wsdl:message>
<wsdl:message name="getMessageResponse">
<wsdl:part name="message" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="MessagePortType">
<wsdl:operation name="getMessage">
<wsdl:input message="wsdl:message:getMessageRequest"/>
<wsdl:output message="wsdl:message:getMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MessageBinding" type="tns:MessagePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getMessage">
<soap:operation soapAction="http://example.com/getMessage"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MessageService">
<wsdl:port name="MessagePort" binding="tns:MessageBinding">
<soap:address location="http://example.com/MessageService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Learn More
For more information about SOAP and WSDL, please visit our Web Services tutorial.
SOAP WSDL