This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes SAAJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "SAAJ" Watch "SAAJ" New topic
Author

SAAJ

Thirumalesh yeligar
Ranch Hand

Joined: Sep 02, 2013
Posts: 31
How can i extract values from the SOAP Header? and How to Link SAAJ Code to xdl file to extract data? please Help Me.............
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42022
    
  64
How can i extract values from the SOAP Header?

From a SOAPMessage object? It has a method that returns a SOAPHeader object. Then you can use its methods to dig deeper into it.

xdl file

I had to look up that one, as it's not commonly used - does it contain an XML schema? If so, the usual extension is XSD; you might want to change that so as to make that clear.

What do you mean by "link"? Where do you want to extract data from - the SOAP message, or the schema file? The latter has no actual data.


Ping & DNS - my free Android networking tools app
Thirumalesh yeligar
Ranch Hand

Joined: Sep 02, 2013
Posts: 31
hi Ulf.

i'm writing java program to insert content like User name and password.. into SOAP HEADER like this;<wse:user name>xyz</wse:username>.. how can i do this using saaj...





Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42022
    
  64
Several comments in no particular order:

  • If by "WSE" you mean https://en.wikipedia.org/wiki/Web_Services_Enhancements, then that's obsolete, and there are newer replacement that should be used instead.


  • The standard way to add security to SOAP calls is to use WS-Security, which all major SOAP stacks supports. Trying to roll your own is like reinventing the wheel, only that you will likely end up with an insecure system.


  • In one of your previous questions I pointed you to a SAAJ client; that contains code to set SOAP headers, if you still think this is a good ideas (it's not).


  • Why do you want to use SAAJ instead of a higher level API like JAX-WS?
  •  
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: SAAJ