SOAP UI:我可以添加断言以使用本地 XML 架构文件进行验证吗?
我创建了一个 Web 服务(使用 Java、Axis)。根据请求的内容,响应可能具有不同的 XSD。因此,WSDL 仅指定响应是通用 XSD,并且响应符合导入和扩展通用 XSD 的 XSD。
不幸的是,Schema 断言失败,因为 WSDL 中指定的 XSD 只能是通用的。有没有办法手动指定我希望断言使用哪个 XSD?例如,根据我准备的请求,我知道响应的具体 XSD。因此,如果我可以让 SoapUI 断言该 XSD 的响应,那就完美了,我可以将其存储在本地或 URL 上。
那么,有没有办法使用本地(或远程)存储的 XML 模式进行模式断言?
谢谢,
马科斯
I have created a Web Service (with Java, Axis). Depending on the content of the request, the response may have a different XSD. So, the WSDL only specifies that the response is of a generic XSD, and the responses comply to XSDs that import and extend the generic XSD.
Unfortunately, the Schema assertion fail because the XSD specified in the WSDL can only the generic one. Is there a way to manually specify which XSD I want the assertion to use? For instance, depending on the request I prepare, I know the specific XSD of the response. So, it would be perfect if I could say to SoapUI to assert the response by that XSD, which I can store either locally or at a url.
So, is there a way to make a schema assertion using a locally (or remotely) stored XML schema?
Thanks,
Markos
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
毕竟,我所做的是在 Java 中创建了一个简单的类来执行此操作。我将项目导出为 jar,将其导入到 Groovy 中并调用它。
这是正常的,因为 Java 和 Groovy 都在 JVM 上运行,因此相互调用类和方法是完全正常的。
What I did after all is that I created a simple class to do this in Java.I exported the project as a jar, imported it in Groovy and just called it.
This is normal, as both Java and Groovy both play on the JVM, so it is perfectly normal to call classes and methods from one another.