multiref encoding has some distinguishing aspects: 1. Space savings by way of ref contrasted to duplication
2. Circular references can be represented. In place encoding will result in infinite loop (stack overflow) as happens with Apache BeanSerializer. Axis handles this. 3. Better information modeling 'id' is part of XML (DTD) standard -- it is upto the XML/SOAP serializer to take advantage of it. Multiref ser is just an application of XML standard -- nothing new. There can be as many styles of encoding as you wish -- as long as you adhere to XML and SOAP. For example you can use XML infoset based encoding -- not necessarily you need to go for angle brackets (<>) :-) There is a concept of abstract syntax versus transfer syntax. These two concerns are orthogonal to each other. Design considerations dictate which transper syntax is negotiated between communicating end points. OSI presentation layer captures this concept. Hope this helps. Soumen Sarkar. -----Original Message----- From: soap vamsi To: [EMAIL PROTECTED] Sent: 6/26/02 9:43 PM Subject: use of multiref for object serialization While encoding Java Objects to SOAP XML the composed objects are represented using the multiref tag. ex Phone number contained in address is encoded as <ns1:getAddressFromPhoneNumber xmlns:ns1="urn:AddressService"> <arg0 href="#id0"/> </ns1:getAddressFromPhoneNumber> <multiRef id="id0" SOAP-ENC:root="0" xsi:type="ns2:PhoneNumber" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:AddressServiceNameSpace"> <areaCode href="#id1"/> <exchange href="#id2"/> <number href="#id3"/> <extension href="#id4"/> </multiRef> <multiRef id="id3" SOAP-ENC:root="0" xsi:type="xsd:string" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">111</multiRef > <multiRef id="id1" SOAP-ENC:root="0" xsi:type="xsd:string" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> <multiRef id="id4" SOAP-ENC:root="0" xsi:type="xsd:string" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">1111</multiRe f> <multiRef id="id2" SOAP-ENC:root="0" xsi:type="xsd:string" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">11</multiRef> One obvious advantage of using href and not using enclosed phonenumber equivalent in the address is that by using that multiple address objects can refer to the same phonemuber multiref element. Are there any other advantages that one gets by using this style of represetation for pass by ref objects? What is the schema that defines mutiref element? What are the other styles of encoding? thanks in advance vamsi _________________________________________________________ There is always a better job for you at Monsterindia.com. Go now http://monsterindia.com/rediffin/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>