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

Doubt about SOAP HEADER  RSS feed

 
Victor Maehira
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi javaranchers!
I am developing a web service client that needs to put some informations in SOAP HEADER message.



I have to put user and password fields in SOAP HEADER.

There is also a thread about it:
http://www.coderanch.com/t/225342/Web-Services/java/add-security-header-SOAP-request

Have you ever had to do deal with SOAP HEADER? Do you know any interesting tutorial?

Thanks in advance!
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to deal with any SOAP headers directly if you use a standard like WS-Security (which does all that for you). Which SOAP stack are you using?
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's interesting to see a PHP implementation of the SOAP header ...
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the methods of the SOAPEnvelope class.
 
Victor Maehira
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot guys!!!
The problem is solved! For historical purposes, I am posting the URLs that I based on:

http://www.javadb.com/using-a-message-handler-to-a...header-in-a-web-service-client
http://forums.java.net/jive/thread.jspa?threadID=38210

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing this.

What about validating the same on the server side. How do you get the header out and validate the user name and password on the server side.

Any example of that ?

Thanks,
Rahul
 
Vivek Kr Singh
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write a Web Service Handler and extract & process header information. This will be neater way of validating SOAP requests.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vivek Kr Singh wrote:You can write a Web Service Handler and extract & process header information. This will be neater way of validating SOAP requests.


Exactly, This is what i am thinking but do you have some links which shows some sample code snippet or something.
Any link is appreciated.

Thanks,
Rahul
 
Vivek Kr Singh
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created handlers for WLS 10 using this link
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!