Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 83436 invoked from network); 15 Nov 2004 00:31:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Nov 2004 00:31:23 -0000 Received: (qmail 31853 invoked by uid 500); 15 Nov 2004 00:31:16 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 31842 invoked by uid 500); 15 Nov 2004 00:31:16 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 31833 invoked by uid 99); 15 Nov 2004 00:31:16 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [203.24.107.33] (HELO daedelus.olympus.dytech.com.au) (203.24.107.33) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 14 Nov 2004 16:31:13 -0800 Received: from localhost (localhost [127.0.0.1]) by daedelus.olympus.dytech.com.au (Postfix) with ESMTP id D7D1E2C19722 for ; Mon, 15 Nov 2004 11:31:05 +1100 (EST) Received: from daedelus.olympus.dytech.com.au ([127.0.0.1]) by localhost (daedelus [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01513-07 for ; Mon, 15 Nov 2004 11:31:05 +1100 (EST) Received: from osiris.olympus.dytech.com.au (osiris.olympus.dytech.com.au [192.168.106.1]) by daedelus.olympus.dytech.com.au (Postfix) with ESMTP id C083C2C19720 for ; Mon, 15 Nov 2004 11:31:05 +1100 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: does anyone have complex serialization working? Date: Mon, 15 Nov 2004 11:31:04 +1100 Message-ID: <24E36F57378E2A49B8D5EE98904F2E2EF9BDB2@osiris.olympus.dytech.com.au> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: does anyone have complex serialization working? thread-index: AcTKpt47snwhJiRVTEKbQPFKcud0wQAAGQHA From: "Nathan Wardle" To: X-Virus-Scanned: by amavisd-new-20030314-p2 (Debian) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N We've actually ended up writing our own serialiser and deserialiser = based on a reflection excerpt from Better, Faster, Lighter Java by Bruce = Tate and Justin Gehtland (pg 70 something). We combined this with the = strategy pattern (one class per type of strategy (ie ArrayStrategy, Map, = Collection, Bean, Primitive etc) with an isApplicable method which takes = a class or class name and a process method wich does the = (de)serialisation for that type of object). We added the ability to = handle beans with references to another bean by passing around a context = map containing all objects that had been (or were being) processed. We = also added a type conversion function to each strategy because we are = passing message between .Net client and java server. We then just passed = the xml messages.=20 It's a bit of work, but works well. Code is unavailable, sorry, but the resulting xml looks something like = this: My array 1 2 for this object: Object[] arrayObject =3D new Object[]{"My array", new String[]{"1", = "2"}, new ObjectWithReferences()}; ObjectWithReferences test class: class ObjectWithReferences { private ObjectWithReferences referenceObject =3D this; public ObjectWithReferences() { =09 } /** * @param object * @return *=20 * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object object) { if (!(object instanceof ObjectWithReferences)) return false; ObjectWithReferences them =3D (ObjectWithReferences) object; =09 return (them.getReferenceObject() =3D=3D them) && (referenceObject = =3D=3D this); } /** * @return *=20 * @see java.lang.Object#hashCode() */ public int hashCode() { return super.hashCode(); } /** * @return Returns the object1. */ public ObjectWithReferences getReferenceObject() { return referenceObject; } /** * @param object1 * The object1 to set. */ public void setReferenceObject(ObjectWithReferences referenceObject) { this.referenceObject =3D referenceObject; } } -----Original Message----- From: John Menke [mailto:john.menke@eagleinfosystems.com] Sent: Monday, 15 November 2004 11:06 AM To: Axis Subject: does anyone have complex serialization working? Is it even possible to serialize an array of beans where the beans have references to another bean? Nobody has been able to come up with a = working example. beanMapping is not working for me. I have posted several = times and nothing... i'm beginning to think it's not possible. -jm