| 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
|
 |
 |
|
|
subject: How to marshal data from a SOAP header and write it to disc
|
|
|