JIBX: Classes generated from maven codegen plugin : No unmarshaller for element

我与影子孤独终老i 提交于 2019-12-02 09:55:39

Marc,

Take a look at the example in the JiBX schema library for the

Opentravel schema Library

It is very similar to your problem Many schemas with the same namespace need to be bound to different java packages.

Also, I would suggest that you use a newer version of JiBX, such as 1.2.6

Cheers!

Don

I finally found the answer. I was missing namepace declaration in the xml I wanted to consume. It works with a correctly shaped one as the following one :

    <?xml version="1.0" encoding="UTF-8" ?>
        <foo:foo xmlns:foo="http://www.example.jibx.org/generated/v30/foo"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.example.jibx.org/generated/v30/foo foo-3.0.xsd">
            <generic>
                <type>12345</type>
                <isValid>1</isValid>
            </generic>
            <specific>
                <label>Label example</label>
                <dateFoo>01/01/2015</dateFoo>
            </specific>
        </foo:foo>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!