Hi,
I asked this question a while ago but haven't had any replies. Would really
appreciate if someone can give me an answer.
I am using JBuilder which has a built-in functionality to perform
databinding with Castor 9.3.9. I am using mixed-cased naming conventions as
specified in my properties file:
org.exolab.castor.xml.naming=mixed
The problem is that during the translation from XML to Java, some classes
are missing dealing with sequence definitions in my XML schema, which are
still refered by classes generated by Castor, and I get the following
errors:
"AFIOPLink.java": Error #: 300 : class AFIOPLinkSequence not found in class
com.agilent.accessfiber.interoperable.castor.AFIOPLink at line 65, column 38
Related schema section:
<xs:element name="AFIOPLink">
<xs:complexType>
<xs:sequence>
<xs:element name="name"
nillable="false" minOccurs="0">
...
</xs:sequence>
...
</xs:complexType>
</xs:element>
"PluginConnection.java": Error #: 300 : class PluginConnectionChoice not
found in class com.agilent.accessfiber.interoperable.castor.PluginConnection
at line 33, column 13
--> This was a sequence structured as a choice
Related schema section:
<xs:sequence>
<xs:choice>
<xs:element name="plugin_id"
type="xs:integer"/>
...
</xs:choice>
<xs:element name="port" type="xs:integer"
nillable="false"/>
</xs:sequence>
If I call up the source generator from the command line, I get the
additional classes, but now the naming convention is non-ideal: some classes
are generated with hyphens in the name, such as:
Plugin_Connection.java
Plugin_ConnectionChoice.java
Plugin_ConnectionChoiceDescriptor.java
...
Method calls are similar: getBay_Name()
Can you tell me why the difference in behavior? Also, how do I specify from
the command line which castor.properties file should be used? (currently,
just uses the default options). Here's the call that I use:
set CASTOR_LIB=C:\workspace\accessfiberimpl\corbainterface\interop\lib
set CASTOR_DEST=C:\workspace\accessfiberimpl\corbainterface\interop\src
set
CASTOR_CLASSPATH=%CASTOR_LIB%\castor-0.9.3.9-xml.jar;%CASTOR_LIB%\dom4j-full
.jar;%CASTOR_LIB%\xerces.jar
java -cp %CASTOR_CLASSPATH% org.exolab.castor.builder.SourceGenerator -types
j2 -i AFGenericNetworkDataFormat.xsd -package
com.agilent.accessfiber.interoperable.castor -dest %CASTOR_DEST%
Ideally, I would of course like to use mixed mode naming conventions but
can't if Castor can't complete the generation of all required classes in
this mode.
Please help ...
Regards,
Trang
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev