users@jaxb.java.net

Re: Mixing custom/manual marshalling with JAXB

From: Dmitri Colebatch <dim_at_colebatch.com>
Date: Thu, 6 Jul 2006 09:10:04 +1000

Hi Nick,

Could you explain more about what you're trying to do?

Obviously at compile time you need to know the class structure of what
you're unmarshalling into.

Are you talking about unmarshalling something like a SOAP envelope
where the body is any:any? I assume not, but if this is the case then
as long as the types are in the jaxb context then this works out of
the box.

If you're talking about unmarshalling into different types of objects
based on some jvm level context then I don't see why you cant do that
using XmlJavaTypeAdapter - obviously the return type needs to be
defined at compile time but you'll never be able to avoid that, but
that aside you can do whatever you want at runtime.

Could you give a more complete set of requirements please?

cheers
dim


On 7/5/06, Nick Minutello <nick.minutello_at_gmail.com> wrote:
> I want to use jaxb to marshal&unmarshal my object graph but there are
> objects within this graph that I need to marshal/unmarshal manually
> (Its quite complicated marshalling/unmarshalling - it requires data
> that is only available at runtime to do it).
>
> Is there a way I can plug into the marshalling/unmarshalling to do
> this? If not, can we add it?
>
> Question also posted on the forum:
> http://forums.java.net/jive/thread.jspa?threadID=16648
>
> Thanks
> -Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>