users@jaxb.java.net

Can I unmarshal an unnamespaced message with a schema?

From: KARR, DAVID (ATTSI) <"KARR,>
Date: Fri, 25 Feb 2011 12:28:23 -0800

I have a schema defined in a namespace, and I've generated JAXB classes
from that namespace. When the message is valid for that schema, being
that it has the "xmlns" attribute and the elements in the body are valid
for that schema, then everything works fine.

I have a temporary problem that the message I'm receiving doesn't have
the namespace specified, even though the body is valid for that schema.
When I try to unmarshal the message, I get a schema validation error
because the body element's namespace doesn't match the expected
namespace.

I expect the body element will be fixed soon, but I'm blocked until it's
fixed. Is there a temporary workaround I could implement in how I
create or call the unmarshaller, to get around this in the mean time?