Hi!

     You know you don't have to build up all your soap message by yourself,
don't you?  Check out a simple client like this one...
http://www.xmethods.net/download/servicefiles/TempClient.java  I know it's
not an "add" method but you can get a good idea how to do a Soap request
with Apache Soap.  And a server is only a class with ordinary method.  It
doesn't even have to know it's called thru soap.  It only have to be on a
server that is soap aware.

<a xsi:type="xsd:int">10></a>

By the way, I think on this line there's a ">" that must not be there after
the "10".

any questions?

Steeve...





Jyothi K <[EMAIL PROTECTED]> on 01/08/2001 06:20:34 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)

Subject:  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
>






Reply via email to