users@jaxb.java.net

RE: Re: Custom serialization/deserialization

From: Anil Arora <aarora_at_interlacesystems.com>
Date: Tue, 6 Nov 2007 11:12:02 -0800

I'm trying to avoid Axis and do something that is portable to anything
that implements the spec.

I didn't like XMLAdapter because it requires me to generate the
destination objects. Let's say I have Iterable<Map<String,String>>
(note the use of abstraction here). I want to convert this into the XML
below where the key of the map is the element name. How would I use
XMLAdapter to do this?
I also need to do the opposite, where I need to decompose this.

Anil


> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza_at_gmail.com]
> Sent: Tuesday, November 06, 2007 7:04 AM
> To: users_at_metro.dev.java.net
> Subject: Re: Custom serialization/deserialization
>
>
> Would XMLAdapter[1] help here? I'm really not sure. But Axis2 also
> supports
> JAX-WS to an extent, so you might want to ask there as well.
>
> Regards,
> Glen
>
> [1]
>
http://weblogs.java.net/blog/kohsuke/archive/2005/04/xmladapter_in_j.htm
l
>
>
> AArora wrote:
> >
> > I'm working on a migration from Axis to JAX-WS. My basic question
is
> > whether or not there's an equivalent to Axis's custom serialization
and
> > deserialization. For example, I have an xml schema snippet as
follows.
> >
> >
> >
> >
> > <xsd:element name="PropertyList" type="PropertyListType"/>
> >
> > <xsd:complexType name="PropertyListType">
> >
> > <xsd:sequence>
> >
> > <xsd:any minOccurs="0" maxOccurs="unbounded"/>
> >
> > </xsd:sequence>
> >
> > </xsd:complexType>
> >
> >
> >
> > I am trying to serialize and deserialize the following xml
> >
> >
> >
> > <PropertyList>
> >
> > <Name1>value1</Name1>
> >
> > <Name2>value2</Name2>
> >
> > <ArbitraryName>somevalue</ArbitraryName>
> >
> > </PropertyList>
> >
> >
> >
> > In AXIS, I built it using a bunch of custom deserializers. However,
it
> > doesn't feel straight forward here. I looked at JAXB
XmlTypeAdapter
> > interface but that doesn't seem to be the right approach. Any ideas
of
> > what I should be looking at?
> >
> > Is there any documentation on migrating from Axis 1.x to JAX-WS that
> > would be useful?
> >
> >
> >
> > Thanks,
> >
> > Anil
> >
> >
> >
> >
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/Custom-serialization-
> deserialization-tf4756179.html#a13608435
> Sent from the Metro - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_metro.dev.java.net
> For additional commands, e-mail: users-help_at_metro.dev.java.net