相关疑难解决方法(0)

R中的SOAP请求

有谁知道如何使用R制定以下SOAP请求?

POST /API/v201010/AdvertiserService.asmx HTTP/1.1
Host: advertising.criteo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://advertising.criteo.com/API/v201010/clientLogin"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <clientLogin xmlns="https://advertising.criteo.com/API/v201010">
      <username>string</username>
      <password>string</password>
      <source>string</source>
    </clientLogin>
  </soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)

soap r rcurl httr

12
推荐指数
1
解决办法
8247
查看次数

如何将SOAP请求curl转换为RCurl

我应该如何转换这一个班轮:

curl -d @request.xml -o response.xml http://www.sample.com/soap
Run Code Online (Sandbox Code Playgroud)

它正在访问请求xml,如下所示:

<?xml version="1.0" encoding="utf-8"?>
     <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://sample.com/">
    <soap:Body>
      <req:getEvents>
        <start>2014-12-12T00:00:00+0100</start>
        <end>2014-12-13T00:00:00+0100</end>
        <type>TYPE</type>
      </req:getEvents>
     </soap:Body>
    </soap:Envelope>
Run Code Online (Sandbox Code Playgroud)

响应写入response.xml我想直接将响应读入r

curl r rcurl

4
推荐指数
1
解决办法
2144
查看次数

标签 统计

r ×2

rcurl ×2

curl ×1

httr ×1

soap ×1