Questions tagged [cxf-xjc-plugin]

cxf-xjc-plugin is a maven plugin to automate the XJC tool for compiling XSD (XML Schema) to Java source code as part of a maven build, usually as part of the "generate-sources" phase.

36 questions
14
votes
2 answers

How to run XJC with Java 11 and maven?

To generate java classes from XSD (for reading XML files), we used jaxb2-maven-plugin and Java8. For java 11, we get many issues... What libraries and plugins do work (today), allowing to generate java code from XSD using java 11 and maven? If…
Walter Kuhn
  • 479
  • 1
  • 6
  • 19
9
votes
2 answers

JAXB fails to generate Java classes for XBRL

I'm trying to generate Java classes for types defined in XBRL. My build process is based on Maven 2, and here are my trials. I only paste the build section, which relies on some properties: package is the name of my target package catalog is the…
rds
  • 26,253
  • 19
  • 107
  • 134
6
votes
2 answers

How do I generate multiple .xsd's into the same ObjectFactory?

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 : org.apache.cxf
user2733840
  • 61
  • 1
  • 2
6
votes
4 answers

JAXB marshalling for BigDecimal using fractionDigits

So here's my problem. I'm given an XSD to which my generated XML file should comply. Using the org.apache.cxf.cxf-xjc-plugin maven plugin and an external binding file I generate the source code. But when I'm trying marshall my object the generated…
Jasper
  • 2,166
  • 4
  • 30
  • 50
5
votes
1 answer

unexpected element (uri:"", local:""). Expected elements are (none)

I am not able to map response xml to java generated by xsd using cxf-xjc-plugin. pom.xml org.apache.cxf cxf-xjc-plugin
2787184
  • 3,749
  • 10
  • 47
  • 81
3
votes
1 answer

How can one make use of classes generated by the cxf-xjc-plugin in Java 11?

Using the Apache cxf-xjc-plugin with Java 11 works fine, I am able to generate Java sources from xsd files. The problem comes when attempting to make use of those Java classes with JAXB: the available implementations of JAXB for Java 11 are…
Ivan G.
  • 700
  • 8
  • 19
3
votes
1 answer

Why generating code (java) from xsd with cxf-xjc-plugin doesn t work on jdk 11 (amazon), but did on java 8

I migrate a project from Java 8 to Java 11, and I got some trouble in generating code from XSD using the cxf-xjc-plugin. Even that I did upgrade cxf-xjc-plugin to version 3.3.0, still getting exceptions while building the project my pom.xml …
Achraf Elo.
  • 305
  • 3
  • 11
3
votes
1 answer

cxf-xjc plugin "Must specify xsdOptions" error

I am using cxf-xjc plugin to generate Java classes. This is the xjc command that successfully generates Java classes. xjc -d C:\Users\abc\devEnv\VcloudJavaClasses -catalog C:\Users\abc\devEnv\schema-files\schemas\external\catalog.xml -b …
Salih Erikci
  • 5,076
  • 12
  • 39
  • 69
3
votes
2 answers

How to use cxf-xjc-ts with ToStringBuilder from lang3?

When using the cxf-xjc-ts plugin during xsdtojava, one can add the property -Xts to let the compiler generate the following method: import org.apache.commons.lang.builder.ToStringBuilder; @Override public String…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
3
votes
0 answers

Get "Provider x not a subtype" when using JAXB extensions

I previously posted this, but I think it's best if I rephrase the issue, as I've gotten no useful response from this or any of the other places I've tried to ask about this. I'm attempting to use a couple of existing JAXB extensions while generating…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
3
votes
1 answer

Can I alter the typesafeEnumMemberName generated bij cxf-xjc-plugin?

I'm generating java class files using org.apache.cxf:cxf-xjc-plugin from an xsd. I'm using the global binding typesafeEnumMemberName="generateName" so the plugin generates member names for the enum class when the plugin cannot create a valid Java…
Peter
  • 114
  • 3
  • 11
2
votes
0 answers

How to configure jaxb/xjc to generate only one class instead of duplicates from imported complexType in more xsd-s?

Suppose I have 2 xsd-s. The first declares type A. The second imports the first xsd (import namespace, xmlns:ns=... etc.) and declares type B, which extends type A (base="ns:B"). Like this:
tkalvin
  • 71
  • 1
  • 8
2
votes
1 answer

How to run cxf-xjc-plugin with Spring-Boot?

I'm trying to set up a simple project that should generate xsdtojava using cxf-xjc-plugin. The project also uses spring-boot. Result during mvn package: [INFO] Building jar: /tmp/cxf-xjc-plugin3386923426289303800.jar [DEBUG] Error: Could not find or…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
2
votes
1 answer

Integration of jaxb binding file using CXF to generate client based on WSDL

I am trying to incorporate a JAXB binding file when using CXF XJC plugin to call wsdl2java. So I actually am generating the wsdl and using -createxsdimports to create external schema files so I can then execute the JAXB binding on that specific…
mstelz
  • 610
  • 4
  • 9
  • 19
2
votes
0 answers

Issue in using Annotate Plugin(Annox) with "cxf-codegen-plugin"

I am developing RESTFul services in my application. We are using 'cxf-codegen-plugin' to generate the JAXB classes from the schema. For a given requirement, I need to add some annotation to the generated JAXB classes and I was trying to use Annotate…
Rohit Gupta
  • 91
  • 1
  • 8
1
2 3