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
package edu.usc.cisoft.iam;
public interface ReccurveType {
public interface ReccurveentryType {
public float getRecovery();
public void setRecovery(float pRecovery);
public float getOilfrac();
public void setOilfrac(float pOilfrac);
public float getSolfrac();
public void setSolfrac(float pSolfrac);
public float getGasfrac();
public void setGasfrac(float pGasfrac);
public float getWaterfrac();
public void setWaterfrac(float pWaterfrac);
}
public java.lang.String getCurvename();
public void setCurvename(java.lang.String pCurvename);
public java.util.List getReccurveentry();
}
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://cisoft.usc.edu/iam" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s1="http://cisoft.usc.edu/iam/" xmlns:s="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cisoft.usc.edu/iam"><wsdl:types><s:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cisoft.usc.edu/iam" elementFormDefault="qualified" attributeFormDefault="unqualified">
<s:import namespace="http://cisoft.usc.edu/iam/" />
<s:element name="getRecoveryCurve">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" type="s:string" name="descriptor" maxOccurs="unbounded" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getRecoveryCurveResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" ref="s1:reccurve" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema><s:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cisoft.usc.edu/iam/" elementFormDefault="qualified" attributeFormDefault="unqualified">
<s:element type="s1:reccurve" name="reccurve" />
<s:complexType name="reccurve">
<s:sequence>
<s:element minOccurs="0" type="s1:reccurveentry" name="reccurveentry" maxOccurs="unbounded" />
</s:sequence>
<s:attribute type="s:string" name="curvename" />
</s:complexType>
<s:complexType name="reccurveentry">
<s:sequence>
<s:element minOccurs="0" type="s:float" name="recovery" maxOccurs="unbounded" />
<s:element minOccurs="0" type="s:float" name="oilfrac" maxOccurs="unbounded" />
<s:element minOccurs="0" type="s:float" name="solfrac" maxOccurs="unbounded" />
<s:element minOccurs="0" type="s:float" name="gasfrac" maxOccurs="unbounded" />
<s:element minOccurs="0" type="s:float" name="waterfrac" maxOccurs="unbounded" />
</s:sequence>
</s:complexType>
</s:schema></wsdl:types><wsdl:message name="getRecoveryCurveSoapIn"><wsdl:part element="tns:getRecoveryCurve" name="part1" /></wsdl:message><wsdl:message name="getRecoveryCurveSoapOut"><wsdl:part element="tns:getRecoveryCurveResponse" name="part1" /></wsdl:message><wsdl:portType name="RecoveryCurveServicePortType"><wsdl:operation name="getRecoveryCurve"><wsdl:input message="tns:getRecoveryCurveSoapIn" /><wsdl:output message="tns:getRecoveryCurveSoapOut" /></wsdl:operation></wsdl:portType><wsdl:binding type="tns:RecoveryCurveServicePortType" name="RecoveryCurveServiceSOAP11Binding"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getRecoveryCurve"><soap:operation style="document" soapAction="http://cisoft.usc.edu/iam/getRecoveryCurve" /><wsdl:input><soap:body namespace="http://cisoft.usc.edu/iam" use="literal" /></wsdl:input><wsdl:output><soap:body namespace="http://cisoft.usc.edu/iam" use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding type="tns:RecoveryCurveServicePortType" name="RecoveryCurveServiceSOAP12Binding"><soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getRecoveryCurve"><soap12:operation style="document" soapAction="http://cisoft.usc.edu/iam/getRecoveryCurve" /><wsdl:input><soap12:body namespace="http://cisoft.usc.edu/iam" use="literal" /></wsdl:input><wsdl:output><soap12:body namespace="http://cisoft.usc.edu/iam" use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding type="tns:RecoveryCurveServicePortType" name="RecoveryCurveServiceHttpBinding"><http:binding verb="POST" /><wsdl:operation name="getRecoveryCurve"><http:operation location="getRecoveryCurve" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="RecoveryCurveService"><wsdl:port binding="tns:RecoveryCurveServiceSOAP11Binding" name="RecoveryCurveServiceSOAP11port0"><soap:address location="http://localhost:8080/axis2/services/RecoveryCurveService" /></wsdl:port><wsdl:port binding="tns:RecoveryCurveServiceSOAP12Binding" name="RecoveryCurveServiceSOAP12port0"><soap12:address location="http://localhost:8080/axis2/services/RecoveryCurveService" /></wsdl:port><wsdl:port binding="tns:RecoveryCurveServiceHttpBinding" name="RecoveryCurveServiceHttpport0"><http:address location="http://localhost:8080/axis2/rest/RecoveryCurveService" /></wsdl:port></wsdl:service></wsdl:definitions>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getRecoveryCurve xmlns="http://cisoft.usc.edu/iam">
<descriptor/>
</getRecoveryCurve>
</soap:Body>
</soap:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]