You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Mark Swanson <sw...@yahoo.com> on 2001/01/22 06:28:58 UTC

BeanSerializer exceptions.

Hello,

I'm using a BeanSerializer (tried the Base64Serializer too) to 
[de]serialize the return value of a getTest() function. If I return a 
float value the test program works perfectly. If I return a 
java.io.Serializable object soap seems to think it's a null:null object?
I do get an exception. Anyone know more about the source that can shed 
some light?
Many thanks.

Attached is the client program and the Exception.
(SoapTestServlet is basically a copy of RPCRouterServlet)

RE: BeanSerializer exceptions.

Posted by Bill Dudney <bd...@erols.com>.
Hi Mark,

You need to have the type added to your 'isd:mappings' in your service
deployment descriptor (or set it up through the admin tools). I've attached
a deployment descriptor that describes a service called 'Simple' that has a
single method 'getTest'. The descriptor also sets up a mapping for the java
class 'Test' that will get serialized via the BeanSerializer (Test needs to
follow the bean conventions).

Now if getTest returns an instance of Test that object will get serizlized
via the BeanSerializer.

SOAP will not even try to serialize the object via java.io.Serizlizable. Its
doing everything via XML encoded envelopes. You could probably use the
Base64Serializer if your getTest method returned a byte array of the
serizlized instance you are trying to pass.

Hope this helps.

TTFN,

-bd-

-----Original Message-----
From: Mark Swanson [mailto:swansma@yahoo.com]
Sent: Monday, January 22, 2001 12:29 AM
To: soap-user
Subject: BeanSerializer exceptions.


Hello,

I'm using a BeanSerializer (tried the Base64Serializer too) to
[de]serialize the return value of a getTest() function. If I return a
float value the test program works perfectly. If I return a
java.io.Serializable object soap seems to think it's a null:null object?
I do get an exception. Anyone know more about the source that can shed
some light?
Many thanks.

Attached is the client program and the Exception.
(SoapTestServlet is basically a copy of RPCRouterServlet)

RE: BeanSerializer exceptions.

Posted by Bill Dudney <bd...@erols.com>.
Hi Mark,

You need to have the type added to your 'isd:mappings' in your service
deployment descriptor (or set it up through the admin tools). I've attached
a deployment descriptor that describes a service called 'Simple' that has a
single method 'getTest'. The descriptor also sets up a mapping for the java
class 'Test' that will get serialized via the BeanSerializer (Test needs to
follow the bean conventions).

Now if getTest returns an instance of Test that object will get serizlized
via the BeanSerializer.

SOAP will not even try to serialize the object via java.io.Serizlizable. Its
doing everything via XML encoded envelopes. You could probably use the
Base64Serializer if your getTest method returned a byte array of the
serizlized instance you are trying to pass.

Hope this helps.

TTFN,

-bd-

-----Original Message-----
From: Mark Swanson [mailto:swansma@yahoo.com]
Sent: Monday, January 22, 2001 12:29 AM
To: soap-user
Subject: BeanSerializer exceptions.


Hello,

I'm using a BeanSerializer (tried the Base64Serializer too) to
[de]serialize the return value of a getTest() function. If I return a
float value the test program works perfectly. If I return a
java.io.Serializable object soap seems to think it's a null:null object?
I do get an exception. Anyone know more about the source that can shed
some light?
Many thanks.

Attached is the client program and the Exception.
(SoapTestServlet is basically a copy of RPCRouterServlet)