Hi everybody I have a problem to do a service metho that return a ArrayList of Beans. I found a lot of people on the net with the same problem but everybody without solution for it. I would like to know if somebody knows a good tutorial about Serialization/Deserializatin of Beans and ArrayList, with java code examples to do it.
Well, for who would like to help me in the code, my problem is: - The Exception is: SAXException: No deserializer for... My deploy.wsdd is: <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="ServerProdutosService" provider="java:EJB" > <parameter name="beanJndiName" value="ejb/ProdutosFacadeLocal"/> <parameter name="homeInterfaceName" value="com.server.produtos.ejb.session.ProdutosFacadeLocalHome"/> <parameter name="remoteInterfaceName" value="com.server.produtos.ejb.session.ProdutosFacadeLocal"/> <parameter name="allowedMethods" value="getAllProdutos"/> <beanMapping qname="ns:ProdutosModel" xmlns:ns="urn:ProdutosFacadeLocal" languageSpecificType="java:com.server.produtos.model.ProdutosModel"/> <parameter name="jndiURL" value="jnp://localhost:1099"/> <parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory"/> </service> -My java code is: URL urlServer = new URL("http://localhost:8080/axis/services/ServerProdutosService?wsdl"); QName qn = new QName("urn:ServerProdutosService", "ProdutosModel"); Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(urlServer); call.registerTypeMapping( ArrayList.class, XMLType.SOAP_ARRAY, new ArraySerializerFactory(), new ArrayDeserializerFactory()); call.registerTypeMapping( ProdutosModel.class, qn, new BeanSerializerFactory(ProdutosModel.class, qn), new BeanDeserializerFactory(ProdutosModel.class, qn),false); call.setReturnType(XMLType.SOAP_ARRAY); System.out.println("configurou o call: "+call); Object[] params = new Object[0]; ArrayList list = (ArrayList) call.invoke(new QName("getAllProdutos"), params); </deployment>