views:

14

answers:

1

I have five WSDL's that share namespaces, but not all of them. I generate client code out of them (databinding with XMLBeans). Seperately they compile fine. I create JAR files out of each generated client code.

Once I try to use all JAR files within a project, I get naming / compile conflicts.

I want to reuse as much as possible. Is there any smart way to deal with this (rather than giving each client an own node in the package structure)?

A: 

The XMLBeans (2.x) faq notes the limitations of xsdconfig namespace mapping:

alt text Note: XMLBeans doesn’t support using two or more sets of java classes (in different packages) mapped to schema types/elements that have the same names and target namespaces, using all in the same class loader. Depending on the direction you are using for the java classes to schema types mapping, some features might not work correctly. This is because even though the package names for the java classes are different, the schema location for the schema metadata (.xsb files) is the same and contains the corresponding implementing java class, so the JVM will always pick up the first on the classpath. This can be avoided if multiple class loaders are used.

McDowell
Ah, that makes sense. Using ADB works well. We can merge all domain models and have a good result :)
Stefan Hendriks