Hi,
I have had this problem the last week and i am really
lost. I think is a problem with the WSDL, which doesnt fit
with the request.
The classes were create using WSDL2Java from Axis2 and I
cant find where is the problem because The request looks
fine with the WSDL file.
Cheers,
Cristian.
My error is:
Exception in thread "main" org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected
subelement balance
at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
com.link.oscar.services.InvestorServiceImplStub.fromOM(InvestorServiceImplStub.java:12507)
at
com.link.oscar.services.InvestorServiceImplStub.getTransactionHistory(InvestorServiceImplStub.java:533)
at Test.main(Test.java:56)
Caused by: java.lang.Exception:
org.apache.axis2.databinding.ADBException: Unexpected
subelement balance
at
com.link.oscar.services.InvestorServiceImplStub$TransactionDetails$Factory.parse(InvestorServiceImplStub.java:6940)
at
com.link.oscar.services.InvestorServiceImplStub$GetTransactionHistoryResponse$Factory.parse(InvestorServiceImplStub.java:12162)
at
com.link.oscar.services.InvestorServiceImplStub.fromOM(InvestorServiceImplStub.java:12459)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException:
Unexpected subelement balance
at
com.link.oscar.services.InvestorServiceImplStub$TransactionDetails$Factory.parse(InvestorServiceImplStub.java:6934)
... 4 more
My WSDL file is:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://services.oscar.link.com"
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:ns1="http://org.apache.axis2/xsd"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:ax21="http://app.oscar.aprl.com.au/xsd"
xmlns:ax27="http://services.data.oscar.link.com/xsd"
xmlns:ns="http://services.oscar.link.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ax24="http://database.app.oscar.aprl.com.au/xsd">
<wsdl:types>
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://services.data.oscar.link.com/xsd">
<xs:complexType name="InvestorDetails">
<xs:sequence>
<xs:element maxOccurs="unbounded"
minOccurs="0" name="investorHoldings" nillable="true"
type="ax27:InvestorHolding"/>
<xs:element minOccurs="0"
name="investorId" nillable="true" type="xs:long"/>
<xs:element minOccurs="0"
name="investorName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="investorTypeCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="investorTypeDesc" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InvestorHolding">
<xs:sequence>
<xs:element minOccurs="0"
name="currentBalance" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="issuerName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="nbrOfUnits" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="securityCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="securityDesc" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentHistory">
<xs:sequence>
<xs:element minOccurs="0"
name="drpCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="grossAmount" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="imputationCredit" nillable="true"
type="xs:decimal"/>
<xs:element minOccurs="0"
name="netAmount" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="paymentDate" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0"
name="supplementaryAmount" nillable="true"
type="xs:decimal"/>
<xs:element minOccurs="0"
name="taxAmount" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="typeOfPayment" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="withholdingTaxAmount" nillable="true"
type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TransactionDetails">
<xs:sequence>
<xs:element minOccurs="0"
name="balance" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="tradedAmount" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0"
name="transactionDate" nillable="true"
type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://app.oscar.aprl.com.au/xsd"
xmlns:ax22="http://services.oscar.link.com">
<xs:import
namespace="http://services.oscar.link.com"/>
<xs:complexType name="ValidationException">
<xs:complexContent>
<xs:extension base="ax22:Exception">
<xs:sequence>
<xs:element minOccurs="0"
name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="BaseException">
<xs:complexContent>
<xs:extension base="ax22:Exception">
<xs:sequence>
<xs:element minOccurs="0"
name="originalThrownObject" nillable="true"
type="xs:anyType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://database.app.oscar.aprl.com.au/xsd"
xmlns:ax25="http://app.oscar.aprl.com.au/xsd">
<xs:import
namespace="http://app.oscar.aprl.com.au/xsd"/>
<xs:complexType name="DataAccessException">
<xs:complexContent>
<xs:extension
base="ax21:BaseException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://services.oscar.link.com"
xmlns:ax23="http://app.oscar.aprl.com.au/xsd"
xmlns:ax26="http://database.app.oscar.aprl.com.au/xsd"
xmlns:ax28="http://services.data.oscar.link.com/xsd">
<xs:import
namespace="http://app.oscar.aprl.com.au/xsd"/>
<xs:import
namespace="http://database.app.oscar.aprl.com.au/xsd"/>
<xs:import
namespace="http://services.data.oscar.link.com/xsd"/>
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0"
name="Exception" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ValidationException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="ValidationException" nillable="true"
type="ax21:ValidationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DataAccessException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="DataAccessException" nillable="true"
type="ax26:DataAccessException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getInvestorDetails">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="hrn" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="securityCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="fin" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name="getInvestorDetailsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="return" nillable="true"
type="ax28:InvestorDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getPaymentHistory">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="hrn" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="securityCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="fin" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name="getPaymentHistoryResponse">
<xs:complexType>
<xs:sequence>
<xs:element
maxOccurs="unbounded"
minOccurs="0" name="return" nillable="true"
type="ax28:PaymentHistory"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getTransactionHistory">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="hrn" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="securityCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0"
name="fin" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name="getTransactionHistoryResponse">
<xs:complexType>
<xs:sequence>
<xs:element
maxOccurs="unbounded"
minOccurs="0" name="return" nillable="true"
type="ax28:TransactionDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getTransactionHistoryRequest">
<wsdl:part name="parameters"
element="ns:getTransactionHistory">
</wsdl:part>
</wsdl:message>
<wsdl:message name="DataAccessException">
<wsdl:part name="parameters"
element="ns:DataAccessException">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getPaymentHistoryResponse">
<wsdl:part name="parameters"
element="ns:getPaymentHistoryResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getInvestorDetailsResponse">
<wsdl:part name="parameters"
element="ns:getInvestorDetailsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getPaymentHistoryRequest">
<wsdl:part name="parameters"
element="ns:getPaymentHistory">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ValidationException">
<wsdl:part name="parameters"
element="ns:ValidationException">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getInvestorDetailsRequest">
<wsdl:part name="parameters"
element="ns:getInvestorDetails">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getTransactionHistoryResponse">
<wsdl:part name="parameters"
element="ns:getTransactionHistoryResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="InvestorServiceImplPortType">
<wsdl:operation name="getTransactionHistory">
<wsdl:input
message="ns:getTransactionHistoryRequest"
wsaw:Action="urn:getTransactionHistory">
</wsdl:input>
<wsdl:output
message="ns:getTransactionHistoryResponse"
wsaw:Action="urn:getTransactionHistoryResponse">
</wsdl:output>
<wsdl:fault name="ValidationException"
message="ns:ValidationException"
wsaw:Action="urn:getTransactionHistoryValidationException">
</wsdl:fault>
<wsdl:fault name="DataAccessException"
message="ns:DataAccessException"
wsaw:Action="urn:getTransactionHistoryDataAccessException">
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getInvestorDetails">
<wsdl:input message="ns:getInvestorDetailsRequest"
wsaw:Action="urn:getInvestorDetails">
</wsdl:input>
<wsdl:output
message="ns:getInvestorDetailsResponse"
wsaw:Action="urn:getInvestorDetailsResponse">
</wsdl:output>
<wsdl:fault name="ValidationException"
message="ns:ValidationException"
wsaw:Action="urn:getInvestorDetailsValidationException">
</wsdl:fault>
<wsdl:fault name="DataAccessException"
message="ns:DataAccessException"
wsaw:Action="urn:getInvestorDetailsDataAccessException">
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getPaymentHistory">
<wsdl:input message="ns:getPaymentHistoryRequest"
wsaw:Action="urn:getPaymentHistory">
</wsdl:input>
<wsdl:output
message="ns:getPaymentHistoryResponse"
wsaw:Action="urn:getPaymentHistoryResponse">
</wsdl:output>
<wsdl:fault name="ValidationException"
message="ns:ValidationException"
wsaw:Action="urn:getPaymentHistoryValidationException">
</wsdl:fault>
<wsdl:fault name="DataAccessException"
message="ns:DataAccessException"
wsaw:Action="urn:getPaymentHistoryDataAccessException">
</wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InvestorServiceImplSoap11Binding"
type="ns:InvestorServiceImplPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getTransactionHistory">
<soap:operation
soapAction="urn:getTransactionHistory" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getInvestorDetails">
<soap:operation
soapAction="urn:getInvestorDetails"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getPaymentHistory">
<soap:operation soapAction="urn:getPaymentHistory"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="InvestorServiceImplHttpBinding"
type="ns:InvestorServiceImplPortType">
<http:binding verb="POST"/>
<wsdl:operation name="getTransactionHistory">
<http:operation
location="InvestorServiceImpl/getTransactionHistory"/>
<wsdl:input>
<mime:content part="getTransactionHistory"
type="text/xml"/>
</wsdl:input>
<wsdl:output>
<mime:content part="getTransactionHistory"
type="text/xml"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getInvestorDetails">
<http:operation
location="InvestorServiceImpl/getInvestorDetails"/>
<wsdl:input>
<mime:content part="getInvestorDetails"
type="text/xml"/>
</wsdl:input>
<wsdl:output>
<mime:content part="getInvestorDetails"
type="text/xml"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getPaymentHistory">
<http:operation
location="InvestorServiceImpl/getPaymentHistory"/>
<wsdl:input>
<mime:content part="getPaymentHistory"
type="text/xml"/>
</wsdl:input>
<wsdl:output>
<mime:content part="getPaymentHistory"
type="text/xml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="InvestorServiceImplSoap12Binding"
type="ns:InvestorServiceImplPortType">
<soap12:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getTransactionHistory">
<soap12:operation
soapAction="urn:getTransactionHistory" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap12:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap12:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getInvestorDetails">
<soap12:operation
soapAction="urn:getInvestorDetails" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap12:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap12:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getPaymentHistory">
<soap12:operation
soapAction="urn:getPaymentHistory" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationException">
<soap12:fault name="ValidationException"
use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataAccessException">
<soap12:fault name="DataAccessException"
use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InvestorServiceImpl">
<wsdl:port
name="InvestorServiceImplHttpSoap11EndpointExt"
binding="ns:InvestorServiceImplSoap11Binding">
<soap:address
location="http://bat-ext.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
<wsdl:port
name="InvestorServiceImplHttpSoap12Endpoint"
binding="ns:InvestorServiceImplSoap12Binding">
<soap12:address
location="http://bat.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
<wsdl:port
name="InvestorServiceImplHttpSoap12EndpointExt"
binding="ns:InvestorServiceImplSoap12Binding">
<soap12:address
location="http://bat-ext.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
<wsdl:port name="InvestorServiceImplHttpEndpoint"
binding="ns:InvestorServiceImplHttpBinding">
<http:address
location="http://bat.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
<wsdl:port name="InvestorServiceImplHttpEndpointExt"
binding="ns:InvestorServiceImplHttpBinding">
<http:address
location="http://bat-ext.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
<wsdl:port
name="InvestorServiceImplHttpSoap11Endpoint"
binding="ns:InvestorServiceImplSoap11Binding">
<soap:address
location="http://bat.linkms.com.au:80/nzoscar/services/InvestorServiceImpl"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
If I use TCPMot I got the data:
POST /nzoscar/services/InvestorServiceImpl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8;
action="urn:getTransactionHistory"
User-Agent: Axis2
Host: bat-ext.linkms.com.au:443
Transfer-Encoding: chunked
15e
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns1:getTransactionHistory
xmlns:ns1="http://services.oscar.link.com">
<ns1:hrn>F330398787</ns1:hrn>
<ns1:securityCode>IFT</ns1:securityCode>
<ns1:fin>7031</ns1:fin>
</ns1:getTransactionHistory>
</soapenv:Body>
</soapenv:Envelope>0
-----
HTTP/1.1 200 OK
Date: Fri, 06 Mar 2009 02:15:24 GMT
Server: IBM_HTTP_Server
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8;
action="urn:getTransactionHistoryResponse"
Content-Language: en
406
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<getTransactionHistoryResponse
xmlns="http://services.oscar.link.com">
<return
type="com.link.oscar.data.services.TransactionDetails">
<balance>0.00</balance>
<tradedAmount>-2000.00</tradedAmount>
<transactionDate>2000-11-26T13:00:00.000Z</transactionDate>
</return>
<return
type="com.link.oscar.data.services.TransactionDetails">
<balance>2000.00</balance>
<tradedAmount>2000.00</tradedAmount>
<transactionDate>1999-06-29T14:00:00.000Z</transactionDate>
</return>
<return
type="com.link.oscar.data.services.TransactionDetails">
<balance>0.00</balance>
<tradedAmount>-3000.00</tradedAmount>
<transactionDate>1998-08-31T14:00:00.000Z</transactionDate>
</return>
<return
type="com.link.oscar.data.services.TransactionDetails">
<balance>3000.00</balance>
<tradedAmount>3000.00</tradedAmount>
<transactionDate>1997-03-05T13:00:00.000Z</transactionDate>
</return>
</getTransactionHistoryResponse>
</soapenv:Body>
</soapenv:Envelope>0