Questions tagged [maven-jaxb2-plugin]

This Maven 2 plugin wraps the JAXB 2.x XJC compiler and provides the capability to generate java sources from schemas.

325 questions
9
votes
2 answers

When generating java sources with maven-jaxb2-plugin, how to enable setters for collections?

I am generating POJOs from XSD schemas using the maven-jab2-plugin. My generated classes don't have setters for any fields that are collections. How do I generate setters for collections? Can anyone explain the reasoning for setters to not be…
PotataChipz
  • 505
  • 5
  • 11
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
7
votes
2 answers

How can I get JAXB2 to emit CamelCase bindings?

I'm generating Java classes from a WSDL using the jaxws-maven-plugin's wsimport goal. Out of the box, this generates hideous classes and methods from the XML schema; e.g., a class called MYOBJECT from an XML element named MY_OBJECT. I've found that…
Lyle
  • 3,724
  • 3
  • 25
  • 25
7
votes
1 answer

maven-jaxb2-plugin reusing commons XSD within same project

I have a project which has a schema A and B, both within the same namespace. Both import schema C which also uses the same namespace. How can I generate JAXB classes for A and B to separate packages, while reusing the JAXB classes from C generated…
Benny Bottema
  • 11,111
  • 10
  • 71
  • 96
7
votes
2 answers

maven-jaxb2-plugin VS jaxb2-maven-plugin for multiple schemas

I have multiple xsd schemas that I want to unmarshall into different packages under the same folder target/generated-sources/xjc. I tried both plugins and both seem to work fine with these 2 configurations but in case of maven-jaxb2-plugin the…
Tinou
  • 5,908
  • 4
  • 21
  • 24
7
votes
4 answers

Maven JAXB plugin executing only one excecution

I am trying to generated sources from two XSD schemas. My JAXB maven plugin looks like this: com.sun.tools.xjc.maven2 maven-jaxb-plugin 1.1.1
Paulius Matulionis
  • 23,085
  • 22
  • 103
  • 143
7
votes
1 answer

JAXB XmlAnyElement set namespace attribute

I have a simple Java class I am annotating with JAXB: class Foo { @XmlAnyElement(lax=true) List any; } Which produces the following schema:
schmimd04
  • 1,444
  • 3
  • 14
  • 23
6
votes
3 answers

JAXB Bindings to schemas in a JAR

I'm using the maven jaxb2 plugin to generate Java classes, built from schemas in a jar. However, I'm not sure how to correctly locate to these schemas from a bindings file. If Iextract the schemas from the jar and drop them in the same directory as…
user1234057
  • 353
  • 1
  • 4
  • 10
6
votes
3 answers

How to specify the JAXB version in maven-jaxb2-plugin?

I need to use the latest version jaxb: 2.2.4-1, but maven or maven-jaxb2-plugin seems to pick up the one from the JDK. I tried specifying the version like this: 2.2 ... but the…
ivant
  • 3,909
  • 1
  • 25
  • 39
6
votes
0 answers

Migration Jave 11 _ How to resolve : java.lang.ClassNotFoundException: javax.activation.MimeTypeParseException

I'm migrating my java project from 8 to 11 version. As javax.activation has been removed from JDK 11, so I added it to Maven pom.xml file : javax.activation activation
Mohamed
  • 2,342
  • 4
  • 21
  • 32
6
votes
3 answers

Generate java classes from a wsdl url with basic authentication

I am trying to generate the java classes from a WSLD file, that uses basic authentication. Although there are many plugins out there, I have to use the following one: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin With wsimport or wsdl2java i have found…
Eirini Graonidou
  • 1,506
  • 16
  • 24
6
votes
0 answers

Why is a SoapActionCallBack sometimes necessairy?

I'm working on a webservice client using Spring-WS. It's not my first webservice project, using Spring-WS. But I am new in this particular project. We generate dao-objects by using the maven-jaxb2-plugin. I'm using Spring-WS WebServiceTemplate, with…
Kornelito Benito
  • 1,067
  • 1
  • 17
  • 38
6
votes
1 answer

Maven jaxb2 plugin in Gradle

I need to migrate a maven project to gradle. The maven project uses the maven-jaxb2-plugin like this (version for the plugin is set in a root pom.xml): ... maven-jaxb2-plugin
Farzad
  • 1,770
  • 4
  • 26
  • 48
6
votes
0 answers

Maven jaxb2 plugin not generating operations

When I generate Java classes from the WSDL file found here : http://wsdl-bug.s3.amazonaws.com/magento.xml, it successfully generates classes but no operations. It generates the classes for the types and it generates classes for requests/responses…
6
votes
1 answer

JaxB adds undescore(_) when generating Enumerations from XSD

I use maven JaxB plugin to generate source from XSD. The plugin details are as below, org.jvnet.jaxb2.maven2 maven-jaxb2-plugin 0.8.3 Enumerations defined in XSD has two…
Rajkumar Palani
  • 2,211
  • 2
  • 19
  • 25
1
2
3
21 22