Exception when calling call.invoke()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rania_gferrag
Posted On:   Thursday, November 25, 2004 10:26 AM

I build my own webservice using Axis, and to test it I have create a class to call my server to get the information’s from the server, but while executing my TestPreferenceServiceClient class, I got exception that I past below And I tried to debug line by line the code and I found that the exception is thrown when he try to execute this statement in the PreferenceServiceSoapBindingStub.java java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2, in3, in4, in5, new java.lang.Integer(in6), new java.lang.Integer(in7)}); Please if some one have an idea what is the problem and why this exception is thrown when he call the invoke method ? what missing in my lib or configuration or in my code ?    More>>

I build my own webservice using Axis, and to test it I have create a class to call my server to get the information’s from the server, but while executing my TestPreferenceServiceClient class, I got exception that I past below

And I tried to debug line by line the code and I found that the exception is thrown when he try to execute this statement in the PreferenceServiceSoapBindingStub.java


java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2, in3, in4, in5, new java.lang.Integer(in6), new java.lang.Integer(in7)});



Please if some one have an idea what is the problem and why this exception is thrown when he call the invoke method ? what missing in my lib or configuration or in my code ?
Thanks so much in advance for any suggestion it’s really urgent matter :)




AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
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.readersdigest.preferencecenter.service.stubs.PreferenceServiceSoapBindingStub.updateUserPreferences(PreferenceServiceSoapBindingStub.java:107)
at com.readersdigest.preferencecenter.service.stubs.TestPreferenceServiceClient.main(TestPreferenceServiceClient.java:27)
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
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.readersdigest.preferencecenter.service.stubs.PreferenceServiceSoapBindingStub.updateUserPreferences(PreferenceServiceSoapBindingStub.java:107)
at com.readersdigest.preferencecenter.service.stubs.TestPreferenceServiceClient.main(TestPreferenceServiceClient.java:27)

   <<Less

Re: Exception when calling call.invoke()

Posted By:   tom_t  
Posted On:   Sunday, January 16, 2005 07:38 PM

One particular example in the axis implementation helped me with similar issues.



axissamplesfaults
Where the axis fodler is where you installed you axis distribution src, this may be different to the folder within your webapps.



Look at the source code, it pracitically provides a working example.



Pay particular attention to how the bean they are passing (Employee.java) to the client is constructed, then specified in the deploy.wsdd file (very important if you don't understand this file then you could be in for a hard time).



The last step in the client before the line of code where you go call.invoke notice that they use a Deserializer, this specifies how the XML is put back together to form your bean on the client end. This is important without this their is no way to reconstruct the bean on the client side.



Of course all this assumes that you were trying to pass a Bean in the first place. In this case pick apart the example it will help a lot. Even if you are only trying to return a basic value (int, String), this example should still give you some direction.
About | Sitemap | Contact