This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic