aspose file tools
The moose likes Web Services and the fly likes Doubt about SOAP HEADER Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Doubt about SOAP HEADER" Watch "Doubt about SOAP HEADER" New topic
Author

Doubt about SOAP HEADER

Victor Maehira
Ranch Hand

Joined: Mar 08, 2007
Posts: 32
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
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
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?


Android appsImageJ pluginsJava web charts
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1123
It's interesting to see a PHP implementation of the SOAP header ...


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Check out the methods of the SOAPEnvelope class.
Victor Maehira
Ranch Hand

Joined: Mar 08, 2007
Posts: 32
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

Joined: Aug 03, 2002
Posts: 425
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


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Vivek Kr Singh
Ranch Hand

Joined: Oct 12, 2007
Posts: 56
You can write a Web Service Handler and extract & process header information. This will be neater way of validating SOAP requests.


SCJP 1.4
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
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

Joined: Oct 12, 2007
Posts: 56
I have created handlers for WLS 10 using this link
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Doubt about SOAP HEADER
 
Similar Threads
soap & soapenv
getting the values in the SOAP header
Invoke .NET Web Service using Java/Axis passing SoapHeader
question on wsa:Action="http://example.com/numbers/AddNumbersPortType/Result"
Defining Header type in WSDL