Patricia,

I'm not sure why you are getting this error, but you should be able to do
what you have described.  I am able to pass several different classes(beans)
around all of which extend from a base class(another bean).  This works
fine.  You do NOT have to write your own serializer/deserialzer.  You do
need to specify the bean serializer and deserializer(that comes with axis)
in your deployment descriptor when you deploy your service.  And I believe
you need to specify one for each class that extends your base class.  This
is done with the "typeMapping" tag.

Good Luck,

Pete R.

> -----Original Message-----
> From: Patricia Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 11:06 AM
> To: [EMAIL PROTECTED]
> Subject: Error!!!!
> 
> 
> I am trying to return and java bean which extends other bean but I am 
> getting following error while deserializing:
> -------------------------------------
> - Exception:
> java.lang.NullPointerException
>         at 
> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown So
> urce)
>         at 
> org.apache.axis.encoding.DeserializationContextImpl.startElement(Unkn
> own Source)
>         at 
> org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
>         at 
> org.apache.axis.message.MessageElement.publishToHandler(Unknown 
> Sourc
> e)
>         at 
> org.apache.axis.encoding.DeserializerImpl.startElement(Unknown 
> Source
> )
>         at 
> org.apache.axis.encoding.DeserializationContextImpl.startElement(Unkn
> own Source)
>         at 
> org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
>         at 
> org.apache.axis.message.MessageElement.publishToHandler(Unknown 
> Sourc
> e)
>         at 
> org.apache.axis.message.RPCElement.deserialize(Unknown Source)
>         at 
> org.apache.axis.message.RPCElement.getParams(Unknown Source)
>         at org.apache.axis.client.Call.invoke(Unknown Source)
>         at org.apache.axis.client.Call.invoke(Unknown Source)
>         at org.apache.axis.client.Call.invoke(Unknown Source)
>         at 
> com.example.webservice.MyNewServiceSoapBindingStub.getDocument
> (MyNewServiceSoapBindingStub.java:160)
>         at com.example.test.MyNewServiceTest.main(MyNewServiceTest.ja
> va:20)
> Exception in thread "main" java.lang.Exception: Remote 
> Exception caught: 
> java.la
> ng.NullPointerException
>         at com.example.test.MyNewServiceTest.main(MyNewTest.ja
> va:34)
> ----------------------------------
> 
> Does axis support deserializing bean which inherits other bean???
> If yes, do I have to write custom serializer, deserializer?? Please 
> explain!!!!
> 
> 
> 
> 
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 

Reply via email to