axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E. Seifert" <>
Subject newbie: "no deserializer defined for array type XYZ" exceptions
Date Sat, 15 Mar 2003 11:16:14 GMT

I'm a newbie to Axis and SOAP, so please forbear with me: I'm currently
working in project using gSOAP 2.2.3b as server and Axis 1.1 RC2 as
client. I used the wsdl file generated by gSOAP and converted it using
wsdl2java, but I ran into an problem with Axis not able to deserialize
an array of complex type data.

The gSOAP wsdl file defines the following complex types:


>   <complexType name="Property">
>    <sequence>
>     <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
>     <element name="type" type="xsd:int" minOccurs="1" maxOccurs="1"/>
>     <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
>     <element name="readOnly" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
>    </sequence>
>   </complexType>
>   <complexType name="ArrayOfProperty">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <sequence>
>       <element name="property" type="silva:Property" minOccurs="0" maxOccurs="unbounded"/>
>      </sequence>
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="silva:Property[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
>   <complexType name="Description">
>    <sequence>
>     <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
>     <element name="description" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
>     <element name="id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
>     <element name="singletree" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
>     <element name="modifying" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
>     <element name="properties" type="silva:ArrayOfProperty" minOccurs="1" maxOccurs="1"
>    </sequence>
>   </complexType>


Additionally it defines an operation to return a description:

>  <operation name="getDescriptionAvailable">
>   <documentation>Returns the description for an available object.</documentation>
>   <input message="tns:getDescriptionAvailableRequest"/>
>   <output message="tns:getDescriptionAvailableResponse"/>
>  </operation>

The only unresolved issue so far is that Axis throws an "no deserializer
defined for array type Property" when it gets the follwing SOAP code:

> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC=""
xmlns:xsi="" xmlns:xsd=""
> <SOAP-ENV:Body SOAP-ENV:encodingStyle="">
> <silva:getDescriptionAvailableResponse>
> 	<description>
> 		<name xsi:type="xsd:string">Erzeuger NeuerBestand</name>
> 		<description xsi:type="xsd:string">Eine Beschreibung</description>
> 		<id xsi:type="xsd:int">7007</id>
> 		<singletree xsi:type="xsd:boolean">true</singletree>
> 		<modifying xsi:type="xsd:boolean">false</modifying>
> 		<properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Property[9]">
> 			<property><name xsi:type="xsd:string">Key00</name>
> 				<type xsi:type="xsd:int">1</type>
> 				<value xsi:type="xsd:string">Baumart00</value>
> 				<readOnly xsi:type="xsd:boolean">false</readOnly>
> 			</property>


> 		</properties>
> 	</description>
> </silva:getDescriptionAvailableResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>

I've also tried to get the property array from a seperate SOAP operation
in order to avoid the nested array, but it had no effect. It still threw
the same exception:

> org.xml.sax.SAXException: No deserializer defined for array type Property
> 	at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(
> 	at org.apache.axis.encoding.DeserializerImpl.startElement(
> 	at org.apache.axis.encoding.DeserializationContextImpl.startElement(
> 	at org.apache.axis.message.SAX2EventRecorder.replay(
> 	at org.apache.axis.message.MessageElement.publishToHandler(
> 	at org.apache.axis.message.RPCElement.deserialize(
> 	at org.apache.axis.message.RPCElement.getParams(
> 	at org.apache.axis.client.Call.invoke(
> 	at org.apache.axis.client.Call.invoke(
> 	at org.apache.axis.client.Call.invoke(
> 	at silva.soap.Silva_wsdl.SilvaBindingStub.getDescriptionAvailableProperties(
> 	...

As I haven't found much documentation or examples so far on arrays in
Axis I would be very grateful if someone in this list could help me or
at leat point out the right direction. On the list archive I read about
similar exceptions being related to a bug (#15698). If so, is there a
workaround? Hopefully, I posted everything you need to help me.

Thanks very much in advance

View raw message