Schema Class Generator Problem
I'm getting this error msg when I do the following command line:
$java oracle.xml.classgen.oracg -s MySchema.xsd
<Line 455, Column -136>: XSD-2028: (Error) Invalid reference: 'http://www.w3.org/2000/10/XMLSchema:dateTime'
My XSD's header looks like this:
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.5">
Any idea?
Thanks,
Peter ;-)
null
The problem is due to missing "dateTime" in
class generator datatypes in 9.0.1. This will be updated and in 9.0.2beta (upcoming in few weeks) release.
null
Similar Messages
-
XML Schema Class Generator Problem compiling generated java programs
Hi,
I ran oracg on the po.xsd schema from X3Cs XML Schema Part 0: Primer which successfully generated the java codes. I ran into problems when I compile the generated classes. Here's what I'm getting:
C:\oracle\xml\xdk\demo\java\classgen\Po2>javac -classpath ".;C:\oracle\xml/lib/xmlparserv2.jar;C:\oracle\xml/lib/xschema.jar;C:\oracle\xml/l
ib/classgen.jar;.;C:\Program Files\VicunaJ521\java\lib\collections.jar;C:\Program Files\VicunaJ521\java\lib\vicunalite.jar;C:\Program Files\
XConverter\XConverter.jar;C:\Program Files\XConverter\IDLGenerator.jar; c:\jdk1.2.2\lib\dt.jar;c:\jdk1.2.2\lib\jvm.jar;c:\jdk1.2.2\lib\tools
.jar;c:\oracle\ora81\jdbc\lib\classes12.zip;c:\oracle\ora81\jdbc\nls_charset12.zip;C:\oracle\xml\lib\classgen.jar;C:\oracle\xml\lib\xmlparse
rv2.jar" *.java
.\types\PurchaseOrderType.java:75: Type expected.
public void addComment(null.Comment thecomment)
^
.\types\Items.java:141: Type expected.
public void addComment(null.Comment thecomment)
^
2 errors
Running the demo which comes with oracles version of po.xsd was OK. What's the difference between the po.xsd from oracle and the po.xsd from W3C? Are there any W3C recommendation for XML Schema not supported by Oracle's class generator?Which po.xsd do you use? Would you post it?
Thanks. Here's the copy of the po.xsd from the W3C website. (http://www.w3.org/TR/xmlschema-0/#po.xsd)
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
<xsd:complexType name="USAddress">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="zip" type="xsd:decimal"/>
</xsd:sequence>
<xsd:attribute name="country" type="xsd:NMTOKEN"
fixed="US"/>
</xsd:complexType>
<xsd:complexType name="Items">
<xsd:sequence>
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productName" type="xsd:string"/>
<xsd:element name="quantity">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="USPrice" type="xsd:decimal"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="partNum" type="SKU" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Stock Keeping Unit, a code for identifying products -->
<xsd:simpleType name="SKU">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema> -
XML Parser, Class Generator demo problem
Hello,
I have downloaded today the XML Parser and the Class Generator. I have successfully compiled the SampleMain.java coming with the kit. When running it there is a problem with the expected DTD filename input.
The program prints out the needed format as:
Usage: java SampleMain [-root <rootName>] <fileName>
fileName Input file, XML document or external DTD file
-root <rootName> Name of the root Element (required if the input file is an external DTD)
Whatever I try as DTD filename input fails.
I work on Windows-NT!
I have tried running with JDK 1.1.7.a and JDK 1.2.2.
Thanks, Yigal.java SampleMain Widl.xml
or
java SampleMain -root WIDL Widl.dtd
Make you have Widl.xml and Widl.dtd are
in the current directory. Also, remember
Java is case sensitive.
If you are still getting errors, please
post the error message.
null -
ANN: XML Class Generator for Java Available
The Oracle XMCL Class Generator for Java is now available as an
initial beta release on the Oracle Technology Network at
http://technet.oracle.com. Select 'xml' from the Technology menu.
The XML Class Generator will generate a set of Java source files
based on an input DTD. The generated Java source files can then
be used to construct, optionally validate, and print a XML
document that is compliant to the DTD specified. This is an early
beta release and has the following features:
* Creates Java Classes from DTDs to enable the programmatic
construction of XML documents.
* Supports validation mode to assist debugging.
* Works with the Oracle XML Parser in Java.
* Creates documents conforming to the W3C XML 1.0
Recommendation.
* Supports creating documents in the following encodings:
UTF-8
UTF-16
ISO-10646-UCS-2
ISO-10646-UCS-4
US-ASCII
EBCDIC-CP-US
ISO-8859-1
Shift_SJIS
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
nullThanks,
Rob
Oracle XML Team wrote:
: First, the link has been fixed. As to your access exception,
we
: have traced it to a difference between JDK 1.1.x and JDK 1.2.
: You can solve it by using a 1.1.x version of the JDK or wait
till
: our production version of our XML Parser becomes available
within
: a week which will work with 1.2.
: Oracle XML Team
: http://technet.oracle.com
: Rob Edagr (guest) wrote:
: : 1) The HREF on the download page for the NT version points
to
: : the version 102 parser not the classgen.
: : 2) After downloading and installing the classgen (by
guessing
: : what the url was) I ran it and get the following
: : C:\jdk1.2\xml\ora\classgen\sample>java SampleMain -root
: : wddxPacket wddx_0090.dtd
: : Exception in thread "main" java.lang.IllegalAccessError: try
to
: : access class oracle/xml/parser/XMLNode from class
: : oracle/xml/classgen/ClassGenerator
: : at oracle.xml.classgen.ClassGenerator.generate
(Compiled
: : Code)
: : at SampleMain.main(SampleMain.java:65)
: : Any idea on what the problem is (same error with sample dtd)
: : Rob
: : Oracle XML Team wrote:
: : : The Oracle XMCL Class Generator for Java is now available
as
: : an
: : : initial beta release on the Oracle Technology Network at
: : : http://technet.oracle.com. Select 'xml' from the
Technology
: : menu.
: : : The XML Class Generator will generate a set of Java source
: : files
: : : based on an input DTD. The generated Java source files can
: : then
: : : be used to construct, optionally validate, and print a XML
: : : document that is compliant to the DTD specified. This is
an
: : early
: : : beta release and has the following features:
: : : * Creates Java Classes from DTDs to enable the
programmatic
: : : construction of XML documents.
: : : * Supports validation mode to assist debugging.
: : : * Works with the Oracle XML Parser in Java.
: : : * Creates documents conforming to the W3C XML 1.0
: : : Recommendation.
: : : * Supports creating documents in the following
encodings:
: : : UTF-8
: : : UTF-16
: : : ISO-10646-UCS-2
: : : ISO-10646-UCS-4
: : : US-ASCII
: : : EBCDIC-CP-US
: : : ISO-8859-1
: : : Shift_SJIS
: : : Oracle XML Team
: : : http://technet.oracle.com
: : : Oracle Technology Network
: Oracle Technology Network
null -
Custom Application Class Embed problem aka AMBIGUOUS
package
com.drdynscript.examples{
import mx.controls.Image;
import mx.core.Application;
import mx.core.BitmapAsset;
import nl.demonsters.debugger.MonsterDebugger;
public class FlexTestApp4 extends Application{
//EXTERNAL IMAGE
Embed(source="./assets/logo.jpg")][
Bindable] private var logoClass:Class;
//UI COMPONENTS
Bindable] public var imgLogo:Image;[
Bindable] public var imgLogo2:Image;
public function FlexTestApp4(){
super();
//INITIALIZE
init();
private function init():void
//MONSERT DEBUGGER
MonsterDebugger.
trace(this, "INIT");}
public function createImage():void{
var imgObj:BitmapAsset = new logoClass() as BitmapAsset;imgObj.bitmapData.noise(4);
imgLogo2.source = imgObj;
MY MXML
<?xml version="1.0" encoding="utf-8"?><drdynscript:FlexTestApp4 xmlns:mx="
http://www.adobe.com/2006/mxml" layout="absolute" xmlns:drdynscript="
com.drdynscript.examples.*">
<mx:Style>
Application
backgroundImage: Embed(source="./assets/District9.png")
</mx:Style>
<mx:Image x="10" y="10" width="493" height="500" id="imgLogo" source="{logoClass}"/> //DOESNT WORK AMBIGUOUS
<mx:Image id="imgLogo1" source="@Embed(source='./assets/logo.jpg')"/>
<mx:Image id="imgLogo2" creationComplete="createImage()"/></drdynscript:FlexTestApp4>I stumbled over this problem today, too.
First, let me say that that problem did not exist with previous versions of the JWSDP. Now with 1.2 I noticed that wscompile generates class files with the same names as the custom classes that you wish to send over the net. Either this design is complete rubbish or indeed intentional, but the users are left alone, at least till the new tutorial is released.
The solution that seems to work for me is to simply replace the classes generated by wscompile with the original ones.
However I do not know if this will cause any problems or is the right way to handle the situation. Hopefully anybody of the responsible engineers at Sun will comment on this.
Regards,
Ingo -
Class generated by genInterface ant task does not compile
I am trying to build a web service from existing wsdl using genInterface and topDownAssemble ant tasks.
The wsdl contains following type definition. Java class generated from this type (see below) does not compile. The problem is that there are two class members named
'value'. Is this an issue with Web Services Assembly tool or there is some way to get
around it?
<s:simpleType name="quantityType">
<s:restriction base="s:string">
<s:enumeration value="summation"/>
<s:enumeration value="demand"/>
<s:enumeration value="value"/>
<s:enumeration value="consumption"/>
</s:restriction>
</s:simpleType>
// Version = Oracle WebServices (10.1.3.3.0, build 070610.1800.23513)
public class QuantityType implements java.io.Serializable {
private java.lang.String value;
private static final String _summationString = "summation";
private static final String _demandString = "demand";
private static final String _valueString = "value";
private static final String _consumptionString = "consumption";
public static final java.lang.String summation = new java.lang.String(summationString);
public static final java.lang.String demand = new java.lang.String(demandString);
public static final java.lang.String value = new java.lang.String(valueString);
public static final java.lang.String consumption = new java.lang.String(consumptionString);
public static final QuantityType summation = new QuantityType(_summation);
public static final QuantityType demand = new QuantityType(_demand);
public static final QuantityType value = new QuantityType(_value);
public static final QuantityType consumption = new QuantityType(_consumption);
AndreiPls set debug attribute of JWSC ant task to true or on, e.g.
<jwsc srcdir="." destdir="${output.dir}" debug="on" keepGenerated="true">
</jwsc> -
XML C++ SDK Class Generator Question
Hello.
I have an XML schema definition file where some elements are defined inside other elements. When I generate classes for this schema I don't get classes for such elements (but only for the outermost level elements). How to use the class generator in this situation ? Do I miss something ?
Thank you.
MarkQuestions related to the XDK products should be posted in the Technologies -> XML -> General Forum. If you like I can move you post to that forum.
-
Hi to all.
My problem is about how to directly load an existing xml file in an in memory structure without building a procedure that creates node by node and put it in the tree.
Is this possible?
Is possible to use the binding mechanism given by the ElementFactory interface of the DOM specification( I think it is not, because the class CGNode does not extend a base class that implements the Element interface
and it seems that doesn't implement that interface itself)?
thanks for anyone paing attenction to my request.I am aware of the type of input the Clas Generator accepts.
I have a DTD, let's call it "sample.dtd," and I need to use this DTD with the Class Generator. Can someone please show me how to instantiate the DTD object and use it with the Class Generator for Java? Thank you.
-Emad
null -
Hi
I found an example code for generating Java class based on the xml file.
i just want to know which package the following classes belongs to.Here the the classes
1. DTD
2.ClassGenarator
Thanks in advance
BalajiHi !
I am facing a similar problem
I am using classgen version 1.0.1.0.0
and xmlparser version 2.0.0.1.0....
everythings in the CLASSPATH...
I could compile the SampleMain.java in the classgen/samples directory .
But when i run it with any dtd or the provided widl.dtd i get the following error
XML Class Generator: Error Attribute Value should start with quote
Attribute Value should start with quote
at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:191)
at oracle.xml.parser.v2.XMLError.error(XMLError.java:97)
at oracle.xml.parser.v2.XMLError.error(XMLError.java:135)
at oracle.xml.parser.v2.NonValidatingParser.parseAttrValue(Compiled Code
at oracle.xml.parser.v2.ValidatingParser.parseAttr(ValidatingParser.java
:418)
at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(Compiled Cod
e)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(Compiled Code)
at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingPars
er.java:89)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
arser.java:181)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:142)
at SampleMain.main(SampleMain.java:45)
please help !
thanks
amit
null -
When creating a date time dimension using the dimension wizard and generate schema wizard, i would like to be able to change the owning schema from dbo to something else. The field is greyed out and I am unable to change it.
Is it possible to change the owning schema when generating datetime dimensions in the datasource?Hi rkbjr,
Thank you for your question.
I am currently looking into this issue and will give you an update as soon as possible.
Thank you for your understanding and support.
Thanks,
Bin Long
TechNet Subscriber Support
If you are TechNet Subscription user and have
any feedback on our support quality, please send your feedback here.
Bin Long
TechNet Community Support -
XML DevCon 2001: Submit schema and stylesheet problems- win XML Spy
There are only a few days to submit schema and stylesheet problems for XML
DevCon 2001 in London. If the workshop instructors use your submission
during the conference, you win a copy of XML Spy.
<shamelessPlug>
XML DevCon 2001 has a content-rich technical program with a faculty that
includes Henry Thompson (W3C Fellow), Peter Chen (IEEE Fellow, ACM
Fellow),
Martin Bryan (DIFFUSE Project), and authors such as Bob DuCharme, Ian
Graham, Elliotte Rusty Harold, G. Ken Holman, Benoît Marchal, JP
Morgenthal,
and Simon St. Laurent. There are a variety of eBusiness sessions,
including
panel discussions and presentations about ebXML, Web Services, and UDDI.
The program includes presentations by Jonathan Borden, Ron Bourret, Lee
Buck, Alex Chaffee, Mark Colan, John Evdemon, Meike Klettke, Andy
Longshaw,
Ingo Macherius, Simon Nicholson, David Orchard, Sebastian Rahtz, Daniel
Rivers-Moore, Michael Rys, Krishna Sankar, Matt Sergeant, Richard Tobin,
Priscilla Walmsley, David RR Webber and other distinguished faculty.
</shamelessPlug>
http://www.xmldevcon2001.com/London/html/conference.php
For a free pass to exhibits and special events (keynotes, joint XML UK and
British Computer Society meeting, OASIS XPath/XSLT meeting, vendor
presentations):
http://www.xmldevcon2001.com/London/html/special_events.php
Public submissions (schemas and stylesheets)
Three members of the W3C Schema Working Group (Michael Rys, Henry
Thompson, Priscilla Walmsley) will teach a Schema Workshop. Submit
problem schemas to them by e-mail:
[email protected]
or
http://www.xmldevcon2001.com/London/html/session.php?code=W5
Sebastian Rahtz, Bob DuCharme, Benoît Marchal, and Ken Holman will
present the "Stylesheets and Transformations: Best Practices" workshop on
Thursday, February 22 in London. To submit a stylesheet or problem
description for their workshop:
[email protected]
or browse to:
http://www.xmldevcon2001.com/London/html/session.php?code=T17
========== Ken North ======================
See you at Javacon 2001 (New York, March 1)
www.javacon2001.com
XML DevCon 2001: London (February 21-23) New York (April 8-11)
www.xmldevcon2001.com
=======================================Looks okay to me. But then I have no idea of what those "problems" are that you mentioned. Was there a particular reason you didn't tell us what they are?
-
Classes generated for Human Task UI
Hi All,
I created ADF UI out of a human task (using Automatically generate form option). After generating, I can see lot of .xml files under the HumanTaskForm package, in the newly generated project. I would like to know the way in which these classes (Java Bean) are generated under the HumanTaskForm package.
Also, when I update some values in the UI page at runtime, I am able to see the change , in the response message of the HumanTask. I would like to know, from where the binding information come from, for those UI components, so that they are able to update!
Kindly give me some good documents that would explain me regarding the bean classes generated for HumanTask.
When I searched for the same, I could get the documents regarding the configuration of Human Task only. I need information regarding the Bean classes for Human Task.
Thanks,
Sabarisri. NPlease post on the Jdeveloper and ADF Forum where you will get more help
JDeveloper and ADF -
I have already write a RMI example for self-study successfully, but there are a little class file problem that I'm not able fix it.
In my RMI example there are 3 .java files (RMIServer.java, RMIClient.java and a MethodImpl.java)
After I have javac and rmic them, I got RMIServer_Skel.class, RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
In order to run the RMI in a local envirnment, I divide them into 2 folders as listed below:
Server - RMIServer_Skel.class, RMIServer_Stub.class and the MethodImpl.class
Client - RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
Then when I start to run them in a DOC envirnment...
start rmiregistry........(run successful and another rmiregistry DOC window created)
java RMIServer.........Exception in thread "main" java.lang.NoClassDefFoundError: RMIServer
Oops? Class not found? How can that be? And after that, I tried something.......to add the RMIServer.class into the Server folder.
Again, I start to run them in a DOC envirnment...
start rmiregistry........(run successful and another rmiregistry DOC window created)
java RMIServer.........The server is instantiated(run successful and print out a String)
Um...is the RMI have to run with a RMIServer.class file? But the RMI notes I refered from is not seems to be telling me to do this, are there any one can give me a helping hand?please, go here, read thoroughly
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html -
BADI - Diff. Class generated in Definition and Implementation
Hi all,
When we define a BADI, a BADI class is generated. When we implement the BADI, another class is generated.
1) What is the difference between these 2 classes?
2) As I know, we use the class generated in Implementation to instantiate and call the BADI method in our program. What about the class generated in Definition? What is it used for?
Thanks.I noticed that under Definition, the class generated is with cat= Exit class while under Implementation, the class generated is with cat= general object type. Both can be instantiated for use in ABAP program.
What is the difference/usage of these 2 generated classes? -
Hello,
I want know when the first version of Class Generator will be
released and the license agreements. Another question : at the
actual moment, can I utilize the Class Generator for commercial
purposes ? I've read the license, and I've understood this is
impossible until the new version will be released.
Thank you in advance
Rolando Ramieri
Agenzia ANSA Roma
nullRolando Ramieri (guest) wrote:
: Hello,
: I want know when the first version of Class Generator will be
: released and the license agreements. Another question : at the
: actual moment, can I utilize the Class Generator for
commercial
: purposes ? I've read the license, and I've understood this is
: impossible until the new version will be released.
: Thank you in advance
: Rolando Ramieri
: Agenzia ANSA Roma
There will be an announcement in a couple of weeks regarding
licensing. Right now it is only a development license.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null
Maybe you are looking for
-
Win 8.1 uninstall error 2503
unable to uninstall reader 11.0.09. I get msg "error 2503 called RunScript when marked in progress" win 8.1 on Gigabyte p27 notebook last reader update install Chinese version of reader
-
Can't open or rename folder... but not a permission issue
This one has me puzzled, and I can't figure it. I have a fair background in unix and command line interfaces, so I've tried all of the usual fixes with chmod, chown, chgrp and everything else I can throw at it without luck. It's not a locked/hidden
-
Extracting Scheduling agreements from Sales in SAP BI
I have been going through various posts, and sap notes, but could not find a concrete answer on how to get this information in SAP BI Can some one direct me to some sap notes or previous discussions, it would be highly appreciated Thanks
-
HT4623 how can i get ios 7.1 beta 2?
how can i get ios7.1 Beta 2 on my 5s?
-
How can I change the default publish preview player from HTML to Flash in Adobe Flash CS5.5??