• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAAJ

 
Thirumalesh yeligar
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Thirumalesh yeligar
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic