Title: Creating class files from schema help
got it.  Thanks a lot Wing Yew
Jason


From: Wing Yew Poon [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 5:38 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help

Jason,
try using a different name for your package than "com.package". "package" is a reserved word in java and is causing the problem.
- Wing Yew


From: Green, Jason M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 12:44 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help

Wing Yew,
  Thanks for the response.  I have implemented what you given me.  here is my .xsdconfig file:
 
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
   <xb:namespace>
        <xb:package>com.package</xb:package>
    </xb:namespace>
</xb:config>
 
when i run the file through maven, I get a ton of errors.  Here is an example of them:
 
java:compile:
xmlbeans:compileSchema:
    [schemaCompiler] Compiling 277 source files to C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\classes
    [schemaCompiler] C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\ABLType.java:8: <identifier> expected
    [schemaCompiler] package com.package;
    [schemaCompiler]             ^
    [schemaCompiler] C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\ABLType.java:42: <identifier> expected
    [schemaCompiler]         public static com.package.ABLType newInstance() {
    [schemaCompiler]                           ^
    [schemaCompiler] C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\ABLType.java:96: <identifier> expected
    [schemaCompiler]         private Factory() { } // No instance of this class allowed
 
Do you know what the errors mean??
Thanks,
Jason
 


From: Wing Yew Poon [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 1:41 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help

According to http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html:
 
Java bean classes may be generated in a specified package even when a namespace is not specified in the schema.
Define the .xsdconfig file as

<?xml version="1.0" encoding="UTF-8"?>
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
  <xb:namespace>
    <xb:package>com.xmlbeans</xb:package>
  </xb:namespace>
</xb:config>
 
- Wing Yew

From: Green, Jason M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 5:28 AM
To: dev@xmlbeans.apache.org
Subject: Creating class files from schema help

Hey all,
   I would like to be able to specify a different directory structure other than noNamespace when compiling my schema.  Is this possible if there is no namespace declared in the schema?

Thanks,
Jason

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Reply via email to