RE: error in WSIF or WS? or both?
"Jackson, Douglas" <[email protected]> Tue, 11 Apr 2006 16:21:40 -0400
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <0419C2808E620348A3119DCCE2A7A695B0F1B3@USCIMPLM004.net.plm.eds.com> |
Hi! If you use an Element rather than a type it would probably work. The code seems to be erroneous though. <element name=" PMServiceException" type=" PMServiceExceptionType"/> <complexType name="PMServiceExceptionType"> <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" element="tns1:PMServiceException" /> </wsdl:message> -Doug. ________________________________ From: Ly, An V [mailto:[email protected]] Sent: Tuesday, April 11, 2006 3:09 PM To: [email protected] Subject: error in WSIF or WS? or both? 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