如何找到wsdl版本 [英] How to find wsdl version

查看:52
本文介绍了如何找到wsdl版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以建议我如何找到我的 Web 服务公开的 wsdl 版本 -
来自 wsdl 的片段 -

我浏览了这些网页链接 -

最简单的方法是查看 XML 中的根元素:

  • 如果它被称为 那么它就是一个 WSDL 1.1;
  • 如果它被称为 那么它就是一个 WSDL 2.0;

您会发现大多数 WSDL 都有 1.1 版,但如果技术更新,也可以检索 WSDL 2.0.例如,请参阅这篇文章的答案以了解更多详情 关于检索 SOAP Web 服务的 WSDL(如果提供)的一些约定.

Can any one please suggest how can I find wsdl version my web service is exposing -
snippet from wsdl -

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"    
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" 
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" 
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" 
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns="http://tempuri.org/" 
xmlns:wsa10="http://www.w3.org/2005/08/addressing" 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
name="XXXService" targetNamespace="http://tempuri.org/">

I have gone through these web links - https://coderanch.com/t/502335/certification/determine-wsdl-version
according to above post it's 1.2

whereas looking at this - https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls/
SoapUI documentation says "SoapUI supports 1.1 version of the WSDL specification". Because my wsdl loads successfully in SoapUI - could it be version 1.1?

So, I am not sure which version of wsdl (1.1/1.2/2.0) my web service is exposing.

Any suggestions please.

解决方案

There are two WSDL versions: 1.1 and 2.0. A history of how these versions got to be can be found on the Wikipedia page for WSDL.

Also on that page it's a useful image of the differences between them and how to recognize the version you are dealing with:

The easiest way is to look at the root element in the XML:

  • if it's called <definitions> then it's a WSDL 1.1;
  • if it's called <description> then it's a WSDL 2.0;

Most of the WSDLs you will find out there will be version 1.1, but if the technology is newer, it might also be possible to retrieve a WSDL 2.0. See for example the answer on this post for more details about some conventions of retrieving a SOAP web service's WSDL if it provides one.

这篇关于如何找到wsdl版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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