axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Ghorpade <>
Subject Re: Servlet filter to retrieve username in call
Date Mon, 15 Jan 2007 03:55:08 GMT
  Hope I am not too late in responding to your query. :-)
  For the servlet filter you need to write your own class which is a  subclass of Filter and
override the doFilter method. You would also  have to enter some configuration details like
the filter class, filter  name etc in the web.xml file. If you refer to the Servlet/JSP  specification
you would be find the details there.
  Secondly if you are using an AXIS service in WebLogic then AXIS does  provide a way of intercepting
the requests before the same reaches the  Web Service. This can be achieved using the handler
mechanism.   For the handler as well you would have to code a class which would  subclass
the AXIS Handler class and its configurations would be entered  in the web.xml file. Using
the Handler would be the best approach in my  opinion for an AXIS based service. Once you
have the handler you can  retrieve the username and password from the messagecontext and do
the  verification. If authenticated then you would be forwarding the request  to the WebService
else would be returning a fault code from the Handler  itself.
  Hope that helps :-)

Espen Falkevik <> wrote:  Hi.
I'm quite new to Axis and webservices. I'm using Axis 1.4 on a weblogic 8.1 server.

I  want the user of my webservices to send a username and password to me  in their call (in
stubfiles: _call.setUsername and _call.setPassword),  and then I want to retrieve this in
the webservice methods. 

I  understood that this is possible by using a servlet filter, but I have  very little knowledge
of this. Can anyone please tell me which files  that needs to be changed and how I should
implement the changes.


Alt i én. Få Yahoo! Mail med adressekartotek, kalender og

To unsubscribe, e-mail:
For additional commands, e-mail:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
View raw message