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

specify type for IDREF in XML schema

I am generating Java objects from an XML schema using xjc. I would like to reference the same element multiple times within the document using IDREF. I would also like to constrain the objects referenced by IDREF to a specific type. I'd like to…
undefined
  • 5,534
  • 3
  • 42
  • 58
11
votes
3 answers

Selecting nodes with XPath for binding a subset of classes with JAXB

Simplified Question: What's the XPath to select all XML nodes with an attribute that ends with the string "Notification". The first and third nodes in this snippet:
matt burns
  • 22,440
  • 9
  • 91
  • 102
11
votes
2 answers

Generate additional custom method with jaxb-xjc

There's some way to generate a custom method within an class generated with JAXB. I search around tutorials, including oracle's tutorial, but I didn't find clear instructions how can I custom methods to a generated class described on XML Schema.
Andre Pastore
  • 2,557
  • 4
  • 28
  • 42
11
votes
3 answers

JAXB XJC compiler disregarding mixed=true on XML Schema documents

XJC seems to be completely ignoring mixed="true" on my XML Schema elements thereby not allowing me to extract text content. From the sample XML below, I need to be able to extract "Title Text." Without mixed="true" being recognized, no accessor is…
Kaleb Pederson
  • 43,537
  • 19
  • 96
  • 144
11
votes
2 answers

Generating unique serializable id for each of the generated classes in JAXB

I am using ant wsimport to generate client stub from the wsdls. Also, I would like to generate client classes that implements Serializable. I would like to generate a different serialVersionUID for each class. I tried with the binding file that was…
javageek
  • 111
  • 1
  • 3
11
votes
2 answers

generate Go structs from XSD

recently I am planing to do a project using Go. My problem is : given a XSD file, how to auto-generate structs in Go to represent the XML elements. It is similar to using 'xjc' to generate java classes from XSD. So is there any tools or packages to…
user2912044
  • 111
  • 1
  • 3
11
votes
1 answer

Remove intermediate class when generating code from schema

Let's assume we defined a collection type in XSD as
mibollma
  • 14,347
  • 6
  • 44
  • 65
11
votes
3 answers

Maven JAXB2 XJC plugin: M2E plugin execution not covered

I am using using the jaxb2 xjc plugin for generating java files from a XSD. Therefore I used to configure my pom.xml as follows: org.codehaus.mojo
Jean Logeart
  • 48,718
  • 10
  • 76
  • 108
10
votes
1 answer

JAXB xjc mapping to existing domain objects

I have done a lot of searching and cannot find a concise example of how to map an XML schema to existing domain objects instead of creating brand new ones utilizing xjc. I have created a bindings (xjb) file but still can find no way of…
colbyjax
  • 123
  • 1
  • 8
9
votes
2 answers

JAXB edit List getter?

I have my data model in the form of XSD files from which I then generate the corresponding Java files from xjc using command line. When I generate JAXB classes from an XSD, List type elements gets a getter method generated for them (with no…
Siddharth Trikha
  • 2,458
  • 6
  • 44
  • 93
9
votes
2 answers

JAXB External Custom Binding XJC Issue - Parsing results in empty node

Forgive me if this is a duplicate. Here is my binding.xjb file. But now i am getting the regular error that the complex type target "AddBankVaultRplyType" is not found. I don't see any issue. Can somebody help me with this? I am listing the xsd that…
juniorbansal
  • 1,153
  • 7
  • 29
  • 49
9
votes
1 answer

xjc/wsimport - JAXB binding ignored

The wsimport and xjc commands (Both downloaded as part of Java JDK) are ignoring the supplied jaxb binding file when the targeted wsdl/xsds are placed under some specific paths. To reproduce this behavior, the path C:\a can be used. This directory…
Orestis P.
  • 770
  • 5
  • 24
9
votes
4 answers

XML Schema to Java Classes with XJC

I am using xjc to generate Java classes from the XML schema and the following is an excerpt of the XSD.