error in WSIF or WS? or both?
"Ly, An V" <[email protected]> Tue, 11 Apr 2006 16:09:11 -0400
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm getting a NullPointerException during an exceptional condition when
I try to invoke an Axis service.
The error points to the line marked below with >>>>, in
WSIFOperation_ApacheAxis.java:
Map faults = portTypeOperation.getFaults();
Iterator iter = faults.values().iterator();
while(iter.hasNext())
{
javax.wsdl.Fault opFault =
(javax.wsdl.Fault)iter.next();
// Assuming that there is only one part, fetch it.
javax.wsdl.Message wsdlFaultMsg =
opFault.getMessage();
Map parts = wsdlFaultMsg.getParts();
Part wsdlFaultPart =
(Part)parts.values().iterator().next();
>>>> if( wsdlFaultPart.getElementName().equals(faultQName) )
{
faultMsg.setName(
wsdlFaultMsg.getQName().getLocalPart() );
faultMsg.setObjectPart( wsdlFaultPart.getName(),
faultElement );
faultMsg.setMessageDefinition(wsdlFaultMsg);
break;
}
}
The problem seems to be that the returned element name is null.
In the debugger, the parts field of the message is a HashMap with a null
entrySet. So I'm wondering if the iterator should be checked before
doing anything?
The fault in question is decribed as follows:
<complexType name="PMServiceException">
<sequence>
<element name="errorID" nillable="true" type="soapenc:string" />
<element name="message" nillable="true" type="soapenc:string" />
</sequence>
</complexType>
...
<wsdl:message name="PMServiceException">
<wsdl:part name="fault" type="tns1:PMServiceException" />
</wsdl:message>
Did nillable throw something off here in WSIF, the WS or both?
Any ideas on what could be wrong and how to fix it?
Thank you for your help!
An