我试图编写一个SOAP调用,示例请求如下所示:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://server.opsware.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body>
<ser:attachPolicies soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<self xsi:type="xsd:anyType">?</self>
<policies xsi:type="ser:ArrayOf_xsd_anyType" soapenc:arrayType="xsd:anyType[]"/>
</ser:attachPolicies>
</soapenv:Body>
</soapenv:Envelope>对于ArrayOf_xsd_anyType可能意味着什么,或者如何找到有效的选项,有什么想法吗?
发布于 2018-11-28 09:39:49
名称ser:ArrayOf_xsd_anyType是指您希望在命名空间xmlns:ser="http://server.opsware.com"的架构中找到的类型。
我不知道在哪里可以找到该模式;该消息的接收方应该知道该模式。也许这个页面会有所帮助:https://en.wikipedia.org/wiki/Opsware
发布于 2018-11-28 03:45:35
为了澄清术语,您展示的不是WSDL,而是SOAP服务的示例SOAP请求。WSDL是一个描述请求和响应以及PortType、绑定和服务信息中使用的XML类型的XML文档。
至于anyType,这个链接提供了一个清晰的概述它的用法:usinganytype.html
但是TL;DR是这样的:"anyType允许任何类型的DataObject,如果maxOccurs > 1,那么列表中的每个DataObject都可以是不同的类型。“
这与"complexType“形成了对比,后者仅限于一种类型。例如,如果您有一个complexType数据数组,那么所有数组值都必须具有相同的类型("Customer“、"Address”等)。
https://stackoverflow.com/questions/53511009
复制相似问题