Hello! Thanks for looking at this.
I actually had changed that in the properties file (when I made the change
to use type generation).
I noticed a second problem too - it seems to be generating a String class
and Boolean class instead of using Java's version, so we end up with a
collision as well in the build:
[javac] C:\xxxxxx\SERVERS.java:23: class Servers is public, should be
declared in a file named Servers.java
[javac] public class Servers implements java.io.Serializable {
[javac] C:\xxxxxx\BaseXXXXXXType.java:140: incompatible types
[javac] found : com.emc.nasui.apl.String
[javac] required: java.lang.String
[javac] return (String)_serversList.get(index);
I also noticed the output from the generator was different (this may be
expected however). In 0.9.3.9 it was (edited):
[java] -- Suppressing non fatal warnings.
[java] Creating classes for element: SERVERS
But in 0.9.4.2 it is (edited):
[java] -- Suppressing non fatal warnings.
[java] Creating classes for: BaseServerType
[java] Creating classes for: ListServerType
[java] Creating classes for: ListType
[java] Creating classes for: SERVERS
At any rate, the schema you requested. ListServerType and BaseServerType are
part of bigger schema files that I can't send out, but this should do it for
you, I think:
<ns:schema xmlns:ns="http://www.w3.org/2001/XMLSchema"
xmlns:APLSchema="http://www.emc.com/APLSchema"
targetnamespace="http://www.emc.com/APLSchema">
<ns:complexType name="BaseServerType">
<ns:attribute name="name" type="APLSchema:string" use="optional"/>
<ns:attribute name="mover" type="APLSchema:string" use="optional"/>
</ns:complexType>
<ns:complexType name="ListServerType">
<ns:complexContent>
<ns:extension base="APLSchema:BaseServerType">
<ns:attribute name="domain" type="APLSchema:string" use="optional"/>
<ns:attribute name="manageable" type="APLSchema:manageableType"
use="optional"/>
</ns:extension>
</ns:complexContent>
</ns:complexType>
<ns:simpleType name="string">
<ns:restriction base="ns:string">
</ns:restriction>
</ns:simpleType>
<ns:simpleType name="boolean">
<ns:restriction base="ns:boolean">
</ns:restriction>
</ns:simpleType>
<ns:simpleType name="manageableType">
<ns:restriction base="APLSchema:boolean">
</ns:restriction>
</ns:simpleType>
</ns:schema>
Note also the SERVERS part send previously in context would be...
<ns:complexType name="ListType">
<ns:sequence minOccurs="0" maxOccurs="unbounded">
<ns:element name="SERVERS" minOccurs="0" maxOccurs="1">
<ns:complexType>
<ns:complexContent mixed="true">
<ns:extension base="APLSchema:BaseServerType">
<ns:sequence>
<ns:element name="SERVER" type="APLSchema:ListServerType"
minOccurs="0" maxOccurs="unbounded"/>
</ns:sequence>
</ns:extension>
</ns:complexContent>
</ns:complexType>
</ns:element>
</ns:sequence>
</ns:complexType>
Any ideas would be greatly appreciated!
-Angelina
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 1:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Upgrade caused bad generated
> class/file names
>
>
>
> Hi Angelina,
>
> You can try adding the following to the castorbuilder.properties:
>
> org.exolab.castor.xml.JavaNaming.upperCaseAfterUnderscore=true
>
> This allows compatilibility with JavaNaming between 0.9.3.9
> and 0.9.4.2 (basically the _ issue), however, perhaps
> something else may be causing the problem you are seeing
> since I checked and JavaNaming is behaving the same in both
> versions of the class for field and class names when it sees
> a an all UPPERCASE name.
>
> Can you attach the Schema for APLSchema:BaseServerType and
> APLSchema:ListServerType so I can run the test here.
>
> Thanks,
>
> --Keith
>
>
> > [EMAIL PROTECTED] wrote:
> >
> > I recently upgraded from Castor 0.9.3.9 to 0.9.4.2. As part of this
> > effort, we had to add a new namespace to our schemas just
> to get the
> > generator to work. That is the ONLY change we made. But,
> once we did
> > that Castor is now generating stuff like this:
> >
> > For the schema elements like:
> >
> > <ns:element name="SERVERS" minOccurs="0" maxOccurs="1">
> > <ns:complexType>
> > <ns:complexContent mixed="true">
> > <ns:extension base="APLSchema:BaseServerType">
> > <ns:sequence>
> > <ns:element name="SERVER"
> > type="APLSchema:ListServerType" minOccurs="0"
> maxOccurs="unbounded"/>
> > </ns:sequence>
> > </ns:extension>
> > </ns:complexContent>
> > </ns:complexType>
> > </ns:element>
> >
> > I'm getting a class named "Servers" in "SERVERS.java",
> which obviously
> > won't compile. I'm using "type" generation, and we
> basically only use
> > Castor as a java class generator from our schema. There are
> MANY more
> > examples of stuff like this (MoversDescriptor class in
> > MOVERSDescriptor.java for example).
> >
> > With 0.9.3.9 the class names matched the file names properly.
> >
> > Any help would be greatly appreciated. I can also provide
> more schema
> > files or examples if needed.
> >
> > Thanks!
> >
> > -Angelina Talley
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev