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 Van Den Eynde Tom <To...@realsoftware.be> on 2004/09/28 15:53:14 UTC
axis deserialization problem
Hi,
Ik try to write a client that consumes a webservice. I use axis for
that. With WSDL2Java I produced myself a couple of classes to use at the
client-side. The WSDL can be found at
http://webservice.yesco.nl/ws_bedrijven/ws_bedrijven.php?wsdl. Due to
the fact that there is an IP-check you will not be able to see it so at
the end of this message you find a copy. When I invoke the first method
of the webservice, the people at the server-side see my request. They
produce the answer and that's where it goes wrong. It seems to be that
axis is unable to deserialize the answer as I get the following error:
org.xml.sax.SAXException: Bad types (class [Ljava.lang.Object; -> class
datadirect.staticclient.SearchOrganizationResult)
at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:311)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2272)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
datadirect.staticclient.Yesco_Webservice_Bedrijven_BindingStub.searchOrg
anization(Yesco_Webservice_Bedrijven_BindingStub.java:269)
at
datadirect.staticclient.MyDataDirectClient.main(MyDataDirectClient.java:
76)
As I promised you, here is the WSDL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="http://webservice.yesco.nl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://webservice.yesco.nl">
<types>
<xsd:schema targetNamespace="http://webservice.yesco.nl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
<xsd:complexType name="usernameToken">
<xsd:all>
<xsd:element name="username" type="xsd:string"/>
<xsd:element name="password" type="xsd:string"/>
<xsd:element name="nonce" type="xsd:string"/>
<xsd:element name="created" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="searchOrganizationRequest">
<xsd:all>
<xsd:element name="usernameToken" type="tns:usernameToken"/>
<xsd:element name="profile" type="xsd:int"/>
<xsd:element name="organizationName" type="xsd:string"/>
<xsd:element name="organizationCity" type="xsd:string"/>
<xsd:element name="organizationZipcode" type="xsd:string"/>
<xsd:element name="organizationAddressNumber" type="xsd:int"/>
<xsd:element name="organizationCountryCode" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="searchOrganizationResult_organization">
<xsd:all>
<xsd:element name="wsbkey" type="xsd:int"/>
<xsd:element name="naam" type="xsd:string"/>
<xsd:element name="postcode" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="searchOrganizationResult_organizations">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="tns:searchOrganizationResult_organization[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="searchOrganizationResult_alternativeCity">
<xsd:all>
<xsd:element name="woonplaats" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="searchOrganizationResult_alternativeCities">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="tns:searchOrganizationResult_alternativeCity[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="searchOrganizationResult">
<xsd:all>
<xsd:element name="resultCode" type="xsd:int"/>
<xsd:element name="resultMessage" type="xsd:string"/>
<xsd:element name="errorCode" type="xsd:int"/>
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="organizations"
type="tns:searchOrganizationResult_organizations"/>
<xsd:element name="alternativeCities"
type="tns:searchOrganizationResult_alternativeCities"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="getOrganizationRequest">
<xsd:all>
<xsd:element name="usernameToken" type="tns:usernameToken"/>
<xsd:element name="profile" type="xsd:int"/>
<xsd:element name="wsbKey" type="xsd:int"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="getOrganizationResult_result">
<xsd:all>
<xsd:element name="wsbkey" type="xsd:int"/>
<xsd:element name="naam" type="xsd:string"/>
<xsd:element name="straatnaam" type="xsd:string"/>
<xsd:element name="huisnummer" type="xsd:string"/>
<xsd:element name="toevoeging" type="xsd:string"/>
<xsd:element name="postcode" type="xsd:string"/>
<xsd:element name="woonplaats" type="xsd:string"/>
<xsd:element name="telefoonnummer" type="xsd:string"/>
<xsd:element name="faxnummer" type="xsd:string"/>
<xsd:element name="emailadres" type="xsd:string"/>
<xsd:element name="internetadres" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="getOrganizationResult_results">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="tns:getOrganizationResult_result[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="getOrganizationResult">
<xsd:all>
<xsd:element name="usernameToken" type="tns:usernameToken"/>
<xsd:element name="requestHandler" type="xsd:string"/>
<xsd:element name="resultCode" type="xsd:int"/>
<xsd:element name="resultMessage" type="xsd:string"/>
<xsd:element name="errorCode" type="xsd:int"/>
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="result" type="tns:getOrganizationResult_results"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="manualInput">
<xsd:all>
<xsd:element name="usernameToken" type="tns:usernameToken"/>
<xsd:element name="naam" type="xsd:string"/>
<xsd:element name="straatnaam" type="xsd:string"/>
<xsd:element name="huisnummer" type="xsd:string"/>
<xsd:element name="toevoeging" type="xsd:string"/>
<xsd:element name="postcode" type="xsd:string"/>
<xsd:element name="woonplaats" type="xsd:string"/>
<xsd:element name="telefoonnummer" type="xsd:string"/>
<xsd:element name="faxnummer" type="xsd:string"/>
<xsd:element name="emailadres" type="xsd:string"/>
<xsd:element name="internetadres" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="manualInputResult_data">
<xsd:all>
<xsd:element name="naam" type="xsd:string"/>
<xsd:element name="straatnaam" type="xsd:string"/>
<xsd:element name="huisnummer" type="xsd:string"/>
<xsd:element name="toevoeging" type="xsd:string"/>
<xsd:element name="postcode" type="xsd:string"/>
<xsd:element name="woonplaats" type="xsd:string"/>
<xsd:element name="telefoonnummer" type="xsd:string"/>
<xsd:element name="faxnummer" type="xsd:string"/>
<xsd:element name="emailadres" type="xsd:string"/>
<xsd:element name="internetadres" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="manualInputResult_dataArray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="tns:manualInputResult_data[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="manualInputResult_comments">
<xsd:all>
<xsd:element name="requestHandler" type="xsd:string"/>
<xsd:element name="naam" type="xsd:string"/>
<xsd:element name="straatnaam" type="xsd:string"/>
<xsd:element name="huisnummer" type="xsd:string"/>
<xsd:element name="toevoeging" type="xsd:string"/>
<xsd:element name="postcode" type="xsd:string"/>
<xsd:element name="woonplaats" type="xsd:string"/>
<xsd:element name="telefoonnummer" type="xsd:string"/>
<xsd:element name="faxnummer" type="xsd:string"/>
<xsd:element name="emailadres" type="xsd:string"/>
<xsd:element name="internetadres" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="manualInputResult_commentsArray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="tns:manualInputResult_comments[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="manualInputResult">
<xsd:all>
<xsd:element name="errorCode" type="xsd:int"/>
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="data" type="tns:manualInputResult_dataArray"/>
<xsd:element name="comments"
type="tns:manualInputResult_commentsArray"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="searchOrganizationRequest">
<part name="request" type="tns:searchOrganizationRequest" />
</message>
<message name="searchOrganizationResponse">
<part name="return" type="tns:searchOrganizationResult" />
</message>
<message name="getOrganizationRequest">
<part name="request" type="tns:getOrganizationRequest" />
</message>
<message name="getOrganizationResponse">
<part name="return" type="tns:getOrganizationResult" />
</message>
<message name="manualInputRequest">
<part name="request" type="tns:manualInput" />
</message>
<message name="manualInputResponse">
<part name="return" type="tns:manualInputResult" />
</message>
<portType name="Yesco_Webservice_BedrijvenPortType">
<operation name="searchOrganization">
<documentation>searchOrganization; This operation is used to search
for organizations in the database.</documentation>
<input message="tns:searchOrganizationRequest"/>
<output message="tns:searchOrganizationResponse"/>
</operation>
<operation name="getOrganization">
<documentation>getOrganization; This operation is used to retrieve the
organizations found by the searchOrganization operation.</documentation>
<input message="tns:getOrganizationRequest"/>
<output message="tns:getOrganizationResponse"/>
</operation>
<operation name="manualInput">
<documentation>manualInput; When an organisation can't be found with
the searchOrganization operation, and the client allows the user to use
manual input, the user's input can be validated with this
operation.</documentation>
<input message="tns:manualInputRequest"/>
<output message="tns:manualInputResponse"/>
</operation>
</portType>
<binding name="Yesco_Webservice_BedrijvenBinding"
type="tns:Yesco_Webservice_BedrijvenPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="searchOrganization">
<soap:operation
soapAction="http://webservice.yesco.nl/ws_bedrijven/ws_bedrijven.php/sea
rchOrganization" style="rpc"/>
<input>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="getOrganization">
<soap:operation
soapAction="http://webservice.yesco.nl/ws_bedrijven/ws_bedrijven.php/get
Organization" style="rpc"/>
<input>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="manualInput">
<soap:operation
soapAction="http://webservice.yesco.nl/ws_bedrijven/ws_bedrijven.php/man
ualInput" style="rpc"/>
<input>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://webservice.yesco.nl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="Yesco_Webservice_Bedrijven">
<port name="Yesco_Webservice_BedrijvenPort"
binding="tns:Yesco_Webservice_BedrijvenBinding">
<soap:address
location="http://webservice.yesco.nl/ws_bedrijven/ws_bedrijven.php"/>
</port>
</service>
</definitions>
thx in advance