Entering edit mode
stephen@mnemosyne.co.uk
▴
40
@stephenmnemosynecouk-3983
Last seen 10.2 years ago
Dear Bioconductor mailing list,
I am trying without success to upload an Affy CEL file to a LIMS
system using RCurl.
The LIMS expects to receive a multipart formatted http post request
with some metadata in the headers. When I try to create an RCurl
statement to upload the file I get various errors complaining that
Http GET is not supported on the server - any help or suggestions
would be very gratefully received.
uri <- "http://127.0.0.1:8080/tomcat/ezUploader"
f = CFILE("example.CEL")
fileOid="12345"
analyticalGroup="12345"
curlPerform(url=uri, httpheader=c(fileOid=fileOid,
analyticalGroup=analyticalGroup), upload=TRUE, readdata=f@ref,
infilesize=file.info(filename)[1, "size"])
An attempt to upload the given CEL file leads to a tomcat error -
Apache Tomcat/6.0.18 - Error report - HTTP Status 405 - HTTP method
PUT is not supported by this URL. The Java code below using the Apache
HttpClient demonstrates what I am trying to achieve
HttpPost httpPost = new HttpPost(url.toString());
MultipartEntity entity = new MultipartEntity();
entity.addPart("fileOid", new StringBody("12345",
Charset.forName("UTF-8")));
FileBody fileBody = new FileBody(filename);
entity.addPart(filename.getName(), fileBody);
httpPost.setEntity(entity);
Any help with the RCurl equivalent would be very gratefully received
Thanks
Stephen
sessionInfo()
R version 2.10.1 (2009-12-14)
i386-apple-darwin8.11.1
locale:
[1] C/UTF-8/C/C/C/C
attached base packages:
[1] tools stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] mnemosynePicnic_0.1.1 XML_2.6-0 RCurl_1.3-1
[4] bitops_1.0-4.1
[[alternative HTML version deleted]]