我使用以下代码获取结果但由于某种原因我收到此错误:第1行出错:prolog中不允许使用内容。 (第134行,文件"代码"),在这种情况下是
var xmlResult = XmlService.parse(result).getRootElement();
var xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:v1=\"http://openclinica.org/ws/studySubject/v1\" xmlns:bean=\"http://openclinica.org/ws/beans\">"
+"<soapenv:Header>"
+"<wsse:Security soapenv:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">"
+"<wsse:UsernameToken wsu:Id=\"UsernameToken-27777511\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+"<wsse:Username>yyyy</wsse:Username>"
+"<wsse:Password>xxxxx</wsse:Password>"
+"</wsse:UsernameToken>"
+"</wsse:Security>"
+"</soapenv:Header>"
+"<soapenv:Body>"
+"<v1:listAllByStudyRequest>"
+"<bean:studyRef>"
+"<bean:identifier>PROSPER2</bean:identifier>"
+"</bean:studyRef>"
+"</v1:listAllByStudyRequest>"
+"</soapenv:Body>"
+"</soapenv:Envelope>";
var options =
{
"method" : "post",
"contentType" : "text/xml",
"payload" : xml
};
var result = UrlFetchApp.fetch("http://89.221.253.174:8080/OpenClinica-ws/ws/studySubject/v1/studySubjectWsdl.wsdl", options);
var xmlResult = XmlService.parse(result).getRootElement();
Logger.log(xmlResult);
任何想法为什么这不起作用,我使用谷歌应用程序脚本来执行此代码;