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
0
votes
0 answers

maven-jaxb-plugin

I am using this plugin to generate java source from XSD.It is generating fine. org.codehaus.mojo jaxb2-maven-plugin
user1137387
  • 1,933
  • 3
  • 18
  • 27
0
votes
1 answer

Pbm marshaling XML with classes generated via JAXB2

today is one day I think I'll become crazy. I would like to generate some code to be able to mashshall/unmarshall XML files. I'm starting with an XSD that I pass to JAXB2 to generate Java classes via a maven module => It's OK. Then I'm using those…
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

Not able to generate java stubs from .wsdl files using jaxb-runtime 4.0.3 and maven-jaxb2-plugin 0.15.3

I am using Java 17. It works fine if I use jaxb-runtime 2.3.3 and maven-jaxb2-plugin 0.14.0. I need to upgrade to jaxb-runtime 4.0.3. In .xjb I have replaced all javax.xml.bind.annotation.XmlRootElement by jakarta.xml.bind.annotation.XmlRootElement…
0
votes
1 answer

Cannot generate VMAP classes from xsd

I started a project on github using maven-jaxb2-plugin to generate VMAP classes from the vmap xsd. The problem I am running into appears to be an issue with the xsd itself. [ERROR] Error while parsing schema(s).Location […
John Mercier
  • 1,637
  • 3
  • 20
  • 44
0
votes
1 answer

jaxb2 Maven Plugin Fails to generate Java Packages with correct Imports or throws errors

I'm currently using the Maven jaxb2 plugin to generate POJOs from my XSDs. I have a few issues so far. I have 1 parent XSD that imports another XSD that in turn imports 2 other XSDs. a.xsd -> b.xsd -> (c.xsd & d.xsd) In my POM file configuration for…
millerbill3
  • 199
  • 2
  • 16
0
votes
1 answer

File Not Found : maven-jaxb2-plugin

i am trying to compile schema from an artifact(dependency) using jaxb2 plugin , i followed the topic: Compiling a schema from a Maven artifact in http://confluence.highsource.org/display/MJIIP/User+Guide#UserGuide-UsingcustomJAXB2plugins and the…
gnanesh
  • 321
  • 1
  • 3
  • 12
0
votes
0 answers

jaxb problem, error message when compiling

When I compile my code I have an error because of jaxb2. the error message: Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.4:xjc (xjc) on project commandecartes: can't parse argument number: ''http://java.sun.com/xml/ns/jaxb'': For…
0
votes
1 answer

Can't extends base schema in maven-jaxb2-plugin in a secondary project

I'm not able to extends an xsd schema from another project. I've a basemodel.xsd in a jar project (ModelBase:jar), which also contains generated classes via maven-jaxb2-plugin. I'm trying to extends that model in another project (test), using…
ggallo
  • 3
  • 2
0
votes
0 answers

Generate both beans and META-INF in the same folder jaxb2-maven-plugin 2.3

I'm using jaxb2-maven-plugin version 2.3 to generate jaxb java beans. It works well and generate the beans as expected under src/main/java/x/y/z. A META-INF/sun-jaxb.episode file is created under src/main/java. The point is that I want to be able…
TCH
  • 421
  • 1
  • 6
  • 25
0
votes
0 answers

Unmarshalling Error: unexpected element (uri:"http://ws.info.ss/xml/SVV/Data/2021-02-15/Data.xsd", local:"data"). Expected elements are <{}data>

When making a soap call I get an Unmarshalling error. And I am not sure what is causing it. I am using a WSDL that is provided by the organization. Unmarshalling Error: unexpected element…
JavaGeek
  • 335
  • 1
  • 2
  • 11
0
votes
1 answer

maven-jaxb2-plugin generates uncompilable code when using episode from org.jvnet.ogc/gml-v_3_2_1

I am trying to generate JAXB classes for the AIXM XSDs, which unfortunately are quite complicated and reference the even more complicated OGC GML 3.2.1, xlink and ISO 19139 schemas. I would like this code generation to occur during our Maven build,…
Joe Crivello
  • 52
  • 1
  • 10
0
votes
0 answers

jaxb2 generated class from main xsd and common xsd has different namespaces

I have 2 xsd schemas from which Im generating a class Message using maven-jaxb2-plugin. The main xsd is message.xsd and it imports common.xsd which holds some common types. However both have different target namespaces. This results in jaxb xml…
0
votes
1 answer

JAXB how to get QName based on java object

We are using maven plugin to generate a large number of Java pojos and ObjectFactory, similar to: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ProtectedABC", propOrder = { "aBC" }) public class ABC { @XmlElement(required = true) …
SoT
  • 898
  • 1
  • 15
  • 36
0
votes
0 answers

org.jvnet.jaxb2.maven2: maven-jaxb2-plugin - package com.sun.jmx.snmp does not exist

Trying to compile using maven-jaxb2-plugin for java 11 and getting package com.sun.jmx.snmp does not exist. Also i get the same issue using the latest version of 0.15.1 my pom