如何将jar文件中的Schema(XSD)导入另一个Schema(XSD)

时间:2022-07-26 09:14:17

I have some common types which are defined in an xsd file which is then later bundled as a jar file. I have this jar file in my classpath and I want to include this xsd into another xsd to use those types. How to refer the schema in a jar file? Also I want to create JAXB objects from the new schema is it possible. Also I want to use this new schema into my WSDL. Is it possible?

我有一些在xsd文件中定义的常见类型,然后将其捆绑为jar文件。我在我的类路径中有这个jar文件,我想将这个xsd包含到另一个xsd中以使用这些类型。如何在jar文件中引用模式?另外,我想从新架构创建JAXB对象是可能的。我还想在我的WSDL中使用这个新模式。可能吗?

1 个解决方案

#1


0  

The XJC tool offers a schema catalog mechanism for handling problematic imported/included schemas:

XJC工具提供了一种模式目录机制,用于处理有问题的导入/包含模式:

In your case you may need to interact with XJC programmatically. Check out one of my answers to a previous question to see how this is done:

在您的情况下,您可能需要以编程方式与XJC交互。查看我之前问题的一个答案,看看如何完成:

#1


0  

The XJC tool offers a schema catalog mechanism for handling problematic imported/included schemas:

XJC工具提供了一种模式目录机制,用于处理有问题的导入/包含模式:

In your case you may need to interact with XJC programmatically. Check out one of my answers to a previous question to see how this is done:

在您的情况下,您可能需要以编程方式与XJC交互。查看我之前问题的一个答案,看看如何完成: