这是我的代码:
var myGTP = {};
var urlGTP = "http://gtpmain.wdf.xxxx.com:1080/sap/bc/srt/rfc/qte/rfc_read_struc_nodes/001/qte_rfc_read_struc_nodes/binding";
var soapMsg = 'var body = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/>' +
'<soapenv:Header/> <soapenv:Body> <urn:_-qte_-rfcReadStrucNodes>' +
'<IvLanguage>E</IvLanguage>' +
'<IvStructureId>' + structureId + '</IvStructureId>' +
'</urn:_-qte_-rfcReadStrucNodes> </soapenv:Body></soapenv:Envelope>';
$.ajax({
url : urlGTP,
dataType : 'jsonp',
type : 'GET',
async : false,
data : soapMsg,
contentType : 'text/xml; charset=UTF-8',
username : "myuser",
passowrd : "mypassword",
success : function(data) {
myGTP = data;
console.log(data);
},
error : function() {
alert("Error!");
}
});
我收到错误 415(不支持的媒体类型)。我试图弄清楚几个小时,但我不知道是什么问题。请帮忙!