You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ramakrishna Soma <ra...@gmail.com> on 2006/05/28 09:49:02 UTC

Axis2: Empty Soap response

Hi

I have a web-service that returns a (complex) bean- which I created
from a schema using JaxMe.. The web-service always returns an empty
response. I have a system.out just before the return in the
web-service method and the bean prints perfectly well

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
/>
<soapenv:Body>
<ns:getRecoveryCurveResponse xmlns:ns="http://cisoft.usc.edu/iam"><return />
</ns:getRecoveryCurveResponse>
</soapenv:Body>
</soapenv:Envelope>

I have attached the wsdl file, soap request and the source for the
Java-bean as well.

As an attempt to isolate/understand the problem, I tried to
cut-n-paste the following (and the relevant pieces of) code from the
RPCUtil and BeanUtil classes:

            XMLStreamReader xr = getPullParser(r,new QName("return"));
            StAXOMBuilder stAXOMBuilder =
                    OMXMLBuilderFactory.createStAXOMBuilder(
                            OMAbstractFactory.getOMFactory(), new
StreamWrapper(xr));
            OMElement documentElement =  stAXOMBuilder.getDocumentElement();
            System.out.println(documentElement);

I get the following exception:

org.apache.axiom.om.OMException: java.lang.NullPointerException
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next
(StAXOMBuilder.java:206)
    at org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:552)
    at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElementImpl.java:562)
    at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement
(OMElementImpl.java:818)
    at org.apache.axiom.om.impl.llom.OMElementImpl.getChildElements(OMElementImpl.java:286)
(My code)    at BeanUtil.main(BeanUtil.java:400)

Caused by: java.lang.NullPointerException
    at  org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.getEventType(WrappingXMLStreamReader.java:141)
    at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java
:964)
    at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:807)
    at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next
(StAXOMBuilder.java:123)
    ... 5 more

 Hope I am not doing something stupid..
Ram