Hi, This is my first post, so please forgive any newbie stupidity. I hope its OK to include a few small files.
I have a problem with castor-0.9.3.21 mapping namespaces to packages during unmarshaling. In the following example the schema given by a_b.xsd references the the namespace defined by schema a_c.xsd. I create Java packages using SourceGenerator for a_b.xsd and a_c.xsd and import them into Test.java. The application give by Test.java, unmarshals and then marshals an instances of the schema a_b.xsd given by in.xml . For it to work correctly it must see the Meta class in the package associated with a_c.xsd, but it does not. The specifics of the above are, I have the files included below in my working directory /Users/pig/work/a . I cd to /Users/pig/work/a and issue the commands java org.exolab.castor.builder.SourceGenerator -i a_b.xsd -package a.b -line-separator unix types j2 java org.exolab.castor.builder.SourceGenerator -i a_c.xsd -package a.c -line-separator unix types j2 javac Test.java then java Test gives unable to find or create a ClassDescriptor for class: Meta unable to find or create a ClassDescriptor for class: a.b.Meta and I can see using the runtime debugger in NetBeans that the class Meta is not being found in a.c and infact the class AnyNode is being used instead of Meta. Does Castor support namespaces ? What have I done wrong? Thanks in advance Si
Test.java
Description: application/applefile
import a.b.*;
import a.c.*;
import java.io.FileReader;
import java.io.FileWriter;
public class Test {
public static void main(String[] args) {
try{
FileReader reader = new FileReader("/Users/pig/work/a/in.xml");
Doc doc = Doc.unmarshal(reader);
FileWriter writer = new
FileWriter("/Users/pig/work/a/out.xml");
doc.marshal(writer);
} catch(Exception e) {
System.out.print("ERROR:" + e.toString() + "\n");
}
}
}
a_b.xsd
Description: application/applefile
a_b.xsd
Description: application/text
a_c.xsd
Description: application/applefile
a_c.xsd
Description: application/text
in.xml
Description: application/applefile
in.xml
Description: application/text
castorbuilder.properties
Description: application/text
castor.properties
Description: Binary data
