Forums Register Login

Create SOAP headers

+Pie Number of slices to send: Send
Can someone please show me how to do this ?

Is it along the lines of

SOAPEnvelope envelope = message.getSOAPEnvelope();
SOAPHeaderElement element = envelope.addHeader("myHeaderNAme");

But I don't know how to put stuff into it and take stuff out

Thanks for any help
+Pie Number of slices to send: Send
Hi,

I think this will depend upon the tool that you are using.

Assuming that you are using Axis (most commonly used ), when we do wsdl2java of the wsdl, the client stub is ALSO generated (org.apache.axis.client.Stub).

This stub has methods like:

setHeader(SOAPHeaderElement),
setHeader(String,String,Object).


Similarly , there are methods like getHeader(..) etc.

Refer Axis API.

Thanks,
Milan Doshi
+Pie Number of slices to send: Send
Hello, I thinmkl i'm missing soemthing - well i must be think cos i'm not understanding this

i think i'm barking up the wrong tree - surely it can't be this hard !!!

Most of the code i'm writing at the moment is server-side, so i haven't done any of the wsdlxml etc.. files yet

If my client creates a header and goes off to my server-side to do validation stuff, how do i return a string from my server-side to the client header ???

And then when the clinet has a vlaue in the header how to i then take that value and return it to the server-side so it cancheck the value??

what is the best way for my client to talk to my server-side code and visa versa ???

Thanks for any help
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1040 times.
Similar Threads
Axis 1.4 - remove mustUnderstand attribute
Web Services using soap
How to add header to soap response using axis2 and java?
Java - creating Web Service Request using JDOM - Header issue
Sign soap header with handler in WebSphere 6.1
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 03:21:55.