I had some issues returning beans and they got resolved when I used the code generated from WSDL2Java.  The generated files will provide all the mappings and they are very easy to use.  Try using Java2WSDL and then WSDL2Java and use the generated classes for your client.  Search for postings on deserializing for more details on other steps taken to resolve bean and array issues.  Check the user guide for details on running WSDL2Java and Java2WSDL and a client example using the generated classes.
 
Good luck,
 
David
 
 
-----Original Message-----
From: luca marano [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 10:34 AM
To: [EMAIL PROTECTED]
Subject: bean serializer

hi

i wrote the client to access to a web service returning a bean

this is my relevant code:

String endpoint = "http://localhost:8080/axis/services/MessageService";

    Service  service = new Service();
    Call     call    = (Call) service.createCall();

    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName(new QName("
http://soapinterop.org/", "getResults"));
    Pat p = new Pat("provapatid","provatitle");

    QName returnQName = new QName("com.fwdco.wsbeans","Pat");
    call.registerTypeMapping(Pat.class,returnQName,new BeanSerializerFactory(Pat.class,returnQName),new BeanDeserializerFactory(Pat.class,returnQName));
    call.setReturnType(returnQName,Pat.class);
    Pat ret = (Pat) call.invoke(new Object[] { "prova" });

 

when i run the client this esception occures:

- Exception:

org.xml.sax.SAXException: Deserializing parameter 'getResultsReturn': could not find deserializer for type {http://localhost:8080/axis/services/MessageService}messageele

at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)

at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)

at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)

at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)

at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)

at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)

at org.apache.axis.client.Call.invoke(Call.java:1871)

at org.apache.axis.client.Call.invoke(Call.java:1777)

at org.apache.axis.client.Call.invoke(Call.java:1315)

at MessageEle.Client.main(Client.java:51)

please if you know what the problem is
 help me
 
Luca

Reply via email to