You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Jyothi K <jy...@india.softalia.com> on 2001/08/01 12:20:34 UTC

regd Soap messages from client and server in Apache SOAP

> Hi ,
>          Lets take the example of adding two numbers.I want a Java Server
> and Java client using Apache SOAP. I want a server that will have a method
> add. This method should take the incoming soap mesage and parse it and get
> the two integer values and then return a soap message with the sum. I want
> to write a client that sends the soap message to server and recieves back
> the soap message. To write the soap message i am using the Envelope and
> Body objects and to post the Message objects. But i am not very clear
> about how to write my soap envelope and post it. I am giving you the
> details fo evrything below. Could you just help me out by giving a sample
> application of client and server for this example. I am trying but in the
> server side it is recognising the content type as text/html instead of
> text.xml and so it is not finding the correct urn in the server i guess. I
> would really appreciate if someone gives me a detailed explanation of what
> is to be done.
> 
> 
> 
> Here is the soap envelope that i want to transmit to the server and again
> recieve the soap envelope as response. 
> 
> <SOAP-ENV: Envelope
>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>   xmlns:xsd="http://www.w3.org/1999/xmlschema"
>   xmlns:xsi="http://www.w3.org/1999/xmlschema-instance"
>   SOAP-ENV: encodingstyle = "http://schemas.xmlsoap.org/soap/encoding/">
> 
>   <SOAP-ENV: Body>
>   <add xmlns:m= "urn:ESoapServerService">
>   <a xsi:type="xsd:int">10></a>
>   <b xsi:type="xsd:int">20></b>
>   </add>
>   </SOAP-ENV:Body>
> </SOAP-ENV: Envelope>
> 
> 
> Here is the soap envelope that the server will send to the client.
> 
> <SOAP-ENV: Envelope
>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>   xmlns:xsd="http://www.w3.org/1999/xmlschema"
>   xmlns:xsi="http://www.w3.org/1999/xmlschema-instance"
>   SOAP-ENV: encodingstyle = "http://schemas.xmlsoap.org/soap/encoding/">
> 
>   <SOAP-ENV: Body>
>   <addResponse SOAP-ENV: encodingstyle =
> "http://schemas.xmlsoap.org/soap/encoding/">
>   <returnValue xsi:type="xsd:int">30></returnValue>
>   </addResponse>
>   </SOAP-ENV:Body>
> </SOAP-ENV: Envelope>
> 
> 
> Thanks in advance
> Jyothi
>