根据 WSDL 验证 XML 实例文档 [英] Validate XML instance document against WSDL

查看:35
本文介绍了根据 WSDL 验证 XML 实例文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以根据 XML Schema 轻松验证 XML 文档,例如.使用 XMLSpy 或以编程方式.是否可以使用 WSDL 文件执行此操作?XMLSpy 或我知道的任何其他 XML 工具似乎都不可能.对我来说,现在唯一的可能性是以编程方式进行,例如.通过从 WSDL 生成 Java 代码并启动请求,然后正确编组.如果没有工具/简单的编程方法,是否有可以从 WSDL 中提取 XML Schema 的工具?

I can easily validate a XML document against a XML Schema, eg. with XMLSpy or programmatically. Is it possible to do this with a WSDL file? It does not seem possible with XMLSpy or any other XML tool I know. For me the only possibility right now is to do it programmatically, eg. by generating Java code from the WSDL and starting a request, which is then marshalled correctly. If there is no tool / easy programmatic approach, is there a tool which can extract XML Schema from the WSDL?

最佳

推荐答案

QTAssistant(我与它相关)提供一个易于使用的实用程序,用于从任何样式的 WSDL(单个或多个文件、内部化或外部化 XSD)中提取 XSD.

QTAssistant (I am associated with it) provides an easy to use utility to extract XSDs from any-style WSDL (single or multiple file, internalized or externalized XSDs).

提示非常容易理解,并且在引用离线 WSDL(本地磁盘)或远程 (HTTP/S) 方面提供了很大的灵活性.

The prompt is pretty straightforward to follow, and provides a lot of flexibility in referencing offline WSDLs (local disk) or remote (HTTP/S).

与上述集合配合良好的另一个功能是能够针对 XSD 验证 SOAP 信封,也可以在 QTAssistant 中使用;XML 文档有一个属性 Strip SOAP,它会根据分配的 XSD 自动验证 SOAP 正文内容.

Another feature that works well with the above set is the ability to validate a SOAP envelope against an XSD, also available within QTAssistant; there's a property Strip SOAP for an XML document that'll automatically validate SOAP Body content against assign XSD.

这篇关于根据 WSDL 验证 XML 实例文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆