This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes How to marshal data from a SOAP header and write it to disc Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to marshal data from a SOAP header and write it to disc" Watch "How to marshal data from a SOAP header and write it to disc" New topic
Author

How to marshal data from a SOAP header and write it to disc

Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello All,

I want to take a WS-Security object from a SOAP header and write it to disc. Do you know how I can do this? Could JAX-B be used to marshall this data into a string and then write to disc?

Thanks for your attention.

-Ravi


Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hello!
Correct me if I am wrong, but if you are using JAXB in connection with JAX-WS, to marshal and unmarshal messages sent to and received by a web service, then JAXB will only concern itself with the contents of the SOAP body. Of course, JAXB can be used to marshal and unmarshal standalone XML fragments but will not automatically retrieve and insert such fragments into SOAP messages.
Take a look at this web page that speaks about how to access headers in SOAP messages on both client and server side:
https://jax-ws.dev.java.net/guide/SOAP_headers.html
Best wishes!
Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello,

The value I need is in the SOAP header. I can get the HTTP_REQUEST_HEADERS of the SecurityContext. This returns a HashMap of key (String), value (String).

- Ravi
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to marshal data from a SOAP header and write it to disc
 
Similar Threads
This weeks book giveaway
Windows XP and Direct CD 5
how to write http header for soap request
Creating Web Services using WSAD
Help needed for testing web service