I need an ObjectFactory with multiple java objects from multiple schemas. I have had 0 luck with several different plugins and variations of those plugins. Currently I am using the following :
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>2.6.2</version>
<configuration>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:2.6.2</extension>
</extensions>
</configuration>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<sourceRoot>${basedir}/target/generated-sources/xjc</sourceRoot>
<xsdOptions>
<xsdOption>
<xsd>${basedir}/src/main/resources/osds/schemas/IataAsmAdmEvent.xsd</xsd>
<xsd>${basedir}/src/main/resources/osds/schemas/IataAsmCnlEvent.xsd</xsd>
<xsd>${basedir}/src/main/resources/osds/schemas/IataAsmEqtEvent.xsd</xsd>
<packagename>com.mypackage</packagename>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
</plugin>
With this plugin, and many others, I am only able to generate an ObjectFactory with only the last schema in the list. None of the previous xsds make in the OF as java objects. Can anyone please help me solve this?
Thanks!
<xsd>
element is only allowed once within<xsdOption>
. – Malvie