• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create SOAP headers

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
dale con
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic