有人可以解释这实际上意味着什么吗?一个例子真的很有帮助。
WS-I:(BP2012) 文档文字绑定包含 soapbind:body 元素,这些元素引用不具有 element 属性的消息部分元素。
有人可以解释这实际上意味着什么吗?一个例子真的很有帮助。
WS-I:(BP2012) 文档文字绑定包含 soapbind:body 元素,这些元素引用不具有 element 属性的消息部分元素。
此消息与WS-I Basic Profile相关,它试图阐明 WSDL 的子集和其他通常可互操作的规范。
在这种情况下,BP2012 与以下内容相关联:
描述中的文档文字绑定必须在其每个 wsoap12:body 元素中仅引用已使用 element 属性定义的 wsdl:part 元素。
type
如果您的 Web 服务中使用的消息之一是根据 a而不是定义的,您通常会看到这一点element
,例如:
<wsdl:message name="MyMessage">
<wsdl:part name="MyPart" type="xsd:string"/>
</wsdl:message>
要解决此问题,您需要更改您的消息,以便根据part
定义element
,例如:
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.com/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<xsd:element name="MyElement" type="xsd:string"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="MyMessage">
<wsdl:part name="MyPart" element="tns:MyElement" xmlns:tns="http://www.example.com/"/>
</wsdl:message>
或者,您可能希望将 Web 服务从使用document/literal
绑定切换到使用rpc/literal
绑定。使用rpc/literal
绑定,部分是根据 atype
而不是 a 定义的element
。