【问题标题】:CleverElements / Sendcockpit SOAP API parameters aren't recognized无法识别 CleverElements / Sendcockpit SOAP API 参数
【发布时间】:2011-10-17 13:15:43
【问题描述】:

我正在尝试使用 CleverElements SOAP API,但我无法让它工作。老实说,我从来没有使用过 SOAP(但经常使用 XML-RPCREST 等),并且认为它应该很简单。

我正在使用 Ruby 和 savon gem。我可以通过 SOAP 调用任何不需要任何参数的函数,但是在带有参数的函数上,SOAP 服务无法识别参数。

这是我的要求:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="Sendcockpit/API" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="Sendcockpit/API">
  <env:Header>
    <validate>
      <userid>32027</userid>
      <apikey>**************</apikey>
      <version>1.0</version>
      <mode>live</mode>
    </validate>
  </env:Header>
  <env:Body>
    <apiGetListDetails>
      <listID>72472</listID>
    </apiGetListDetails>
  </env:Body>
</env:Envelope>

这是 WSDL 文件:http://api.sendcockpit.com/server.php?wsdl

我是否遗漏了一些东西(可能非常简单、超级明显、基本的 SOAP)?

【问题讨论】:

    标签: ruby soap savon


    【解决方案1】:

    没关系。显然我需要一个包装 &lt;ctListRequest&gt; 节点。我的印象是savon 应用了wsdl 文件指定的所有内容...

    此请求有效:

    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="Sendcockpit/API" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="Sendcockpit/API">
      <env:Header>
        <validate>
          <userid>32027</userid>
          <apikey>***********</apikey>
          <version>1.0</version>
          <mode>live</mode>
        </validate>
      </env:Header>
      <env:Body>
        <apiGetListDetails>
          <ctListRequest>
            <listID>72472</listID>
          </ctListRequest>
        </apiGetListDetails>
      </env:Body>
    </env:Envelope>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-14
      • 2013-08-09
      • 2015-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-28
      • 2021-08-16
      相关资源
      最近更新 更多