웹 서비스 (비누)에서 데이터를 가져오고 싶지만 성공하지 못했습니다. 내 서비스는 여기 http://icafe.ipos.vn/WSUitility/evsServiceUtility.svc?wsdl
나는jquery로 비누 서비스에서 데이터를 가져 오는 방법은 무엇입니까?
var soap = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<soap:Body>" +
"<Test xmlns=''>" +
"</Test>" +
"</soap:Body>" +
"</soap:Envelope>";
$.ajax({
url: 'http://icafe.ipos.vn/WSUitility/evsServiceUtility.svc?wsdl',
method: 'post',
data: soap,
contentType: "text/xml",
dataType: "xml",
beforeSend: function (xhr) {
xhr.setRequestHeader("SOAPAction", "urn:evsServiceUtility/Test1");
},
crossDomain: true,
success: function(SOAPResponse) {
alert('ok');
},
error: function(SOAPResponse) {
alert('no ok');
}
});
그리고 내 서비스 아래 서비스 코드를 요청하기 위해 jQuery를 사용
public string Test()
{
try
{
return "Successfull!";
}
catch (Exception ex)
{
return ex.Message;
}
}
내가 검색 많은 솔루션지만 작동하지를 시도하는 많은 많은 시간을 spended.
아무도 도와 줄 수 있습니까?
어떤 예외가 있습니까? –
코드 응답 400 나쁜 요청을받습니다. –