"Class Employee referes to itself through manager, subordinates. I know
that XML does not permit nesting, i.e, within employee tag you can not
again have employee tags. "
I know for sure that XML allows nesting so that X can contain Y and Y can
inturn contain X.
Raj
>From: Soumen Sarkar <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: How to serialize/deserialize this Class?
>Date: Thu, 5 Jul 2001 17:23:32 -0700
>
>Hello,
>I have an EJB application which exchanges data of the following class:
>public class Employee implements Serializable
>{
> // not null public
> String name;
>// null if no manager
>public Employee manager;
>// null if no subordinates, otherwise a Vector of Employee objects
>public Vector subordinates;
>// not null
>public String ssn;
>public double salary;
>// null if no dependents
>public Dependent[] dependents;
>}
>public class Dependent implements Serializable
>{
>public String name;
>public int age;
>public String relationShip;
>}
>Now I would like to make this EJB application available as a Web Service by
>using Apache SOAP 2.2.
>I understand that I need to convert Employee class data in XML. For this
>purpose I have studied soap-2_2\samples\addressbook in
>Apache SOAP 2.2 installation and understood that SOAP bean
>serializer/deserializer should be used. But in this case class
>Employee is much more complex than the class Address and has the following
>complexities:
>a. Class Employee referes to itself through manager, subordinates. I know
>that XML does not permit nesting, i.e, within employee tag you can not
>again have employee tags. I am thus having difficulty how Employee class
>would look when serialized to XML.
>b. Class Employee has a vector of Employee (subordinates) and array of
>Dependent (dependents). These are not simple property to be exposed
>by get/set. I know that Apache SOAP bean serializer/deserializer does bean
>introspection to perform its function. Basically I would like to know what
>to
>do with 'indexed properties' of a bean define them as per "Java Bean
>Specification" and SOAP bean serializer/deserializer would work?
>For class Dependent I understand that just exposing bean (set/get) methods
>would suffice for Apache SOAP bean serializer/deserializer to work.
>Please advise how may I proceed to XML serialize/deserialize Employee using
>Apache SOAP bean serializer/deserializer?
>Thanks.
>Regards,
>Soumen Sarkar
>
>Atoga Systems Inc. (http://www.atoga.com)
>510-743-0254
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.