Tutorial Addendum on Web Account and SOAP - PHP SOAP Addendum
| |
Dumping request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods-Temperature-Demo"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body><ns1:getTemp>
<zipcode xsi:type="xsd:string">123456</zipcode>
</ns1:getTemp></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Dumping acknowledgment headers:
HTTP/1.1 200 OK
Server: Enhydra-MultiServer/3.1.1b1
Status: 200
Content-Type: text/xml; charset=utf-8
Servlet-Engine: Enhydra Appliance Server/3.1.1b1 (JSP 1.1;
Servlet 2.2; Java 1.4.2_03; Linux 2.4.7-10smp i386;
java.vendor=Sun Microsystems Inc.)
Content-Length: 470
X-Cache: Absence from www.xmethods.net
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Dumping response:
<?xml version= 1.0 encoding= UTF-8 ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getTempResponse xmlns:ns1="urn:xmethods-Temperature-Demo"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:float">52.0</return>
</ns1:getTempResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The achievement is actual useful. It confirms that:
- The absence SOAP adaptation is SOAP 1.1. For SOAP 1.2, the envelope namespace should be
http://www.w3.org/2003/05/soap-envelope, not http://schemas.xmlsoap.org/soap/envelope/.
- The busline agreement is HTTP/1.1. See the appeal attack lines.
- There is alone one RPC action accurate in this WSDL: "float getTemp(string $zipcode)".
See the __getFunctions() dump.
- SOAP Addendum converts my getTemp() RPC alarm accurately in a SOAP appeal bulletin based on
the definitions in the WSDL document.
- The abiding amount is aswell adapted appropriately into a "float" blazon of value, not a "string".
The SOAP acknowledgment bulletin shows "52.0", but the book out of $return is "52".
Whis Is WSDL?
WSDL (Web Casework Analogue Language): An XML based accepted advised to describes protocol
bindings and bulletin formats of Web services. WSDL is generally arresting as "Whiz-Dull".
A WSDL certificate is an XML certificate accounting in WSDL to call Web service. Actuality is a archetype of the WSDL
document for the affirmation Web account acclimated in antecedent sections. You can download one yourself by
going to http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl with your Web browser:
<?xml version="1.0"?>
<definitions name="TemperatureService"
targetNamespace="http://www.xmethods.net/sd/TemperatureService.wsdl"
xmlns:tns="http://www.xmethods.net/sd/TemperatureService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="getTempRequest">
<part name="zipcode" type="xsd:string"/>
</message>
<message name="getTempResponse">
<part name="return" type="xsd:float"/>
</message>
<portType name="TemperaturePortType">
<operation name="getTemp">
<input message="tns:getTempRequest"/>
<output message="tns:getTempResponse"/>
</operation>
</portType>
<binding name="TemperatureBinding" type="tns:TemperaturePortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getTemp">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:xmethods-Temperature-Demo"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:xmethods-Temperature-Demo"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="TemperatureService">
<documentation>Returns accepted temperature in a accustomed U.S. zipcode
</documentation>
<port name="TemperaturePort" binding="tns:TemperatureBinding">
<soap:address
location="http://services.xmethods.net:80/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>
I cannot apprehend this certificate able-bodied afore acquirements the WSDL specifications.
But it seems to be anecdotic absolutely how this Web account should be used.
|
xmlns, xmlsoap, schemas, xmethods, envelope, message, service, encoding, gettemp, operation, xmlschema, zipcode, temperature, encodingstyle, document, binding, float, temperatureservice, output, return, string, version, gettempresponse, extension, input, response, namespace, request, definitions, services, , < soap, soap env, http schemas, schemas xmlsoap, xmlsoap org, org soap, http www, soap encoding, 2001 xmlschema, web service, org 2001, encodingstyle http, encoding <, www xmethods, type xsd, gettemp <, < ns1, env body, urn xmethods, envelope xmlns, env envelope, < operation, < message, xmlns soap, temperature demo, soap envelope, xmethods temperature, xmethods net, < output, < input, xmlns xsd, soap extension, < xml, xml version, xsd http, gettempresponse <, http schemas xmlsoap, org 2001 xmlschema, org soap encoding, xmethods temperature demo, encodingstyle http schemas, urn xmethods temperature, org soap envelope, < message name, demo encodingstyle http, temperatureservice wsdl xmlns, < part name, < operation name, < soap body, temperature demo encodingstyle, operation name gettemp, 2001 xmlschema instance, env http schemas, envelope xmlns soap, env envelope xmlns, soap envelope xmlns, 2001 xmlschema xmlns, xmlschema instance xmlns, php soap extension, env encodingstyle http, |
Also see ...
To analysis my server application, I wrote this applicant application, HelloClient.php: <?php HelloClient.php Absorb (c) 2005 by Dr. Yang $client = new SoapClient(null, array( area =
This affiliate describes:What is SOAP encoding?How to handle assorted references and annular references?How to specify bulge types?How to using SOAP encoding
Multiple References and Annular References To advice serializing assorted reference, SOAP encoding blueprint offers the afterward rule:6. If serializing an labeled entering edge,
This affiliate describes:Java Implementations of SOAP.Axis Accession Requirements on Windows.Installing Arbor 1.2.1 on Windows.Installing JAF 1.0.2./
Installing Arbor 1.2.1 on WindowsBefore installing Axis, you should attending at your accepted JDK and Bobcat installations. Actuality is what I accept on my system:Name Ada
This affiliate describes:What are SOAP bulletin barter patterns?What is Request Response Bulletin Barter Pattern?What is Acknowledgment Bulletin Barter Pattern?
Rule 2: At the responding SOAP node, there will be addition set of SOAP backdrop with the afterward antecedent values: http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext /ExchangePatternName
This affiliate describes:Generic SOAP bulletin structure.SOAP accountability bulletin structure.SOAP Bulletin Structure
SOAP Accountability MessageA SOAP accountability bulletin is a appropriate SOAP bulletin acclimated to backpack absurdity information. It haveto accept alone one physique adolescent aspect alleged "Fault
This affiliate describes:Available Perl implemations of SOAP.SOAP::Lite for Perl on Windows.Installing ActivePerl v5.8.7 on Windows.SOAP::Lite 0.55 in Active