This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Ranch Hand
Posts: 165
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 165
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic