• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add custom headers to SOAP request/response in JAX-WS Metro

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I need to admit that I have not studied much on headers but to get a feeling, I was looking for a good demonstration of using the headers in SOAP request/response. Specially I'm looking for some examples, where and how in built headers are added in non SAAJ way. I mean are there any annotations that can be added, so that headers are automatically added at run time. If yes, can an example be provided for both client and service side.

How about custom headers? Can we add any custom headers to SOAP request/response? What API needs to be extended/implemented for writing custom Headers and how can they be added.

Can some examples be provided here?

Thanks
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If you want to use generated artifacts, then handlers is a way that you can use to add custom SOAP headers to outgoing messages both on the client and server side.
I suspect, though, that in order to be able to manipulate the SOAP message in the handler code, you will have to use SAAJ or some API that offers similar functionality.
For an example of how to implement a handler that does not add custom headers, see section 9.4 of my study notes. I am sorry, but as far as I recall, I don't have an example of a handler that adds custom headers.
Best wishes!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Working with Custom SOAP Headers shows how to do it with Axis2. SOAP headers explains the Metro's way.

Regards,
Dan
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan Drillich wrote:Working with Custom SOAP Headers shows how to do it with Axis2. SOAP headers explains the Metro's way.

Regards,
Dan


Thanks Dan. But unfortunately the link for Metro's way seem to be missing.
 
Lester Burnham
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They're reorganizing the java.net site: substitute "metro" for "jax-ws" in the URL.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lester Burnham wrote:They're reorganizing the java.net site: substitute "metro" for "jax-ws" in the URL.


Thanks Lester. Your suggestion worked.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic