Ok, i got past the NullPointerException. Its seems like i was missing the
keyword type in the 
<handler name="Simple" type="java:mf.ors.client.SimpleHandler"/>
After fixing that i get the following error:-
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.apache.axis.ConfigurationException:
java.lang.ClassCastException
java.lang.ClassCastException
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableIte
m.java:338)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.j
ava:310)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:
296)
        at
org.apache.axis.deployment.wsdd.WSDDDeployment.getHandler(WSDDDeployment.java:
455)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.j
ava:312)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:
296)
        at
org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:164)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.j
ava:310)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:
296)
        at 
org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:
531)
        at
org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:294)
        at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:304)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:166)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at 
com.micros.webservices.og._4_2.Name_wsdl.NameServiceSoapStub.newProfile(NameServiceSoa
pStub.java:739)
        at mf.ors.client.ORSClient.insertProfile(ORSClient.java:186)
        at mf.ors.client.ORSClient.main(ORSClient.java:59)



I defined a simple Handler class and tried to set up the handler in the
client-config.wsdd file. 
I am using the following client-config.wsdd file
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apac
he.org/axis/wsdd/providers/java">
<handler name="Simple" type="mf.ors.client.SimpleHandler"/>
<!--globalConfiguration>
<requestFlow> <handler type="Simple"/> </requestFlow>
</globalConfiguration-->
<service name="NameService">
<requestFlow> <handler type="Simple"/> </requestFlow>
</service>
 <transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender"/>
 <transport name="java"
pivot="java:org.apache.axis.transport.java.JavaSender"/>
 <transport name="local"
pivot="java:org.apache.axis.transport.local.LocalSender"/>
</deployment>

When i try to execute the SOAP client i get the following exception :
Exception in thread "main" java.lang.NullPointerException
        at org.apache.axis.client.Stub.extractAttachments(Stub.java:331)
        at 
com.micros.webservices.og._4_2.Name_wsdl.NameServiceSoapStub.newProfile(NameServiceSoa
pStub.java:745)
        at mf.ors.client.ORSClient.insertProfile(ORSClient.java:186)
        at mf.ors.client.ORSClient.main(ORSClient.java:59)


Any clues?


You can setup client side handlers in client-config.wsdd.  Just place it 
on your clients classpath.
  --m


Kapil Khanna wrote:

>I am consuming an external web service and am trying to get a handle to the 
>MessageContext via MessageContext.getCurrentContext(). Unfortunately the
>MessageContext  i 
>get is always null.
>The purpose of getting to the MessageContext is to get to the SOAPRequest
and
>SOAPResponse 
>messages. There have been numerous posts regarding this but i have not seen
>any concrete 
>solution. I have heard about Handlers. My question is how do i configure a
>Handler, cause i am 
>running AXIS outside a web container, i.e from command line?
>Per the users guide, handlers have been setup for a web service that is
>running in the axis 
>server.
>Thanks.
>
>
>
>  
>





Reply via email to