I am also having a problem with custom beans which I think the sample code within this e-mail will fix. However, I still want to ask if this is the intended solution when the problem is encounteredt during java2wsdl generation.

I have an interface that accepts a serializable bean (see my post earlier in the week for code details). java2wsdl/Emitter suffers a NullPointerException when the custom bean class isn't in the registrry of default types and then attempts to search the custom type registry; which happens to be null. I am using the 1.2alpha code.

I've looked through the TypeMapping code and this example helps show me how I can create one. I also saw where I can provide a Java2WSDLFactory that will help me load the code that will register the type mapping.

There has to be an easier way, right? It would seem that the code below could have been specified in a way similar to the wsdd files for deployment. I am still stuck at java2wsdl.

thanks,
jim

FONTDEVILA Diego wrote:
RE: deserialization error: no deserializer is registered

You probably have not registered correctly the bean serialization classes to handle your bean (the SOAP serialization issue is independent from the information you give the JVM when you say Serializable).

Here is a code example. The QName is the xml type for your bean.

        call.registerTypeMapping( MyBean.class,
                                          new QName( "http://mydom.org", "org.mydom.MyBean"),
                                          org.apache.axis.encoding.ser.BeanSerializerFactory.class,
                                          org.apache.axis.encoding.ser.BeanDeserializerFactory.class );

                                Diego
-----Original Message-----
From: Sesha Shayan Nandyal [mailto:[EMAIL PROTECTED]]
Sent: Miércoles 14 de Enero de 2004 23:01
To: [EMAIL PROTECTED]
Subject: deserialization error: no deserializer is registered


  Hello All,
I am getting the following error :
deserialization error: no deserializer is registered for (null,
{http://com.test/types/HelloWebservice}HelloBean
<http://com.test/types/HelloWebservice%7DHelloBean>)
at
com.sun.xml.rpc.encoding.DynamicSerializer.deserialize(DynamicSerializer.java:119)
at
com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:141)
at
com.sun.xml.rpc.encoding.SOAPDeserializationState.deserialize(SOAPDeserializationState.java:364)
at
com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiRefObjects(SOAPDeserializationContext.java:76)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:173)
at
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:64)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:346)
at DIIHelloTest.main(Unknown Source)

In the above example, the webservice is returning a vector of HelloBean
objects (with HelloBean being a regular Java Bean and implements
serializable).
I am encountering this problem when I use DII to invoke the service. It
works fine if I were to use stubs directly.
Thanks
Sesha


http://www.portalsociete.com
Visítenos, lo estamos esperando.

============================================================
La información aquí contenida es confidencial y está dirigida
solamente a las personas direccionadas en el mail.
No debe ser considerada como recomendación de compra o venta
de valores. Todo acceso no autorizado, uso, reproducción, o
divulgación está prohibido.
Ni SOCIETE GENERALE ni ninguna de sus subsidiarias o filiales
asumirán responsabilidad ni obligación legal alguna por cualquier
información incorrecta o alterada contenida en este mensaje.

The information contained herein is confidential and is intended
solely for the addressee(s).  It shall not be construed as a
recommendation to buy or sell any security.  Any unauthorized
access, use, reproduction, disclosure or dissemination is prohibited.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
============================================================


Reply via email to