如何为静态WSDL配置bean,该静态WSDL正在导入层次结构的根XSD?
我正在春季环境中实施SOAP Web服务。 XSD和WSDL定义来自外部公司,我已经实施了端点。 但是,当通过wsconfigurerAdapter
将WSDL文件暴露给外部消费者时,我无法使其正常工作。 这是我拥有的(对于六个服务中的每一个):
- 静态WSDL,指的是:
- XSD filed,称为[service] interface.xsd,其中包括:
- [service] _i.xsd和[service] _o.xsd,参考每个操作输入和输出。 输入和输出文件再次是指组成结构的多个其他XSD文件。 据我了解,在
wsconfigurerAdapter
中,有两种主要策略来定义WSDL的bean。通过simplewsdl11definition
可以读取静态WSDL文件。或通过defaultwsdl11definition
,可以基于XSD架构生成WSDL。但是,我的资源都不适合我能找到的任何教程。
问题是Inline XSD架构
我已经能够通过使用schemacollection而不是simpleschema来使系统通过defaultwsdl11definition
读取层次结构XSD文件。但不幸的是,我的XSD文件没有生成任何操作。没有操作,就无法将服务加载到例如肥皂UI中。 XSD文件本身似乎不足以适用于这种方法。
但是,操作是在静态WSDL中定义的,但是在simplewsdl11definition
中,没有选择添加schemacollection。
现在,我想知道资源(WSDL/XSD)是否只是以不良格式,还是我在配置中缺少某些内容。
有关的: 发布静态WSDL和相关的XSD schemas使用Spring WS 对我而言,不同的是我的XSD结构是一棵大树。
是否可以将我需要的零件组合起来,从而使我制作静态WSDL的豆,但仍然可以将XSD文件导入到集合中? 还有其他方法吗?例如,为每个XSD文件制作bean? (其中大约有50个,所以它是可行的)
我没有选择包含文档包,因为我希望没有它可以回答。让我知道我是否错了。
I am implementing soap web services in a Spring environment. The xsd and wsdl definitions come from an external company, and I've implemented the endpoints already.
However, when exposing trying the wsdl-files to outside consumers through a WsConfigurerAdapter
, I can't get it to work properly.
Here is what I have (for each of six services):
- A static wsdl, referring to:
- A xsd-filed called [service]Interface.xsd, which includes:
- [service]_I.xsd, and [service]_O.xsd, referring to each operations input and output.
The input and output files again refer to multiple other xsd files, which makes up the structure.
As far as I understand, there are two main strategies for defining beans for wsdl's in aWsConfigurerAdapter
. Either throughSimpleWsdl11Definition
, which can read a static wsdl-file. Or throughDefaultWsdl11Definition
, which can generate a wsdl based on an xsd schema. However, none of my resources fit into any tutorial i can find.
The problem is inline xsd schemas
I've been able to get the system to read hierarchical xsd-files, through DefaultWsdl11Definition
, By using a SchemaCollection instead of a SimpleSchema. But unfortunately, my xsd-files generate no operations. Without operations, no service can be loaded into for example soap UI. The xsd-files themselves seems to be insufficiently defined for this approach.
The operations are defined in the static wsdl, however, but in the SimpleWsdl11Definition
, there are no option to add a SchemaCollection.
And now I am wondering if the resources (wsdl/xsd) are simply in a bad format, or if I am missing something in the configuration of them.
Related:
Publishing Static WSDL and related XSD schemas using Spring WS
Difference for me is that my xsd structure is a large tree of files.
Spring Map a file to a Url / URI
Here the imported xsd files are imported as a collection, but not in a static wsdl context, the wsdl is generated from the initial xsd.
Is it possible to combine the parts i need from each of these two, so that I make a bean of a static wsdl, but still can import the xsd files as a collection?
Are there any other ways to do it? For instance making a bean for each of the xsd files? (there are about 50 of them, so it is viable)
I have not included the documentation package by choice, as I hope this is answerable without it. Let me know if I am wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以将您所需的零件组合起来,从而制作静态WSDL的豆,但仍然可以将XSD文件导入到集合中?
是的,您可以使用WSDL:类型元素将外部XSD架构导入到WSDL文档中。
您还可以使用WSDL:导入元素将外部WSDL文档导入到WSDL文档中。
有关更多信息,请参见:
https://www.w.org/tr/wsdl/wsdl#_types < /a>
https://www.w.org/wsdl/wsdl#_import
我希望所有此信息是相关的
It is possible to combine the parts you need from each of these two, so that you make a bean of a static wsdl, but still can import the xsd files as a collection?
Yes, you can use the wsdl:types element to import an external XSD schema into a WSDL document.
You can also use the wsdl:import element to import an external WSDL document into a WSDL document.
For more information, see:
https://www.w3.org/TR/wsdl#_types
https://www.w3.org/TR/wsdl#_import
I hope all this information is relevant