Asmir Mustafic
Software architect and consultant
(mainly PHP [symfony?])
Helping companies deal with their tech stack
contributed/contributing to:
SOAP (Simple Object Access Protocol) is a protocol specification for exchanging structured information in the implementation of web services in computer networks.
Its purpose is to induce extensibility, neutrality and independence.
It uses XML Information Set for its message format, and relies on application layer protocols, most often Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:tns="http://x.com" name="test"
targetNamespace="http://x.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types> <!-- data types -->
<xsd:schema targetNamespace="http://x.com">
<xsd:element name="doSomething">
<xsd:complexType>
<xsd:sequence><xsd:element name="in" type="xsd:string"/></xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="doSomethingResponse">
<xsd:complexType>
<xsd:sequence><xsd:element name="out" type="xsd:string"/></xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="doSomethingRequest">
<wsdl:part element="tns:doSomething" name="parameters"/>
</wsdl:message>
<wsdl:message name="doSomethingResponse">
<wsdl:part element="tns:doSomethingResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="test"> <!-- definition -->
<wsdl:operation name="doSomething">
<wsdl:input message="tns:doSomethingRequest"/>
<wsdl:output message="tns:doSomethingResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testSOAP" type="tns:test"> <!-- implementation definition -->
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doSomething">
<soap:operation soapAction="http://x.com/doSomething"/>
<wsdl:input><soap:body use="literal"/></wsdl:input>
<wsdl:output><soap:body use="literal"/> </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="test"> <!-- service -->
<wsdl:port binding="tns:testSOAP" name="testSOAP"> <!-- service implementation -->
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
SOAP (WSDL/XML representation)
Text
SOAP (graphical representation)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:tns="http://x.com" name="test"
targetNamespace="http://x.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types> <!-- data types -->
<xsd:schema targetNamespace="http://x.com">
<xsd:element name="doSomething">
<xsd:complexType>
<xsd:sequence><xsd:element name="in" type="xsd:string"/></xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="doSomethingResponse">
<xsd:complexType>
<xsd:sequence><xsd:element name="out" type="xsd:string"/></xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="doSomethingRequest">
<wsdl:part element="tns:doSomething" name="parameters"/>
</wsdl:message>
<wsdl:message name="doSomethingResponse">
<wsdl:part element="tns:doSomethingResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="test"> <!-- definition -->
<wsdl:operation name="doSomething">
<wsdl:input message="tns:doSomethingRequest"/>
<wsdl:output message="tns:doSomethingResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testSOAP" type="tns:test"> <!-- implementation definition -->
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doSomething">
<soap:operation soapAction="http://x.com/doSomething"/>
<wsdl:input><soap:body use="literal"/></wsdl:input>
<wsdl:output><soap:body use="literal"/> </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="test"> <!-- service -->
<wsdl:port binding="tns:testSOAP" name="testSOAP"> <!-- service implementation -->
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Pure PHP implementation of SOAP 1.1
client specifications
https://github.com/goetas-webservices/soap-client
SOAP Client is ready!
SOAP server is coming soon...
Is up to date!
(even if SOAP is legacy)
Composed by a set of independent libraries
xsd-reader
wsdl-reader
soap-reader
xsd2php
wsdl2php
jms/serializer
php-http
and others....
https://github.com/goetas-webservices
Productivity boost!
Limitations
If you have questions feel free to ask me now or later! :)
https://github.com/goetas-webservices/soap-client-demo