Hi
Vincenzo,
I used a Handler to solve this
problem.
I
extended the BasicHandler to do this.... here's how I did
it.
**********************************************************************************
//package in here
import java.net.InetAddress;import javax.servlet.http.HttpServletRequest;import org.apache.axis.AxisFault;import org.apache.axis.MessageContext;import org.apache.axis.handlers.BasicHandler;public class AuthHandler extends BasicHandler{ public void invoke(MessageContext msgContext) throws AxisFault{ try {HttpServletRequest req = (HttpServletRequest)msgContext.getProperty( "transport.http.servletRequest");String host = req.getRemoteHost(); String host2 = InetAddress.getByName(host).getHostName(); System.out.println( "host2 "+host2);} catch( Exception exp ){ System.out.println( "error"); throw AxisFault.makeFault( exp );} } }
*********************************************************************************************** you need to add a few lines to the deploy.wsdd
<requestFlow> <handler type="java:(PACKAGE DESCRIPTION IN HERE)AuthHandler"/> </requestFlow>
make sure they are inside the service and deployment tags Regards, John
|
- Re: Problem with web services Farrelly, John J
- Re: Problem with web services Vincenzo Di Stefano
- RE: Problem with web services Pathak, Sanjesh
- Re: Problem with web services Vincenzo Di Stefano