Hi,
I am using jaxb 1.0.4 from jwsdp 1.5 , I have a pretty complicated schema
from ogc
(
http://schemas.opengis.net/wcs/1.0.0/) and was successful using xjc to
generate some java code
I have two issues
Issue 1 Different treatment form explicit name space and default namespace.
I have an instance document , if I use default namespace the deserialization
fail, but if I change the default namespace to non default namespace
(i.e.with a prefix) , jaxb has no problem parsing the xml.
What would cause this problem?
Most of the document I receive will be using default namespace, Is there a
way to work around this problem?
Issue 2 JAXB seems to have problem support several levels of type
extension/restriction
When I try to un-marshal some valid xml (checked with xml spy)
I run into an exception,
javax.xml.bind.UnmarshalException: Unexpected element
{
http://www.opengis.net/wcs}:label
when this element is at the right place
I debug into some jaxb generated code in
impl.runtime.SAXUnmarshallerHandlerImpl.java
The private UnmarshallingEventHandler[] handlers instance variable
Has 9 handlers some of them replicate the type hierarchy in the schema
document(see diagram).
I saw handlers[8] was used first, then handlers[7] , then handlers[6] and so
on
For whatever reason (I suspect a bug) , once handler[5]
was used , it did not pop continue the stack to use handler[4] which will
handle the element
Instead it the control flow form handler[5] entertElement method to
super.enterElement which invoke unexpectedEnterElement method
I know there is a lot of details here, I would like to find out how can get
some support and may be confirm this is a bug.
The online schema as some issue and I have make some local changes so xjc
can generate the code.
I can send you the schema, instance doc for you reproduce the issue.
Thanks for listening.
Ivan Cheung