如何将SOAP请求curl转换为RCurl

如何将SOAP请求curl转换为RCurl,第1张

概述我应该如何转换这一个班轮: curl -d @request.xml -o response.xml http://www.sample.com/soap 它正在访问请求xml,如下所示: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/en 我应该如何转换这一个班轮:

curl -d @request.xml -o response.xml http://www.sample.com/soap

它正在访问请求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>

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

解决方法 这是httr的方法:

library(httr)r <- POST("http://www.sample.com/soap",body = upload_file("request.xml"))stop_for_status(r)content(r)
总结

以上是内存溢出为你收集整理的如何将SOAP请求curl转换为RCurl全部内容,希望文章能够帮你解决如何将SOAP请求curl转换为RCurl所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/1027685.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-23
下一篇2022-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存