Hi I try to deploy a service but i'm stuck halfways. I have written a small service that takes a javabean (Album) as input and returns an array of the same bean (Album[]) as output, I can call my service with a bean-parameter but when I return the array I get a ClassCastException. I think my problem is that i have to descibe the returning Array as well, but i don't know how
the method in my service looks like : public Album[] getAlbums( Album anAlbum ) { wsdd-file: <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:album="http://www.soapinterop.org/Album"> <service name="Album" provider="java:RPC"> <namespace>http://www.soapinterop.org/Album</namespace> <parameter name="className" value="com.nice.service.AlbumService"/> <parameter name="allowedMethods" value="getAlbums"/> </service> <beanMapping qname="album:Album" languageSpecificType="java:company.beans.Album"/> </deployment> Extact from client-code: Album[] result = new Album[0]; call.removeAllParameters(); call.setTargetEndpointAddress(endpointURL); call.setUseSOAPAction(true); call.setSOAPActionURI("http://www.soapinterop.org/Album"); QName albumqn = new QName("http://www.soapinterop.org/Album", "Album"); Class cls = Album.class; call.registerTypeMapping(cls, albumqn, BeanSerializerFactory.class, BeanDeserializerFactory.class); call.setOperationName( new QName("http://www.soapinterop.org/Album", "getAlbums" )); QName albumRetqn = new QName("http://www.soapinterop.org/Album","ArrayOfAlbum"); call.registerTypeMapping(result.getClass(), albumRetqn, ArraySerializerFactory.class, ArrayDeserializerFactory.class); call.addParameter( "anAlbum", albumqn, ParameterMode.IN ); call.setReturnType(albumRetqn); //invoking the call return in a ClassCastException Object ret = call.invoke(new Object[] { anAlbum }); regards /Håkan