users@jaxb.java.net

Re: Is it possible to tell JAXB unmarshaller to ignore namespace?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Mon, 19 May 2008 15:12:34 +0200

Hi.

> I'm using xsd schema with defined namespace for unmarshalling xml documents.
> But these xml documents do not contain namespace declaration. So there is an
> exception: "javax.xml.bind.UnmarshalException: unexpected element (uri:"",
> local:"Message"). Expected elements are
> <{http://www.something.com/xml/Message}Message> ..."
> Is it possible to tell JAXB unmarshaller to ignore namespace? Could you
> suggest a workaround for this situation?

I'd say, use a SAX filter to add namespace.

Bye.
/lexi