开发者

Dealing with shared namespaces with multiple WSDL's (xmlbeans)

I h开发者_StackOverflowave 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)?


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

Dealing with shared namespaces with multiple WSDL's (xmlbeans)

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜