Questions tagged [xjc]

XJC is a JAXB tool for compiling XSD (XML Schema) to Java source code.

XJC is a JAXB tool for compiling XSD (XML Schema) to Java source code.

687 questions
0
votes
3 answers

How to remove namespace from generated JAXB

Using JAVA 7, XJC. The xsd is provided by a 3rd party that uses .NET. The issue at hand is that when I marshal the object into XML I get something along these lines:
boyd4715
  • 2,563
  • 7
  • 46
  • 75
0
votes
0 answers

xjc not generating corresponding class member for

Here is the part of schema that I am using:
Harsh Shah
  • 198
  • 1
  • 8
0
votes
0 answers

Unable to find the mojo 'xjc' in the plugin 'org.codehaus.mojo:jaxb2-maven-plugin'

I've been compiling my project happily for over a year now with Maven and suddenly today I'm getting the error mentioned in the title, ie : Unable to find the mojo 'xjc' (or one of its required components) in the plugin…
Sandy
  • 485
  • 1
  • 7
  • 19
0
votes
1 answer

How I made the XJC ant task use more than one bindings file?

I am trying to use the XJC ant task to generate some classes in a gradle script. I have no problem to generate them if I use only one bindings file (for class renaming0, but I soon as I try to use more (an episode file), they are royally ignored by…
Teocali
  • 2,328
  • 1
  • 20
  • 34
0
votes
1 answer

wsimport (xjc) - why list getter has always null check?

I'm wondering why generated (from xsd) getter for list has always null check: public class Response { @XmlElement(type = Integer.class) protected List integers; public List getIntegers() { if (integers ==…
Hubert
  • 905
  • 1
  • 16
  • 33
0
votes
1 answer

NullPointerException in XMLEntityManager when trying to compile an xml schema with xjc / ant

I'm seeing an exception, seemingly inside some sun classes, when trying to compile an xml schema. I've compiled this schema many times before, so I don't suspect the schema of being problematic. I think something may have changed in my java VM,…
mdarwin
  • 1,405
  • 6
  • 25
  • 58
0
votes
1 answer

Annotation with parameter using annox

I am searching for a way to use "annox" to annotate a generated class. The goal is to add a hibernate annotation to the generated class, that has a constructor value. Here is an example of the desired result: public class XJCGeneratedClass…
0
votes
1 answer

How to change the implementation of getter with Jaxb Xjc?

I have the following xsd schema:
BenMansourNizar
  • 1,362
  • 3
  • 19
  • 35
0
votes
2 answers

XJC with Krasa Plugin

Hello i get a build error when i execute the following ant-script. Can somebody help me to resolve the problem? ANT output: Buildfile: D:\workspace\Webformular2\WebContent\WEB-INF\XSD-Pfad.ant [delete] Deleting directory…
David
  • 1
  • 1
0
votes
1 answer

JAXB binding XPath error

I am attempting to fix a collision when JAXB is generating classes from a set of XSDs. Here's the XML: ... ... …
fazed
  • 71
  • 1
  • 5
0
votes
1 answer

JAXB Create New Element Using binding XML

I'm using XJC to create JAXB annotated Java classes based on a schema file. My issue is that the schema file provided by a third party is missing a field on an object that actually is present in the XML message itself. Is there a way using an XML…
Bryan Larson
  • 465
  • 1
  • 7
  • 21
0
votes
1 answer

Java's XJC like tool in Python

Is there a equivalent tool in python like XJC? XJC takes a schema and generates Java classes. One can populate a in-memory data-structure using these classes. No need to write them by hand.
Dilawar
  • 4,808
  • 9
  • 37
  • 54
0
votes
1 answer

Filtering an XSD as part of a Maven build

How can I produce a 'filtered' version of an XSD (ie minus certain elements) as part of a Maven build? An API I'm working on has it's model defined by an XSD, which is turned into Java classes by XJC. I want to have annotations appear in the…
EngineerBetter_DJ
  • 11,630
  • 15
  • 81
  • 158
0
votes
1 answer

XJC xsd:any parsing

I have an element in XSD schema: Is it possible to switch processContents to strict through XJB binding? Without modifying schema file. May be set it as global property. I want to get: @XmlAnyElement(lax =…
Mikhail
  • 4,069
  • 12
  • 30
0
votes
1 answer

Generate serializable classes via XJC without xsd change

Is there any way to generate classes implementing Serializable with xjc without changes in xsd? Initially (and I tried it with no luck) I thought that binding.xml for xjc would do the job but apparently it is not possible without placing…
xwhyz
  • 1,296
  • 4
  • 17
  • 38