Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[JAXB] Not able to generate IMPL file using xjc

 
calvinkaiwen calvinkaiwen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am not able to generate IMPL files using xjc command, can anyone help please? Thank you.

input:
xjc -p com summary.xsd

output:
C:\jaxb-ri-20051223\bin>xjc -p com summary.xsd
parsing a schema...
compiling a schema...
com\CaseType.java
com\OESSubCompType.java
com\OESType.java
com\ObjectFactory.java
com\SPCasesType.java
com\SummaryType.java



summary.xsd
------------

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="SummaryType">
<xs:sequence>
<xs:element name="totalstucnt" type="xs ecimal" maxOccurs="1" minOccurs="1" />
<xs:element name="withdrawstucnt" type="xs ecimal" maxOccurs="1" minOccurs="1" />
<xs:element name="intakeid" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="oes" type="OESType" minOccurs="1" maxOccurs="1" />
<xs:element name="spcases" type="SPCasesType" minOccurs="1" maxOccurs="1" />
<xs:element name="testing" type="SPCasesType" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="OESType">
<xs:sequence>
<xs:element name="oessubcomp" type="OESSubCompType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="OESSubCompType">
<xs:sequence></xs:sequence>
<xs:attribute name="code" type="xs:string" use="required" />
<xs:attribute name="present" type="xs ecimal" use="required" />
<xs:attribute name="absent" type="xs ecimal" use="required" />
</xs:complexType>
<xs:complexType name="SPCasesType">
<xs:sequence>
<xs:element name="case" type="CaseType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="CaseType">
<xs:sequence></xs:sequence>
<xs:attribute name="code" type="xs:string" use="required" />
<xs:attribute name="count" type="xs ecimal" use="required" />
</xs:complexType>
<xs:element name="summary" type="SummaryType"></xs:element>
</xs:schema>
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

We have a forum dedicated to XML question, which is were I'm moving this thread. FInd it there and continue the discussion.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't specify what the exact problem is, nor what the error messages were, if there were any.
The command you specified should have created :
C:\jaxb-ri-20051223\bin\com\*.java (which it seems to have)
C:\jaxb-ri-20051223\bin\com\impl\*.java
C:\jaxb-ri-20051223\bin\com\impl\runtime\*.java

For the JAXB tutorial I used a batch file:

Note that the generated source was redirected to another directory which had to be created separately.
JavaTM Architecture for XML Binding Binding Compiler (xjc)
[ April 17, 2006: Message edited by: Peer Reynders ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic