axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Griffin <fgrif...@maine.rr.com>
Subject Problem with NoSerializer for Proxy classes
Date Wed, 13 Mar 2002 20:00:24 GMT
I've written a SOAP application with a single method which invokes a
specified method on an EJB.  The name of the EJB and the name of the
method are passed up as Strings.  The return from the method is a single
container-type object, say "A", whose instance fields contain Strings or
primitives plus one Object which contains either a javax.ejb.Handle or a
javax.ejb.HomeHandle.

In the deploy.wsdd, I have <beanMapping> entries for "A", Handle, and
HomeHandle.

When I run the application, passing ejbname "B" and method "create",
I am getting an IOException claiming that "No Serializer can be found
for class $Proxy27".  I hacked the Axis code a bit, and found that the
error occurs while trying to serialize MultiRefs in
org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(), so
I added code to accumulate descriptions of the multirefs in a
StringBuffer, and dump it if the exception occurred.

What I got was:

MultiRef: com.aonix.Utilities.soap.UtSOAPHandle (I called this "A"
above)
Id: id0
QName: multiRef

MultiRef: org.jboss.proxy.ejb.handle.StatelessHandleImpl (this is the
JBoss implementation of Handle)
Id: id1
QName: multiRef

MultiRef: $Proxy27
Id: id2
QName: multiRef

The exception occurs with this last one.  So I added code to get the
interfaces for this proxy class and print their names.  The only
interface implemented is the Remote interface for EJB "B", so this thing
is clearly the object returned by the EJB's create() call.

However, I can't figure out how Axis KNOWS about this thing.  In my
application class, I call the create() method, take the resulting
EJBObject, get its Handle, and create an instance of the container class
"A" which contains the Handle.  That "A" object is what I return to Axis
as a result.  Nowhere, nohow am I giving Axis the actual EJBObject.
I've trapped the return in Axis and verified this, and the fact that the
multiref list contains an
"org.jboss.proxy.ejb.handle.StatelessHandleImpl" entry bears this out
--- Axis couldn't possibly know about this classname unless the object
wrapped by the "A" instance was an instance of the class.

I even checked the source code for StatelessHandleImpl.  It's only
instance field is a String.

Can anybody tell me how Axis is picking up on this $Proxy class, and how
I can keep it from doing so ?  The first two multiref entries are all
Axis should need to serialize the object I'm returning from the
application class.


Mime
View raw message