PDA

View Full Version : Pls give an example of how to register an array as return type in BeanMappingServiceP



dorel
Nov 22nd, 2005, 03:01 AM
Hi there, I have these mappings in server-config.wsdd:

<typeMapping
xmlns:ns="http://domain.com"
qname="ns:Location"
type="java:com.domain.Location"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFacto ry"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>

<arrayMapping
xmlns:ns="urn:dWebServices"
qname="ns:ArrayOf_tns2_Location"
type="java:com.domain.Location[]"
innerType="cmp-ns:Location" xmlns:cmp-ns="http://domain.com"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>

The method in the Service class interface is

Location[] getAllLocations();

No matter how I try to map the Location[].class into the BeanMappingServicePostProcessor Axis it will throw a class cast exception, and I suspect this is a namespace/ BeanMappingServicePostProcessor mapping problem. Can anybody point me at an example or maybe provide some hints ?

Thanks