SHARE
Facebook X Pinterest WhatsApp

Apache SOAP 2.2 Overview Page 12

Jul 20, 2010
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="http://schemas.xmlsoap.org/soap/ envelope/"xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> &ltSOAP-ENV:Body> &ltns1:add xmlns:ns1="urn:Calculator" SOAP-ENV:encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/"> &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="http://schemas.xmlsoap.org/soap /envelope/"xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> &ltSOAP-ENV:Body> &ltns1:addResponse xmlns:ns1="urn:Calculator" SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/"> &ltreturn xsi:type="xsd:long">11    

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.