Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!