Я создаю запрос мыла xml, но когда я использую curlPerform, он возвращает обратную косую черту из службы.
headerFields =
c(Accept = "text/xml",
'Content-Type' = "text/xml; charset=utf-8")
body = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:Get>
<tem:request>
<tem:Name>
<tem:string>Name1</tem:string>
</tem:Name>
<tem:StartDate>2015-01-01T10:30:00</tem:StartDate>
<tem:EndDate>2015-01-01T10:30:00</tem:EndDate>
</tem:request>
</tem:Get>
</soapenv:Body>
</soapenv:Envelope>'
h = basicTextGatherer()
h$reset()
curlPerform(url = "service.asmx",
httpheader = headerFields,
postfields = body,
writefunction = h$update
)
body <- h$value()
и возвращается с обратной косой чертой;это начало ответа.
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<soap:Body><GetResponse xmlns=\"http://tempuri.org/\">
Я пытался удалить обратную косую черту, но не смог.может быть, кто-то знает источник ответа, и мне не нужно его удалять.