• 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

Invoking a Handler specific to a operation in axis2

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using Axis2 for my webservices creation. I creates some handlers for my webservices.


I don't need to invoke this handler for every oprations.

How can specify it

For example for create user i will user a enp as http://localhost:8080/axis2/services/createUser
and for updateUser i will invoke http://localhost:8080/axis2/services/updateUser.
For each invokatioon hadlers must be different.
Can any one give any suggestions on this regards.
Thanks,
Narendra
 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Narendra,

Following is an excerpt taken from IBM documentation on SOAP Message Handlers using JAX-WS. As you mentioned Axis2, I presume you are using JAX-WS based web services.


To use handlers with your server application, you must set the @HandlerChain annotation on either the service endpoint interface or the endpoint implementation class, and provide the associated handler chain configuration file. Handlers for the server are only configured by setting the @HandlerChain annotation on the service endpoint implementation or the implementation class. The handler classes must be included in the server application EAR file.



For more information, check out that link.
 
Narendra Kadali
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

What you mentioned here is really not necessary anotation... . I am using axis2 framework. I have to mention it in descriptor files. How to mentione in descriptor files I dont' know.



Naren Chivukula wrote:Hi Narendra,

Following is an excerpt taken from IBM documentation on SOAP Message Handlers using JAX-WS. As you mentioned Axis2, I presume you are using JAX-WS based web services.


To use handlers with your server application, you must set the @HandlerChain annotation on either the service endpoint interface or the endpoint implementation class, and provide the associated handler chain configuration file. Handlers for the server are only configured by setting the @HandlerChain annotation on the service endpoint implementation or the implementation class. The handler classes must be included in the server application EAR file.



For more information, check out that link.

 
Naren Chivukula
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Narendra,

What you mentioned here is really not necessary anotation


But, it is same. Remember Axis2 implements JAX-WS!

I outline steps to configure SOAPHandler.

1. Write your SOAPHandler class implementing javax.xml.ws.handler.soap.SOAPHandler (unless you want to use logical handler)
2. Write handler chain configuration file and name to something like handchains.xml.

3. For simplicity, place the file in the same package as your Handler class created in step 1.
4. In your end point implementation class, point to handler chain configuration file using


That's it!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic