This Maven 2 plugin wraps the JAXB 2.x XJC compiler and provides the capability to generate java sources from schemas.
Questions tagged [maven-jaxb2-plugin]
325 questions
3
votes
2 answers
maven-jaxb2-plugin episode of same project in Maven, possible?
I have a basic.xsd and two other A.xsd and B.xsd. A.xsd and B.xsd get converted into two different java packages, therefore I need two Maven executions of the same plugin.
Both XSDs refer to basic.xsd for some shared classes. If basic.xsd would come…

Franz Kafka
- 10,623
- 20
- 93
- 149
2
votes
3 answers
JAXB Marshaller - How do I suppress xmlns namespace attributes?
I generate XML using JAXB2 for an standalone java app that uses maven 3, jaxb2, FIXML schemas and maven-jaxb2-plugin. When I marshall the XML, the output root element has xmlns attributes in them. How do I remove this?
From:

arrehman
- 1,322
- 6
- 31
- 42
2
votes
3 answers
Is there a way to generate value constructors when creating Java code using jakarta dependencies in JAXB?
I'm migrating my JAXB code from the javax.* to the jakarta.* dependencies. Until now I used the following maven plugin to generate the Java…

Philipp Kemkes
- 43
- 6
2
votes
0 answers
How to add custom String to List jaxb xml adapter to an xsd generated class attribute
We have been using jaxb for a long time to unmarshal XML into POJOs that we can use within our system. However, only recently I found an issue with how jaxb is parsing the xml provided data and I would like to override that behavior by implementing…

CjRobin
- 161
- 1
- 1
- 14
2
votes
0 answers
JAXB SAXParseException after migrating from Java8 to Java11
I'm upgrading a Spring Boot 2.7.0 project from Java 8 to Java 11.
The project is using maven-jaxb2-plugin to generate classes from wsdl files.
This is the configuration
org.jvnet.jaxb2.maven2
…

Cristian
- 417
- 1
- 9
- 18
2
votes
1 answer
Why JAXB maps the java object to the complex type instead of the element?
I have this XSD: (fragment)
…

ssedano
- 8,322
- 9
- 60
- 98
2
votes
1 answer
SoapFaultClientException : Failed to find header
A SOAP Web-service, which accepts request in following format -

CR Sardar
- 921
- 2
- 17
- 32
2
votes
1 answer
JAXB Binding - defined the return type of List methods
I have this schema and i'm using JAXB to generate java stub files.

emeraldjava
- 10,894
- 26
- 97
- 170
2
votes
1 answer
How to create POJO class from a CDA schema without changing the xds file?
I have a large CDA schema file which is used in generation of a CDA xml document. I want to generate POJO classes using the xds schema during compiling of code.
I am trying to do this with jaxb2-maven-plugin as below:
…

Shubham Anand
- 53
- 6
2
votes
1 answer
Getting unexpected element error when trying to communcate to soap client
I'm trying to consume wsdl client that can be found on this link https://tim-erp.com/ERPX_WEB/awws/ErpX.awws?wsdl
My java code looks like this
public class SoapServicesImpl extends WebServiceGatewaySupport implements SoapServices {
@Override
…

laban_luka
- 399
- 1
- 4
- 11
2
votes
1 answer
JAXB2 cannot generate classes for XSD due to '[..]ToStringStrategy cannot be converted to [..]ToStringStrategy2'
I've found an issue with toString generation when using maven-jaxb2-plugin with org.jvnet.jaxb2_commons.jaxb2-basics at version 0.12.0. Instead of generating JAXBToStringStrategy.INSTANCE2, it uses INSTANCE which is incompatible with…

n1t4chi
- 502
- 2
- 12
2
votes
0 answers
JAXB difference between XsdSchema and XsdSchemaCollection while creating the DefaultWsdl11Definition bean
I explore the JAXB and the JAXB2 Maven plugin. I am confused of the bean instantiation.
I have two schemas in src/main/resources with the same namespace www.mycompany.com. schemaA.xsd and schemaB.xsd have the same header:

Nikolas Charalambidis
- 40,893
- 16
- 117
- 183
2
votes
0 answers
JAXB complex element and its child with the same name
Does anybody know how to solve the problem caused by a complex element and its child with the same name?
Env: Ubuntu, Java 10, maven-jaxb2-plugin:0.13.3
XSD:

Wianki
- 21
- 4
2
votes
1 answer
how can JAXB2 directly use WSDL url instead of .WSDL file
I have installed the JAXB2 maven plugin in my project.
The .WSDL file which generated from my SOAP WebService is located in the project directory, But I want JAXB2 to directly use WSDL URL instead of using the .wsdl file.

Aliasghar Yaghoobzadeh
- 1,881
- 2
- 12
- 10
2
votes
1 answer
Unable to generate SOAP client files from local WSDL file
A lot of reading I've done on this. Seems very staight-forward. If you see the pom file you can see that rather than creating the class files from a remote URL, I have the file that has to be part of the project. The commented out configuration…

Travis
- 203
- 1
- 3
- 13