在这里,我想使用Intranet URL中的以下命令将文件附加到某个策略/索赔号。
library(RCurl)
options(RCurlOptions = list(
cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"),
followlocation = TRUE,
httpheader = c(
Accept = "text/xml",
Accept = "multipart/*",'Content-Type' = "text/xml; charset=utf-8",
SOAPAction = "INTRANET URL"
),
userpwd = "USERID:PASSWORD",
netrc = TRUE,
timeout = 100,
postfields = CONTAINS SOAP DATA,
writefunction = reader$update,
verbose = TRUE,
httpauth = AUTH_BASIC)
)
getForm(
uri = "INTRANET URL",
file = fileUpload(
filename = "C:\\Users\\Username\\Desktop\\image001.pdf",
contentType = "application/pdf"
),
upload = TRUE
)
当我运行上述命令时,我的状态为“HTTP / 1.1 200 OK”,但服务的响应显示没有附件。
使用Basic和用户'USERID'
进行服务器身份验证POST /QUALIFIER1/QUALIFIER2/QUALIFIER3?file=C%3A%5CUsers%5CUSERNAME%5CDesktop%5Cimage001.pdf&file=character%280%29&file=application%2Fpdf&upload=TRUE HTTP / 1.1 授权:基本XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX =主机:applications.test.intra.XXXXX.nl Accept:text / xml Accept:multipart / * Content-Type:text / xml;字符集= utf-8的 SOAPAction:https://applications.test.intra.XXXXX.nl/QUALIFIER1/QUALIFIER2/QUALIFIER3 Content-Length:2654 Expect:100-continue
完成等待100-continue< HTTP / 1.1 200 OK< content-language:en-GB < content-type:text / xml; charset = utf-8<日期:2017年11月24日星期五11:33:00 GMT< p3p:CP =“XXX XXX XXX XXX XXX XXX” < transfer-encoding:chunked< cache-control:no-cache =“set-cookie,set-cookie2”<到期日:1994年12月1日星期四16:00:00 GMT < x-powered-by:Servlet / 3.0< Set-Cookie:LtpaToken2 = TOKEN;路径= /;安全;仅Http < Set-Cookie:BIGipServer~XX~isam-emp-applications_tst_11111 = 111111111.11111.1111;路径= /;仅Http;安全 < *连接#0以托管applications.test.intra.XXXXX.nl完好无损