Hi,
While parsing the webservice response I am getting org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement
I am using axis 1.5.1 version My WSDL, request and response Strings are as following
Request
"<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:doBillerRegistration xmlns:ns1="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration"><in0>pin</in0><in1>pinelabs</in1><in2>000000000528</in2><in3>5632547895623|9920958120</in3><in4>KK|chirag
test</in4><in5>N</in5></ns1:doBillerRegistration></soapenv:Body></soapenv:Envelope>"
Response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:doBillerRegistrationResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration">
<doBillerRegistrationResult xsi:type="xsd:string">pin<<>>pinelabs<<>>000000000528<<>>5632547895623|9920958120<<>>KK|chirag test<<>>1000046394<<>>N<<>>F<<>>200024<<>>BILLER ALREADY PRESENT.<<>></doBillerRegistrationResult>
</ns1:doBillerRegistrationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
BillerRegistrationServiceStub.DoBillerRegistration func = new BillerRegistrationServiceStub.DoBillerRegistration();
try {
} catch (Exception e) {
logger.trace(e,e);
e.printStackTrace();
throw new Exception("Marshalling failed");
}
func.setIn0("pin");
func.setIn1("pinelabs");
func.setIn2("000000000528");
func.setIn3("5632547895623|9920958120");
func.setIn4("KK|chirag test");
func.setIn5("N");
//wsdl version
//axis version
//encoded response
//look at sample response of
SOAP envelope from one of our service
BillerRegistrationServiceStub.DoBillerRegistrationResponse result = stub.doBillerRegistration(func); //getting error in this line
String responseStr = result.get_return();
wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration" xmlns:impl="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration-impl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:message name="doBillerRegistrationRequest">
<wsdl:part name="in0" type="xsd:string"/>
<wsdl:part name="in1" type="xsd:string"/>
<wsdl:part name="in2" type="xsd:string"/>
<wsdl:part name="in3" type="xsd:string"/>
<wsdl:part name="in4" type="xsd:string"/>
<wsdl:part name="in5" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="doBillerRegistrationResponse">
<wsdl:part name="return" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="BillerRegistration">
<wsdl:operation name="doBillerRegistration" parameterOrder="in0 in1 in2 in3 in4 in5">
<wsdl:input message="intf:doBillerRegistrationRequest"/>
<wsdl:output message="intf:doBillerRegistrationResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceBillerRegistrationSoapBinding" type="intf:BillerRegistration">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doBillerRegistration">
<wsdlsoap:operation soapAction=""/>
<wsdl:input>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BillerRegistrationService">
<wsdl:port name="WebServiceBillerRegistration" binding="intf:WebServiceBillerRegistrationSoapBinding">
<wsdlsoap:address location="http://121.241.242.73:8101/wsBillerReg/services/WebServiceBillerRegistration"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
kindly help to solve this issue.