Applying external JAXB binding file to schema elements imported from WSDL

后端 未结 4 1938
半阙折子戏
半阙折子戏 2020-12-31 05:01

The XPath expression in my external binding files can\'t target the elements in my XML schemas which are imported into my WSDL.

Everything runs if I do inline bindin

4条回答
  •  有刺的猬
    2020-12-31 05:55

    You could compile each of the XML schemas to Java classes individually. Then you can leverage episode files so that the generated classes can be used when you compile schemas that import that XML schema.

    Below is an example of how you produce an episode file.

    xjc -b binding1.xml -episode common.episode common.xsd
    

    And below is an example of how you consume and episode file. The episode file is just a JAXB external bindings file and therefore is specified using the -b flag.

    xjc -d out main.xsd -extension -b common.episode   
    

    For More Information

    • http://blog.bdoughan.com/2011/12/reusing-generated-jaxb-classes.html

提交回复
热议问题