Hello, I am trying to access Microsoft Live Search Using SOAP through R. In R I am using the RCurl packages to make the calls.
I have the following situation that looks crazy and cannot figure out how to solve it: #SOAP Request library(RCurl) h = basicTextGatherer() body='<?xml version="1.0" encoding="ISO-8859-15"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC=" http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><ns3849:Search xmlns:ns3849="http://tempuri.org"> <Request><AppID xsi:type="xsd:string">MY ID</AppID> <Query xsi:type="xsd:string">"Cancer"</Query> <CultureInfo xsi:type="xsd:string">en-US</CultureInfo> <SafeSearch xsi:type="xsd:string">Off</SafeSearch> <Flags xsi:type="xsd:string"></Flags> <Location xsi:type="xsd:string"></Location> <Requests><SourceRequest><Source xsi:type="xsd:string">Web</Source> <Offset xsi:type="xsd:int">0</Offset> <Count xsi:type="xsd:int">10</Count> <ResultFields xsi:type="xsd:string">Title</ResultFields> </SourceRequest></Requests></Request></ns3849:Search></SOAP-ENV:Body> </SOAP-ENV:Envelope>' curlPerform(url="http://soap.search.msn.com/webservices.asmx?wsdl", httpheader=c(Accept="text/xml", Accept="multipart/*", 'Content-Type' = "text/xml; charset=utf-8"), postfields=body, writefunction = h$update, verbose = FALSE ) ##Put the responce in body. body = h$value() h$reset() An now the crazy stuff. This code works well for some keywords but not for all. So for the Query:"Cancer" the code works fine, but for the Query: "Tiger" I get the following error message: Error in curlPerform(url = "http://soap.search.msn.com/webservices.asmx?wsdl", : Failed writing body I cannot figure that out. Please help!!!! Thanks Konstantinos Vougas -- View this message in context: http://www.nabble.com/Microsoft-SOAP---Help%21%21-tf4792961.html#a13711324 Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.