aspose file tools*
The moose likes Web Services and the fly likes Illegal Argument exception while consuming WS using Axis generated Stubs (using WSDL2Java task) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Illegal Argument exception while consuming WS using Axis generated Stubs (using WSDL2Java task)" Watch "Illegal Argument exception while consuming WS using Axis generated Stubs (using WSDL2Java task)" New topic
Author

Illegal Argument exception while consuming WS using Axis generated Stubs (using WSDL2Java task)

Tirupathi rao
Greenhorn

Joined: Dec 19, 2009
Posts: 4
Hello All,

I am consuming WebService implemented using .Net framework, using stubs generated from WSDL using Axis WSDL2Java task.
while consuming Axis throwing java.lang.NullPointer exception, I downloaded axis code the debug through it noticed it is
java.lang.IllegalArgument exception from org.apache.axis.encoding.ser.BeanPropertyTarget class in set(Object value)
at line 77 pd.set(object, index, value),

Intereseted point here same WebService are deployed in 3 servers, if we ran our client against one server it is working fine
ended up with succesful result,but from other two servers encountering above exception explained in previous paragraph.And also
we wath the HttpResponse from TCP/IP monitor all 3 server sending same HTTP response including SOAP Enovelpe, what I noticed while
debugging Axis in org.apache.axis.encoding.DeserializerImpl class method valueComplete () target size is zero for successful case,
3 for failure case below is the axis code snippet

public void valueComplete() throws SAXException
{
if (componentsReady()) {
if (targets != null) {
for (int i = 0; i < targets.size(); i++) {
Target target = (Target) targets.get(i);
target.set(value);
if (debugEnabled) {
log.debug(Messages.getMessage("setValueInTarget00",
"" + value, "" + target));
}
}
// Don't need targets any more, so clear them
removeValueTargets();
}
}
}

Below are the exception in log in failure case

org.apache.axis.client.Call__Exception:
java.lang.NullPointerException
at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:135)
at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)


<XXXXResponse isDuplicate="false" isMemberValid="true" xmlns="urn:messageTypes.zzzzz.webservices.aaa.com">
<successfulSubmission isPending="true" authorizationId="774" pendingReason="Timeout" status=" success">
<results>
<details id="774" externalId="">
<service id="283" externalId="" xmlns="urn:types.zzzzz.webservices.aaa.com">
<identification id="292" externalId="" status="2" statusVerbose="Pending Approval" />
</service>
</details>
</results>
</successfulSubmission>
</XXXXResponse>


Any help would be appreciated

Thanks for your support
 
wood burning stoves
 
subject: Illegal Argument exception while consuming WS using Axis generated Stubs (using WSDL2Java task)