You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Glen Daniels <gd...@macromedia.com> on 2001/07/26 20:16:57 UTC

RE: href

Axis does indeed support multi-ref serialization, while SOAP 2.2 (I believe)
does not.  Right now it's off by default, and can be turned on with a
property file setting.

When on, it will serialize ALL non-basic types as multirefs.  In other
words, each object that is touched in the serialization graph is serialized
as an href, and then at the end of the whole serialization all the actual
data for the multirefs is output.  This is somewhat different from the Java
serialization which you mention, in which the actual serialization is output
the first time the object is hit, but that's because the SOAP multi-ref
serialization rules do NOT let you refer to a multi-ref which is embedded
inside another structure.  In other words, this is *not* OK:

<body>
<struct>
  <elem id="1">
    <child>Here's my actual data</child>
  </elem>
  <otherelem href="#1"/>
</struct>
</body>

but this is OK:

<body>
<struct>
  <elem href="#1"/>
  <otherelem href="#1"/>
</struct>
<multiref id="1">
 <child>Here's my actual data</child>
</multiref>
</body>

--G

> -----Original Message-----
> From: Richard Emberson [mailto:emberson@contact.com]
> Sent: Thursday, July 26, 2001 3:09 PM
> To: axis-dev@xml.apache.org; soap-user@xml.apache.org
> Subject: href
> 
> 
> I would assume that when the same object appears more than once in an
> object
> tree being serialized, that 'href' should be used.
> I also assume that during deserialization that there are 
> href's then only
> one object (per id)
> is created and placed in the tree of objects.
> 
> Java's builtin object serialization contains support for this 
> notion. As
> far as I can
> tell neither soap 2.2 nor axis automatically detects multiple 
> instances of
> the same
> object during serialization nor do they create only one 
> object instance
> during
> deserialization.
> 
> Does such support exist in soap 2.2 and/or axis? Since such 
> multi-reference
> object
> detection is not something that can be pasted on the outside of
> serialization, is the
> recommendation for anyone wish to avoid duplications to ......
> 
> Richard Emberson
>