axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon McClenahan" <>
Date Thu, 28 Mar 2002 16:34:23 GMT

> -----Original Message-----
> From: Richard Emberson []
> Sent: Wednesday, March 27, 2002 7:41 PM
> To:;
> There are three ways of doing HREFs in axis.

You are referring to client-side only.

> The first is to set doing multirefs property to true, the default
> In this case everything is multi-refed except "primitive" 
> types.

> The second way is to set the multirefs property to false, NOT the
> default:
> In this case, NOTHING is multi-refed.

> The third way and, it might add, the most appealing is to 
> multi-ref only
> when needed (greatly
> enhanced readability of the soap xml in your log files among other
> things).
> Here you once again use the default multiref property value, true:
> Then you do the following, you apply this patch to the file
> Then for those object that you know are not shared, you simply enter
> them into the
> SerializationContextImpl class hashtable via the method
> addPrimitive(Class cls)
> (which really ought to be called "isnevershared").

By definition, a reference implies that an object instance is accessible
from multiple declarations. I agree with your concept of "isnevershared"
if specified by the client. But hacking the code to fool Axis into
thinking that the type is a primitive is a workaround hack. Maybe the
client wants some primitive types to be referenced as well.

So the solution is to allow the client to specify which objects are
references (interfaces?) or instances, not just all (non-primitives) or
none. Maybe the JAX-RPC spec has something to say about this, I don't

I recently discovered a case in my Web Service where the call would not
work if I did not enable references. Without going into too much detail,
I have an array of a complexType which has an element of anyType. When
using a reference for the anyType objects, the real type can be
specified on the referenced instance. I'm not sure whether this issue is
an Axis thing or not, but I'm sure glad it worked when I forgot to turn
off multirefs.


View raw message