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

How to make jaxb plugin use OffsetDateTime

We have a xsd with xs:dateTime fields. This is our in-house internal API, and we can guarantee that the offset data is always included, so that it's ISO-8601 compatible. For example: 2016-01-01T00:00:00.000+01:00 Currently, the jaxb2 plugin maps…
3
votes
2 answers

JAXB Error : has more than one mapping. Due to two Object Factories with the same Bean

I have two Maven JAXB Projects. A: Main Maven JAXB stubs XSD project, this contains BASKET.xsd B: Maven JAXB stubs User-Project that wants to wrap BASKET.xsd in their own Objects. This results in TWO Objects factories (different packages), both…
jeff porter
  • 6,560
  • 13
  • 65
  • 123
3
votes
1 answer

Trouble connecting to SOAP service via Java and IntelliJ

I'm having trouble sending off a simple SOAP request and getting a response inside my java project. I'm still fairly new to doing this via java so I've been looking at this tutorial since I'm also using spring-boot in the rest of my…
user1818298
  • 509
  • 2
  • 8
  • 23
3
votes
1 answer

How to apply different customizations for different schemas using JAXB

In our maven project, we have a folder that holds several xsd and xjb files. So we apply the JAXB customization using maven-jaxb2-plugin. Currently, we have two xjb files applied to all xsd 1)GlobalBindings.xjb 2)ServiceSpecific.xjb.…
KumarRaja
  • 121
  • 4
  • 9
3
votes
1 answer

How do I add attributes to a root element when the class is generated by JAXB?

I'm developing a REST API that uses Spring MVC. The objects I consume and produce are generated (using JAXB) from NCPDP (http://www.ncpdp.org/) XSDs. I have everything working when requests come in, but I'd like to add additional attributes to the…
Matt Raible
  • 8,187
  • 9
  • 61
  • 120
3
votes
1 answer

jaxb, wsdl file, duplicated classes

I have the following problem. I have project A where I have common.xsd file, and project B which have dependency to project A and have main.xsd file. I use episode files and my pom in B looks like this
Unyx
  • 97
  • 2
  • 8
3
votes
1 answer

jaxb2-maven-plugin with external XSD dependencies

We have a common set of XSDs (datatypes, vocabulary, etc.) we're generating with the jaxb2-maven-plugin in its own Maven project. In a second project, I need to refer to one or more of those XSDs at compile time but don't want them included in the…
MolonLabe
  • 168
  • 2
  • 8
3
votes
2 answers

How to get the minOccurs / maxOccurs values from the XSD in Java using JAXB?

My application is calling a webservice and I have generated the Java classes from the WSDL/XSDs with the maven-jaxb2-plugin. The webservice calls worked fine for a while but recently I had a problem on marshalling an object into…
RayBenschi
  • 33
  • 1
  • 4
3
votes
2 answers

Add explicit source directory in jaxb2-maven-plugin for schemagen

I would like to generate schema from JAXB annotated classes. For this, I am using jaxb2-maven-plugin. The plugin by default scans src/main/java folder for included sources. I would like to specify an extra folder to scan for java classes which is…
White Roses
  • 309
  • 1
  • 6
  • 16
3
votes
1 answer

Generating java classes using maven-jaxb2-plugin

I am very new to Jaxb and this maven-jaxb2 plugin Here is my .xsd file :
Ruby
  • 873
  • 5
  • 20
  • 47
3
votes
3 answers

Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.5:xjc

I have jaxb2-maven-plugin version 1.5 and axistools-maven-plugin version 1.4 When I do maven generate sources I get an error .. any help would really appreicate. [INFO] [INFO] --- jaxb2-maven-plugin:1.5:xjc (default) @ TouchStoneCore --- [INFO]…
user2124733
  • 51
  • 1
  • 1
  • 4
3
votes
1 answer

JAXB equals and Hashcode: gives error

I'm trying to get my pom.xml to generate the hashCode() and equals methods() on my JAXB objects.
jeff porter
  • 6,560
  • 13
  • 65
  • 123
3
votes
1 answer

jaxb2 maven plugin, define multiple schema files in separate tags

I'm using maven jaxb2 plugin to generate Java classes from xsd files. Recently i faced problem, my schema files list geting really long, and I wrote all of them down in shemaFiles tag as comma separated values, and the line itself is very long and…
Zygimantas Gatelis
  • 1,923
  • 2
  • 18
  • 27
3
votes
1 answer

Class reuse with JAXB bindings don't honour SimpleTypes

I'm trying to reuse classes that are already compiled and available. This looks to be achievable by declaring bindings to the pre-existing classes as per example bindings extract below:-
Tom Hargrave
  • 308
  • 4
  • 8
3
votes
1 answer

JAXB Impl generating incorrect namespaces in the marshalled xml

I am using JAXB to marshal/unmarshal an xml document based on defined schemas. What I am noticing is that JAXB is producing incorrect namespaces in the marshalled xml. Here are the details - soap.xsd -->