SSOAP在发出请求时会出错

时间:2015-04-21 21:36:26

标签: xml r soap

我正在尝试连接到我的本地gov't统计网络服务,但不断收到错误。

# install.packages("SSOAP", repos = "http://www.omegahat.org/R", dependencies = TRUE, type = "source")
library(SSOAP)
library(XML)

wsdl <- "http://analitica.spb.ru/UniversalWSAnalitica-war/UniversalWSAnaliticaService?wsdl"
doc <- xmlInternalTreeParse(wsdl)

def <- processWSDL(doc)
iac_iface <- genSOAPClientInterface(def = def)

然后,iac_iface@functions$getTerrTree()给了我

  

缺少参数“参数”,没有默认

iac_iface@functions$getIndTree(dateActual = "24.06.2014 11:00:00", treeLVL = 1)给出了

  

未使用的参数(dateActual =“24.06.2014 11:00:00”,treeLVL = 1)

虽然原始XML请求,例如,工作:

library(httr)
xml.request  <- 
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ws=\"http://ws.universal.department14.iac.spb.ru/\">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:getIndTree>
         <dateActual>24.06.2013 11:00:00</dateActual>
         <treeLVL>1</treeLVL>
      </ws:getIndTree>
   </soapenv:Body>
</soapenv:Envelope>"
r <- POST("http://analitica.spb.ru/UniversalWSAnalitica-war/UniversalWSAnaliticaService", body = xml.request)
stop_for_status(r)
content(r)

我尝试过Python库suds,也很完美。有人可以告诉SSOAP使用有什么问题吗? 关于32位Debian测试的R版本3.1.2。

0 个答案:

没有答案