• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt about SOAP HEADER

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
https://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!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's interesting to see a PHP implementation of the SOAP header ...
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created handlers for WLS 10 using this link
 
Squanch that. And squanch this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic