面对问题包括使用spring boot在wsdl中的schemalocation

问题描述 投票:0回答:1

目前我正在使用Spring Boot + SOAP应用程序。我们的客户端提供了一个我需要托管的wsdl文件和一组xsds。我的wsdl文件包含一些架构包括如下所示。

<include schemaLocation="ABC-1.0.xsd"/> <include schemaLocation="XYZ-1.0.xsd"/>

我能够发布wsdl,当我尝试使用soap ui测试它时,它会导致下面的异常。

Error loading [http://localhost:8080/ws/ABC-1.0.xsd]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null

有人可以帮我这个。即使在Google搜索了几篇文章之后,我在这一点上完全是空白。

先感谢您。 :)

spring web-services soap spring-boot wsdl
1个回答
0
投票

你有资源文件夹中的某个wsdl吗?所以你必须在那里添加那些xsds并在wsdl中使用相对路径。

所以当你有这样的事情时: resources --wsdl ----my.wsdl --xsd ----abc-1.0.xsd

在你的wsdl内,你应该有像<include schemaLocation="../xsd/abc-1.0.xsd"/>这样的相对路径

© www.soinside.com 2019 - 2024. All rights reserved.