首页 > 解决方案 > 包含前缀名称的属性值的含义

问题描述

我有以下 XML:

</wsdl:message>
<wsdl:message name="AdvancedVerifyEmailHttpGetIn">
<wsdl:part name="email" type="s:string"/>
<wsdl:part name="timeout" type="s:string"/>
<wsdl:part name="LicenseKey" type="s:string"/>
</wsdl:message>
<wsdl:operation name="AdvancedVerifyEmail">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
This function will verify an email address and also includes the ability to timeout the verification process. The Verification can be slowed down by the email server being verified against. <b>Timeout is in seconds</b> Use a licensekey of 0 for testing <br> NOTE: A timeout error (7) does not mean an email will not go through. You should treat this as a good email address.
</wsdl:documentation>
**<wsdl:input message="tns:AdvancedVerifyEmailHttpGetIn"/**>
<wsdl:output message="tns:AdvancedVerifyEmailHttpGetOut"/>
</wsdl:operation>

突出显示的一个标签输入包含消息属性,其值为“tns:AdvancedVerifyEmailHttpGetIn”,其具有前缀命名空间。

您能否帮助我理解这是否意味着之前声明的消息是名称空间 tns 或者就像消息属性一样引用消息,并且任何消息将成为该输入的一部分将在 tns 名称空间中?

标签: xml

解决方案


如果查看架构,您将看到消息属性的类型为 xs:QName。这基本上意味着它的行为类似于元素或属性名称:冒号(“tns”)之前的部分被解释为名称空间前缀,验证器检查该前缀是否已在某些外部祖先元素上正确声明。


推荐阅读