HTH,
Robert
http://www.braziloutsource.com/
On 4/24/06, Siamak Haschemi <[EMAIL PROTECTED]
> wrote:
Hello to all.
I posted this failure in the user-list but nobody responses, so I'll try
to reach the developers because it seems like a bug.
I generated with the attached WSDL file the serverside and the
clientside code.
The reqiest from the Client is:
<?xml version="1.0" encoding=" http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ ">
<soapenv:Header/>
<soapenv:Body>
<saveProductRequest xmlns="http://haschemi.org/shop/common">
<product amount="11.0 " amountUnit="kg" calorificValue="15000"
dateOfExpiry="2006-04-24+02:00" description="Tolles Brot mit tollen
Eigenschaften...." fromTemperatureRange="-15.0" name="Hagen Brot"
toTemperatureRange="30.0"/>
</saveProductRequest>
</soapenv:Body>
</soapenv:Envelope>
In the Server Skeleton I throw a Exception:
public SaveProductResponseDocument
saveProduct(SaveProductRequestDocument param1) OperationException {
final OperationException exception = new OperationException();
final ExceptionMessageDocument exceptionMessageDocument =
ExceptionMessageDocument.Factory.newInstance ();
final ExceptionMessage exceptionMessage =
exceptionMessageDocument.addNewExceptionMessage();
final LocalizedMessage localizedMessage =
exceptionMessage.addNewLocalizedMessage();
localizedMessage.setLanguage (LocalizedMessage.Language.DE_DE);
localizedMessage.setMessage("Fehlerbescrhreibung");
exception.setFaultMessage(exceptionMessageDocument);
throw exception;
}
And the response is:
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>OperationException</faultstring>
<detail>
<exceptionMessage xmlns="http://haschemi.org/shop/common">
<localizedMessage language="de_DE" message="Fehlerbescrhreibung"/>
</exceptionMessage>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The client receives the response and throws:
org.apache.axiom.om.OMException : java.lang.NullPointerException
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:207)
at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:263)
at
org.apache.axiom.om.impl.traverse.OMChildrenIterator.next(OMChildrenIterator.java:111)
at
org.apache.axiom.soap.impl.llom.SOAPFaultImpl.getChildWithName(SOAPFaultImpl.java:187)
at
org.apache.axiom.soap.impl.llom.SOAPFaultImpl.getNode (SOAPFaultImpl.java:119)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:286)
at org.apache.axis2.CareStub.saveProduct(CareStub.java:277)
at Client.main(Client.java :53)
Caused by: java.lang.NullPointerException
at
org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes(SOAPBuilderHelper.java:90)
at
org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.handleEvent (SOAP11BuilderHelper.java:146)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:310)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement (StAXSOAPModelBuilder.java:177)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:133)
... 7 more
So, did I something wrong?
Is there a miskate in the WSDL-file?
Thanks for the help
Siamak Haschemi
