[ 
http://issues.apache.org/jira/browse/AXIS2-616?page=comments#action_12376690 ] 

Siamak Haschemi commented on AXIS2-616:
---------------------------------------

Hello dims,

replacing getXMLStreamReaderWithoutCaching with getXMLStreamReader inside works 
for me.

Surprisingly another problem has been solved by the change:

Although I specified the minOccur="0" in some elements of my WSDL-file the 
Client throws an Exception when the servers response doesn't contain any 
element.
This behaviour has been changed by applying the above changes.


Thank you for your great support,

Siamak

> NullPointerException while receiving Fault from Server
> ------------------------------------------------------
>
>          Key: AXIS2-616
>          URL: http://issues.apache.org/jira/browse/AXIS2-616
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: databinding
>  Environment: Windows XP Home
> java version "1.5.0_06"
> tomcat 5.5.16
> Axis2 SVN of 2005-04-24
>     Reporter: Siamak Haschemi
>     Assignee: Ajith Harshana Ranabahu
>  Attachments: Client.java, FaultSkeleton.java, fault.wsdl, services.xml
>
> I created a simple WSDL contailing a Operation with a Reqest, Reponse and a 
> Failure. Then I create the serverside Skeleton with WSDL2Java and modified 
> the Skeleton to throw the Exception.
> I also used WSDl2Java for the Client Stub.  
> The Client calls the server and the server responds. But the parsing of the 
> server's response (including a Exception) fails with
> Exception in thread "main" java.lang.RuntimeException: Data binding error
>       at org.apache.axis2.FaultStub.fromOM(FaultStub.java:372)
>       at org.apache.axis2.FaultStub.getProduct(FaultStub.java:145)
>       at Client.main(Client.java:16)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.xmlbeans.impl.store.Cur$CurLoadContext.finish(Cur.java:3184)
>       at 
> org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1216)
>       at 
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)
>       at 
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
>       at 
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
>       at 
> org.haschemi.www.fault.GetProductFaultDocument$Factory.parse(GetProductFaultDocument.java:88)
>       at org.apache.axis2.FaultStub.fromOM(FaultStub.java:367)
>       ... 2 more
> The reqest and the response:
> <?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>
>     <getProductRequest 
> xmlns="http://www.haschemi.org/fault/";>Test</getProductRequest>
>   </soapenv:Body>
> </soapenv:Envelope>
> <?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>GetProductFaultException</faultstring>
>         <detail>
>           <getProductFault xmlns="http://www.haschemi.org/fault/";>Dicker 
> Fehler!</getProductFault>
>         </detail>
>     </soapenv:Fault>
>   </soapenv:Body>
> </soapenv:Envelope>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to