axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@macromedia.com>
Subject RE: HREF BROKEN
Date Mon, 25 Mar 2002 23:39:11 GMT

Hi Richard!

Doing it the way we do it now makes for fast and easy serialization.  We simply serialize
on the fly, and each time we come to a non-primitive we lay down an HREF, knowing that we'll
write out the actual value at the end.

Doing it the way you want to do it is much more complicated, because now you need to walk
the entire tree of objects and count references to each one.  Essentially you'd need to have
a separate "recordReferences()" method on every serializer,
and call that before the serialization begins.  That's doable, but kind of a pain.  Why is
this important to you?

--Glen

> -----Original Message-----
> From: Richard Emberson [mailto:emberson@phc.net]
> Sent: Monday, March 25, 2002 2:55 PM
> To: axis-user@xml.apache.org
> Subject: HREF BROKEN
> 
> 
> It is my understanding that hrefs can be used in the case 
> when an object
> 
> is share by more than
> one other objects. With an href, the shared object can be 
> serialized and
> 
> those objects that
> have a reference to the shared object will be serialized with 
> an element
> 
> containing the
> href rather than the shared object itself.
> 
> Turning on multiref seems to create hrefs for all non primitive types.
> What I want is to have
> hrefs generated only for those shared objects that actually 
> need them (I
> 
> believe that the apache
> soap library - axis' precursor - had this ability). How do I do it?
> 
> 
> 
> class A {
>     ....
>     Shared s;
> }
> class B {
>     ....
>     Shared s;
> }
> class Shared {
>     ...
> }
> 
> <A>
>     .....
>     <s href="#id1"/>
> </A>
> <B>
>     .....
>     <s href="#id1"/>
> </B>
> <Shared id="id1">
>     ....
> </Shared>
> 
> 
> 
> Richard
> 
> 
> 
> 

Mime
View raw message