Title: Message
Hi Arnaud,
I might be missing something, but in example I provided types.package is not generated at all. All packages are generated in enumtest. Also MyString is not enumeration itself
anyway, but error message clearly shows it's expected to be there. "import types.MyString", for example.
 
Also inconsistency comes from source analysis - this types package is attached to the class in two completely different places. One actually is marked as a hack.
 
In our actual schema some classes get generated in types package, some not and references are inconsistent all over. I tweaked with it for a while to see it was not simple classpath problem. Don't look too much on my command lines - they are not exact copies.
 
So if you still think I am wrong, I would appreciate if you run this example and show how to get it compiled.
 
Thanks a lot
Alex
 
 
 
 
-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 8:12 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] XML Source generator: Inconsistent packaging + Patch

Hi Alex,

 

The 'types' package is generated on purpose to store all enumerations.Thus we can't apply your patch.

BTW there is no bug actually, the only problem you are facing is that you haven't set your classpath correctly to say to the JVM where to find your classes.

It is only a compilation/classpath issue not a Castor related issue :).

 

Arnaud

 

-----Original Message-----
From: Alex Gitelman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 3:44 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] XML Source generator: Inconsistent packaging + Patch

 

Hi,

 

I tried to compile some of ours huge schemas and got to the problem of inconsistent packaging. Some places expect .types package to be used and some don't.

Following example will demonstarte it (required files are attached):

 

java -classpath ./build/classes:xercesImpl.jar org.exolab.castor.builder.SourceGenerator -i ./enumtest.xsd -package enumtest

javac -classpath ./build/classes:xercesImpl.jar enumtest/*.java

 

 

 

enumtest/MyEnum.java:22: package types does not exist
import types.MyString;
             ^
enumtest/MyEnum.java:39: package types does not exist
    private types.MyString _content;
                 ^
enumtest/MyEnum.java:61: package types does not exist
    public types.MyString getContent()
                ^
enumtest/MyEnum.java:101: package types does not exist
    public void setContent(types.MyString content)
                                ^
enumtest/MyEnumDescriptor.java:58: package types does not exist
        desc = new XMLFieldDescriptorImpl(types.MyString.class, "_content", "PCDATA", NodeType.Text);
                                               ^
enumtest/MyEnumDescriptor.java:71: package types does not exist
                    target.setContent( (types.MyString) value);
                                             ^
enumtest/MyEnumDescriptor.java:81: package types does not exist
        desc.setHandler( new EnumFieldHandler(types.MyString.class, handler));
                                                   ^
7 errors

****************

There were some other problems in that respect.

As I am not very familiar with the source yet I publish my patch here instead of commiting it. I don't know what side effects it may have.

 

Best...

Alex Gitelman

 

 

 

 

 

 

 

Reply via email to