ServersApache SOAP 2.2 Overview Page 12

Apache SOAP 2.2 Overview Page 12

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Executing the Program

Executing the client program sends the HTTP-SOAP stream to the server indicated by the program. We have asked the server to calculate a sum for us:

java webservice.CalculatorClient 6 + 5 

The stream is made up of an HTTP Header, followed by a SOAP envelope.

HTTP Header:

 POST /soap/servlet/rpcrouter HTTP/1.0 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: 463 SOAPAction: "" 

SOAP envelope:

  &ltSOAP-ENV:Envelope xmlns:SOAP-ENV=" envelope/"xmlns:xsi="" xmlns:xsd=""> &ltSOAP-ENV:Body> &ltns1:add xmlns:ns1="urn:Calculator" SOAP-ENV:encodingStyle= ""> &ltnbr1 xsi:type="xsd:long">6 &ltnbr2 xsi:type="xsd:long">5    

The server receives the SOAP request and sends back the results of this addition:

HTTP Header

 HTTP/1.0 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: 451 Set-Cookie2: JSESSIONID=8qilh88em1;Version=1;Discard;Path="/soap" Set-Cookie: JSESSIONID=8qilh88em1;Path=/soap Servlet-Engine: Tomcat Web Server/3.2.2 (JSP 1.1; Servlet 2.2; 
Java 1.3.0; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)

SOAP envelope

  &ltSOAP-ENV:Envelope xmlns:SOAP-ENV=" /envelope/"xmlns:xsi="" xmlns:xsd=""> &ltSOAP-ENV:Body> &ltns1:addResponse xmlns:ns1="urn:Calculator" SOAP- ENV:encodingStyle=" encoding/"> &ltreturn xsi:type="xsd:long">11    

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories