hi there, in wsdd, change the qName to qname.
----- Original Message ----- From: "Xavier Renard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 20, 2003 4:28 AM Subject: deserializer problem > Hi, > > I have just installed axis and did test the examples that come along. > It works perfectly. > Then I did try to return a simple bean to a client but I get the > following error with the deszerializer: > > org.xml.sax.SAXException: Deserializing parameter 'searchReturn': could > not find deserializer for type > at > org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:297) > at > org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa tionContextImpl.java:921) > at > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198) > > > If i try tcpmon everything seems to be fine except maybe the type of the > response in the scheam(i'm relatively new comer to axis and soap so i > just can assume this :-)). And when I do list the services, I can see > that the attribute qName is empty.Is it normal? > > I paste some code below.If someone could have a quick look or tell me > what's wrong,it would very nice > > regards > > Xavier > > > response (tcpmon) > ----------------- > > <?xml version="1.0" encoding="UTF-8"?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Body> > <searchResponse > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > <searchReturn href="#id0"/> > </searchResponse> > <multiRef id="id0" soapenc:root="0" > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xsi:type="" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> > <authors xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[1]" > xmlns:ns1="http://www.w3.org/2002/12/soap-encoding"> > <item>author</item> > </authors> > <isbn xsi:type="xsd:string">isbn</isbn> > <title xsi:type="xsd:string">title</title> > <id xsi:type="xsd:int">1</id> > </multiRef> > </soapenv:Body> > </soapenv:Envelope> > > > client > ------ > > Call call = (Call) service.createCall(); > > QName qn = new QName("BookService","Book"); > BeanSerializerFactory serializer = new BeanSerializerFactory(Book.class,qn); > > BeanDeserializerFactory deserializer = new > BeanDeserializerFactory(Book.class,qn); > > call.registerTypeMapping(Book.class,qn,serializer,deserializer); > > try{ > > call.setTargetEndpointAddress("http://127.0.0.1:8089/axis/services/BookServi ce"); > call.setOperationName("search"); > call.addParameter("arg",XMLType.XSD_STRING,ParameterMode.IN); > call.setReturnType(qn); Book book=(Book)call.invoke(new Object[]{"Xavier"}); > System.out.println(book.getTitle()); > } > catch(AxisFault fault){ > System.out.println("Error "+fault.toString()); > > } > > } > > wsdd > ---- > > <deployment xmlns="http://xml.apache.org/axis/wsdd/" > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> > <service name="BookService" provider="java:RPC"> > <parameter name="className" value="books.BookService"/> > <parameter name="allowedMethods" value="search"/> > <beanMapping qName="myNS:Book" xmlns:myNS="BookService" > languageSpecificType="java:books.Book"/> > > </service> > </deployment> > > > Service classe > -------------- > > public class BookService{ > Book myBook; > > public BookService(){ > myBook = new Book(); > myBook.setId(1); > myBook.setTitle("title"); > myBook.setIsbn("isbn"); > myBook.setAuthors(new String[]{"author"}); > } > public Book search(String string){ > return myBook; > > > service > ------- > <service name="BookService" provider="java:RPC"> > <parameter name="allowedMethods" value="search"/> > <parameter name="className" value="books.BookService"/> > <beanMapping languageSpecificType="java:books.Book" qname=""/> > </service> >