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
2
votes
3 answers

How do I generate equals and hashCode with the CXF xjcplugin

I am trying to generate a Java class containing the methods toString, equals and hashCode from an XSD file. I got toString working, but I am not able to figure out how to get the CXF plugin to generate the equals and the hashCode methods. This is my…
Morten Banzon
  • 33
  • 1
  • 8
1
vote
1 answer

cxf-xjc-plugin: generate javax instead of jakarta imports

How to configure latest org.apache.cxf plugin to generate java classes with javax instead of jakarta imports? org.apache.cxf cxf-xjc-plugin
makozaki
  • 3,772
  • 4
  • 23
  • 47
1
vote
0 answers

cxf-xjc-plugin: how to add @XMLRoot Annotation to complex type?

I have a XSD Schema and there is an "any" element That means that here I can add any element…
Mulgard
  • 9,877
  • 34
  • 129
  • 232
1
vote
1 answer

java modularization and cxf-xjc-plugin generated packages from xsd files

I have a module module-info.java -- module my.module.with.cxf.generated.packages { requires slf4j.api; requires spring.context; requires java.persistence; requires spring.beans; requires org.apache.cxf.core; requires…
miroana
  • 494
  • 3
  • 22
1
vote
1 answer

Generate Java Classes with XSD Restrictions built in

Working on a large integration project where we are also doing validation on some of the data which we are integrating back and forth. We are using the CXF-XJC-plugin to generate java classes from XSD and WSDL files. It would be very keen to have…
Wisienkas
  • 1,602
  • 2
  • 17
  • 22
1
vote
2 answers

Convert date type to string in jaxb using bindings

I'm getting the error message: Could not convert xsd:date to java.lang.String type I'm using a binding.xml file with CXF XJC plugin XSD:
Sparkle8
  • 225
  • 3
  • 13
1
vote
1 answer

How to use JAXB autoInheritance for generated classes from WSDL?

I'm generating java classes from soap webservices wsdl. The requests do not share a common interface, but I'd like them to implement one, or extend a common class. Therefore I'm trying to use the xcj-plugin. The…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
1
vote
3 answers

Turn off or configure java.util.Logging during Maven build

I want to clean up/unify the log output of a Maven build. Unfortunately, a dependency of a maven plugin uses java.util.Logging (JUL). Simply adding org.slf4j:jul-to-slf4j as an additional dependency to redirect the log output doesn't help.…
Markus Ratzer
  • 1,292
  • 3
  • 19
  • 29
1
vote
0 answers

SimpleType - Aggregation or Abstraction

I face a weird problem. I'm supposed to use a number of third party XSDs for a webservice. My framework of choice is Apache CXF, and I generate code using its Maven plugin. So far so good, everything works, neither generation nor webservice itself…
Scorpio
  • 2,309
  • 1
  • 27
  • 45
1
vote
1 answer

generate Java classes from DTD with equals() and hashCode() methods

I'm get used using XJC tool from command line. But I realized that I'm not able to generate Java classes with equals() and hashCode() methods using it. I used this: xjc -dtd -d directory -p com.example.package file.dtd I don't know how to generate…
logoff
  • 3,347
  • 5
  • 41
  • 58
0
votes
0 answers

JAXB2 - XJC - Problem with XmlElement.type on generated class

TLDR: I have to generate Java classes from an XSD, and one of the fields of the "Main" object is another generated class. The field has an annotation @XmlElement, which has a property "type = Object.class " while having the field type = "SubObject".…
Cps
  • 1
  • 2
0
votes
0 answers

jaxb:extensionBindingPrefixes is not working for cxf-xjc-plugin?

cxf-xjc-plugin isn't working as expected. I am getting the following issue after a clean install in maven (java11) vendor extension bindings (jaxb:extensionBindingPrefixes) are not allowed in the strict mode. Use -extension What is the error cause…
Aguid
  • 943
  • 2
  • 10
  • 24
0
votes
0 answers

Intellij path rule to automatically recognize generated sources folder

I would like to know if it is possible to set up a rule that marks a generated sources folder as generated sources root in Intellij Idea automatically. Usually, Intellij detects the target/generated-sources directory as generated sources. My problem…
tkalvin
  • 71
  • 1
  • 8
0
votes
1 answer

cxf-xjc-plugin maven error "cowardly refuses to write to a non-existent directory "src\main\java""

I am trying to build my maven project which creates POJOs from .xds schema files. I am using cxf-xjc-plugin for xjc execution using below plugin definition. org.apache.cxf
Ashish Sinha
  • 31
  • 1
  • 3
0
votes
1 answer

MojoExecutionException when generate sources cxf-xjc-plugin:3.3.0 java11

I try to generate java classes from xsd in a maven project using cxf-xjc-plugin. But when I try to generate the sources, I have an error. I tried to use another version of the plugin: 3.2.3 but it didn't help.
AnnKont
  • 424
  • 4
  • 17