Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes problem in implementing SOAPHandler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem in implementing SOAPHandler" Watch "problem in implementing SOAPHandler" New topic
Author

problem in implementing SOAPHandler

Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
I have created one soap handler and a web service .


Now I want to understand how this will handler methods will be called , I mean what I have to do to call this handler so that header will be populated in the SOAP i/o XML?

At least I want to print the sysout .
Please help.
Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
Okay here is the problem in more detail .

I want to secure my web service using a userid and password .I do not want to pass the user id and password each time with the method .So I decided to pass this credential through soap header .
Now I have learned that I need to do it by some SOAPHandler and I need to explore here . Please help .
Jim Baiter
Ranch Hand

Joined: Jan 05, 2001
Posts: 532
Wouldn't you want to use WS-Security for something like this? See this article


Monoj Roy wrote:Okay here is the problem in more detail .

I want to secure my web service using a userid and password .I do not want to pass the user id and password each time with the method .So I decided to pass this credential through soap header .
Now I have learned that I need to do it by some SOAPHandler and I need to explore here . Please help .
Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
Thanks Jim for your response . I actually wanted to learn this concept of SOAPHandler using a simple step POC application .
By the way I googled a lot and find I need to create a xml file and need to give a reference of it in the Webservice using
@HandlerChain (file=http://localhost///soapHandler.xml)

I am using JAX-WS to generate the stubs but no luck ..My handler is not invoking ..
Please help .


Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
I tried with putting the file in WEB-INF/classes but no luck .
Can any help me where exactly I need to put this file so that the handler class that is secified in the xml will be get called .
@HandlerChain (file=http://localhost//../soapHandler.xml)
@HandlerChain (file=C:\..\WEBINF\classes\soapHandler.xml)
are above systex correct I tried both of them .



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in implementing SOAPHandler
 
Similar Threads
JAX-RPC web service soap message handler issues
Invoking a Handler specific to a operation in axis2
need to add namespace ns2: in the all webservices response tags.
How to extract the exception that caused a SOAP fault
Order of SOAP Handler call in JAX-WS