SOAP-ответ IBM Worklight HTTP Adapter: Ошибка преобразования XSL
мы создали http-адаптер, который вызывает мыльный веб-сервис ==> это работает отлично. Но когда я добавляю файл преобразования xsl и запускаю процедуру адаптера с
transformation : {
type : 'xslFile',
xslFile : 'filtered.xsl'
}
и пустой файл xsl '
мы получили следующую ошибку:
"Ecma Error: TypeError: Cannot read property \"Body\" from undefined
XML, возвращенный веб-сервисом, в порядке (проверено с помощью WireShark).
Вот код адаптера:
function getLiveSessionsCountFiltered() {
var request =
myHost\|websphere\|myAgent
WebSpherePMI\|servletSessionsModule:LiveCount
;
var input = {
method : 'post',
returnedContentType : 'xml',
path : '/introscope-web-services/services/MetricsDataService',
headers: {'SOAPAction':""},
body : {
content: request.toString(),
contentType: 'text/xml; charset=utf-8'
},
transformation : {
type : 'xslFile',
xslFile : 'filtered.xsl'
}
};
var result = WL.Server.invokeHttp(input);
return result.Envelope.Body;
}
И XML, возвращенный моим веб-сервисом SOAP:
2013-10-11T08:25:45.000Z
2013-10-11T08:25:30.000Z
2013-10-11T08:26:00.000Z
2013-10-11T08:25:45.000Z
2013-10-11T08:24:15.000Z
2013-10-11T08:24:00.000Z
2013-10-11T08:24:30.000Z
2013-10-11T08:24:15.000Z
2013-10-11T08:24:45.000Z
2013-10-11T08:24:30.000Z
2013-10-11T08:25:15.000Z
2013-10-11T08:25:00.000Z
2013-10-11T08:25:30.000Z
2013-10-11T08:25:15.000Z
2013-10-11T08:25:00.000Z
2013-10-11T08:24:45.000Z
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0
myHost|websphere|myAgent
WebSpherePMI|servletSessionsModule:LiveCount
258
0