permaculture playing cards
The moose likes Web Services and the fly likes How to use Handler? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to use Handler?" Watch "How to use Handler?" New topic

How to use Handler?

James Wang
Ranch Hand

Joined: Sep 04, 2003
Posts: 102
I am a beginner of Axis,but I meet some trouble about using handler.
my deploy.wsdd file as follows:
<service xmlns:ns="" name="OrderProcessingService" provider="java:RPC">
<handler type=""/>
without the element requestFlow,my webservice is right,but with it,when invoking my webservice through my Client,the server throw very very much exception,my class file is very simple and has been compiled successfully,the file content as follows:
public class ServerHandler2 implements Handler
//static Log log =LogFactory.getLog(ServerHandler2.class.getName());
public static final String ECHOHEADER_STRING_ID = "";
public static final String HEADER_NS = "";
public static final String HEADER_REQNAME = "echoMeStringRequest";
public static final String HEADER_RESNAME = "echoMeStringResponse";
public static final String ACTOR_NEXT = "";
* Process a MessageContext.
public void invoke(MessageContext context) throws AxisFault
public void init(HandlerInfo handlerinfo)
public boolean handleRequest(MessageContext messagecontext)
return true;
public boolean handleResponse(MessageContext messagecontext)
return true;
public boolean handleFault(MessageContext messagecontext)
return true;
public void destroy()
public QName[] getHeaders()
return null;
i feel that I dont do anything,I want the reason,otherwise,when I use the example of Axis about handler,my webservice alse throws very very much exception. please help me thanks.
the exception as follows:
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSD
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDe
at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeploym
at org.apache.axis.configuration.FileProvider.getService(FileProvider.ja
at org.apache.axis.AxisEngine.getService(
at org.apache.axis.MessageContext.setTargetService(
at org.apache.axis.handlers.http.URLMapper.invoke(
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
I user Tomcat as my server,and the exception is threw by the client but not by the Tomcat server,in other words,when running the java in windows's dos.the dos window appear the exceptions.

I agree. Here's the link:
subject: How to use Handler?
It's not a secret anymore!