users@jax-ws.java.net

Re: Marshalling custom classes

From: Kaleb Pederson <kibab_at_icehouse.net>
Date: Fri, 21 Jul 2006 08:51:18 -0700

Sameer Tyagi wrote:
> So this is assuming you are starting from Java ? Because if you're
> starting from WSDL then you probably shouldnt
> need to do custom marshalling/unmarshalling.

Yes. Would starting with a WSDL prevent me from having to unmarshall
data because all the types would be composites of simple types? I can
see how I could define the type in the wsdl and xsd, but I would still
think that at times it would at least be useful (although not necessary)
to unmarshall to a custom type in Java, just to make things a little
easier.

> Have you looked at
> https://jaxb.dev.java.net/nonav/jaxb20-pfd/api/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html

No. I tried searching on a bunch of things, but apparently I didn't
know the right search terms because I wasn't able to find anything
useful.

> A sample is included in the JAXB distribution in samples\j2s-xmlAdapter

Perfect.

Thank you!

--Kaleb