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 Cristian Maluenda <cr...@zodal.net> on 2009/03/06 03:55:42 UTC
Unexpected subelement
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
Re: sql.Date gets converted to Util.Calendar in the denerated Stub
Posted by Andreas Veithen <an...@gmail.com>.
If the server specifies the timezone information in the dateTime field
(this is not required, but recommended), than the field identifies a
precise moment in time and there is no ambiguity whatsoever.
Andreas
On Mon, Mar 9, 2009 at 10:05, Vincent FINET <vf...@sqli.com> wrote:
> Hi,
>
> Using Calendar might be an issue if the server and the client are not
> using the same time zone. At least that was the case in Axis 1.1
>
> Say the server is set to GMT and the client to GMT+1.
> If the server sends for example 01/01/2009 10:20:11, the client will
> receive 01/01/2009 11:20:11. Here the date do not change so you might
> think it's still ok... But what if the server send 01/01/2009
> 23:20:11...? the client will receive 02/01/2009 00:20:11.
>
> If you dont want that, you may consider sending string instead.
> unless that was corrected (if considered as a bug) in further releases...
>
> Best regards,
> Vincent Finet
>
>
> On Mon, Mar 9, 2009 at 8:40 AM, Sagara Gunathunga
> <sa...@gmail.com> wrote:
>> Hi Kumar,
>> I think default ADB data binding behaviour map xs:dateTime into
>> java.util.Calendar , but this is not a issue , can you post your
>> service class and the client code segment to see how you pass
>> java.util.Calendar instance to stub method ?
>>
>> usually you can pass a date in the client side as follows
>>
>> //req is a instance of the generated request class
>> HelloService req=new HelloService();
>> //create a date instance with the value
>> Date date=..............................................
>> Calendar calendar=new GregorianCalendar();
>> calendar.setTime(date);
>> req.setDate(calendar);
>>
>> If you not specify any date to Calendar ,by default it will pick up
>> current system time .
>>
>> Thanks ,
>>
>>
>> On Mon, Mar 9, 2009 at 12:18 PM, <ku...@wipro.com> wrote:
>>> Hi,
>>>
>>> we are creating a WebService (Axis2) using Code first approach.
>>> we have created a Request class, response class and a Operation Class with the function to be exposed to client.
>>>
>>> the Request class has a Date Field...
>>> We try declaring the Date Field as java.sql.Date / java.util.Date , but when we generate WSDL and Stubs it getting mapped to java.util.Calendar..
>>>
>>> hence We are facing a problem. we generated Client stubs and passed the Calendar instance to the Service, but the
>>> Calendar instance is giving the current Date and time and not the passed input value.
>>>
>>> Any inputs on this would be of great help.
>>>
>>> thanks in advance
>>> Kumar
>>>
>>> Please do not print this email unless it is absolutely necessary.
>>>
>>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>>>
>>> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>>>
>>> www.wipro.com
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://sagaras.awardspace.com/
>>
>>
>
Re: sql.Date gets converted to Util.Calendar in the denerated Stub
Posted by Vincent FINET <vf...@sqli.com>.
Hi,
Using Calendar might be an issue if the server and the client are not
using the same time zone. At least that was the case in Axis 1.1
Say the server is set to GMT and the client to GMT+1.
If the server sends for example 01/01/2009 10:20:11, the client will
receive 01/01/2009 11:20:11. Here the date do not change so you might
think it's still ok... But what if the server send 01/01/2009
23:20:11...? the client will receive 02/01/2009 00:20:11.
If you dont want that, you may consider sending string instead.
unless that was corrected (if considered as a bug) in further releases...
Best regards,
Vincent Finet
On Mon, Mar 9, 2009 at 8:40 AM, Sagara Gunathunga
<sa...@gmail.com> wrote:
> Hi Kumar,
> I think default ADB data binding behaviour map xs:dateTime into
> java.util.Calendar , but this is not a issue , can you post your
> service class and the client code segment to see how you pass
> java.util.Calendar instance to stub method ?
>
> usually you can pass a date in the client side as follows
>
> //req is a instance of the generated request class
> HelloService req=new HelloService();
> //create a date instance with the value
> Date date=..............................................
> Calendar calendar=new GregorianCalendar();
> calendar.setTime(date);
> req.setDate(calendar);
>
> If you not specify any date to Calendar ,by default it will pick up
> current system time .
>
> Thanks ,
>
>
> On Mon, Mar 9, 2009 at 12:18 PM, <ku...@wipro.com> wrote:
>> Hi,
>>
>> we are creating a WebService (Axis2) using Code first approach.
>> we have created a Request class, response class and a Operation Class with the function to be exposed to client.
>>
>> the Request class has a Date Field...
>> We try declaring the Date Field as java.sql.Date / java.util.Date , but when we generate WSDL and Stubs it getting mapped to java.util.Calendar..
>>
>> hence We are facing a problem. we generated Client stubs and passed the Calendar instance to the Service, but the
>> Calendar instance is giving the current Date and time and not the passed input value.
>>
>> Any inputs on this would be of great help.
>>
>> thanks in advance
>> Kumar
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>>
>> www.wipro.com
>>
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://sagaras.awardspace.com/
>
>
Re: sql.Date gets converted to Util.Calendar in the denerated Stub
Posted by Sagara Gunathunga <sa...@gmail.com>.
Hi Kumar,
I think default ADB data binding behaviour map xs:dateTime into
java.util.Calendar , but this is not a issue , can you post your
service class and the client code segment to see how you pass
java.util.Calendar instance to stub method ?
usually you can pass a date in the client side as follows
//req is a instance of the generated request class
HelloService req=new HelloService();
//create a date instance with the value
Date date=..............................................
Calendar calendar=new GregorianCalendar();
calendar.setTime(date);
req.setDate(calendar);
If you not specify any date to Calendar ,by default it will pick up
current system time .
Thanks ,
On Mon, Mar 9, 2009 at 12:18 PM, <ku...@wipro.com> wrote:
> Hi,
>
> we are creating a WebService (Axis2) using Code first approach.
> we have created a Request class, response class and a Operation Class with the function to be exposed to client.
>
> the Request class has a Date Field...
> We try declaring the Date Field as java.sql.Date / java.util.Date , but when we generate WSDL and Stubs it getting mapped to java.util.Calendar..
>
> hence We are facing a problem. we generated Client stubs and passed the Calendar instance to the Service, but the
> Calendar instance is giving the current Date and time and not the passed input value.
>
> Any inputs on this would be of great help.
>
> thanks in advance
> Kumar
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
>
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/
sql.Date gets converted to Util.Calendar in the denerated Stub
Posted by ku...@wipro.com.
Hi,
we are creating a WebService (Axis2) using Code first approach.
we have created a Request class, response class and a Operation Class with the function to be exposed to client.
the Request class has a Date Field...
We try declaring the Date Field as java.sql.Date / java.util.Date , but when we generate WSDL and Stubs it getting mapped to java.util.Calendar..
hence We are facing a problem. we generated Client stubs and passed the Calendar instance to the Service, but the
Calendar instance is giving the current Date and time and not the passed input value.
Any inputs on this would be of great help.
thanks in advance
Kumar
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
Re: Unexpected subelement
Posted by Cristian Maluenda <cr...@zodal.net>.
Thx for the help, but I am still lost. I know is a schema
problem but I dont understand too much about It. I am
reading about that for try to figure out my problem which
has been annoying the last week.
I dont know what else I could do, I am trying to use JiBX
for create the client (Not ADB).
cheers,
Cristian
On Fri, 6 Mar 2009 11:32:05 +0530
keith chapman <ke...@gmail.com> wrote:
> Hi,
>
> Did you have a look at [1]. That explains why this
>exception occurs.
>
> Thanks,
> Keith.
>
> [1]
>http://www.keith-chapman.org/2009/02/axis2-adbexception-unexpected.html
>
> On Fri, Mar 6, 2009 at 8:25 AM, Cristian Maluenda
><cr...@zodal.net>wrote:
>
>> 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
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
Re: Unexpected subelement
Posted by Cristian Maluenda <cr...@zodal.net>.
So, It is that I though but I am lost. I dont know too
much about schemas and I think my problem could be the
namespace. I am going to do some test and I will be what
happens.
Cheers,
Cristian.
On Fri, 6 Mar 2009 11:32:05 +0530
keith chapman <ke...@gmail.com> wrote:
> Hi,
>
> Did you have a look at [1]. That explains why this
>exception occurs.
>
> Thanks,
> Keith.
>
> [1]
>http://www.keith-chapman.org/2009/02/axis2-adbexception-unexpected.html
>
> On Fri, Mar 6, 2009 at 8:25 AM, Cristian Maluenda
><cr...@zodal.net>wrote:
>
>> 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
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
Re: Unexpected subelement
Posted by ibrahim demir <ib...@yahoo.com>.
Hi;
The blog explains why the exception occurs. The response coming from the server is different than what u excepect. You could regenerate the client code with the final wsdl. Than test it again.
It is hard to overcome this problem if your server response changes.
There are some tricks to absorbe the exception but thisis not a recommanded way.
There is an explaination here: http://markmail.org/message/mrdxnzbulo2vflm2
Yours.
Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org
________________________________
From: keith chapman <ke...@gmail.com>
To: axis-user@ws.apache.org
Sent: Friday, March 6, 2009 8:02:05 AM
Subject: Re: Unexpected subelement
Hi,
Did you have a look at [1]. That explains why this exception occurs.
Thanks,
Keith.
[1] http://www.keith-chapman.org/2009/02/axis2-adbexception-unexpected.html
On Fri, Mar 6, 2009 at 8:25 AM, Cristian Maluenda <cr...@zodal.net> wrote:
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
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
Re: Unexpected subelement
Posted by keith chapman <ke...@gmail.com>.
Hi,
Did you have a look at [1]. That explains why this exception occurs.
Thanks,
Keith.
[1] http://www.keith-chapman.org/2009/02/axis2-adbexception-unexpected.html
On Fri, Mar 6, 2009 at 8:25 AM, Cristian Maluenda <cr...@zodal.net>wrote:
> 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
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org