ajax & 웹 서비스에 익숙하지 않습니다. 나는 post 메서드에 대한 ajax 호출을 만들기 위해 노력하고있다. 그러나 나는 아래 오류와 함께지고있다.게시 방법이있는 AJAX 호출
The request sent by the client was syntactically incorrect().
</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.25</h3></body></html>
그러나 GET 방법은 완벽하게 작동합니다. 이것은 내가 시도한 코드입니다.
$.ajax({
type: "POST", //GET or POST or PUT or DELETE verb
url: "http://88.80.223.163:8080/lumiin-service/lumiin/control/eventmap/add", // Location of the service
data: "{"id":50,"isDeleted":"N","ownerId":{"id":32,"fullName":"mailAss,mailAss","status":1,"isDeleted":null,"passWord":"[email protected]","abteilung":{"id":86,"isDeleted":null,"domainId":0,"parentId":85,"code":"mailCa","description":null},"authenticatedAccess":-1,"emailId":"[email protected]","uuid":"5988371662040","userCode":"mailAss","localOrg":null,"industryTypeId":{"name":"INSR","id":1,"isDeleted":"N","description":"Insurance"},"memeber":false,"profileType":"CA","lastName":"mailAss","firstName":"mailAss"},"prospectId":{"id":158,"isDeleted":"N","yearofBirth":null,"annualRevenue":0,"nationalityId":{"name":"CH","id":1,"isDeleted":"N","description":"Switzerland"},"titleId":{"name":"Mr","id":1,"isDeleted":"N","description":"Mr"},"maritalstatusId":null,"residencyId":null,"languageId":null,"priorityId":{"name":"High","id":2,"isDeleted":"N","description":"High"},"genderId":null,"abteilung":{"id":86,"isDeleted":null,"domainId":0,"parentId":85,"code":"mailCa","description":null},"emailId":"[email protected]","ownerId":{"id":31,"fullName":"mailCa,mailCa","status":0,"isDeleted":"N","passWord":"mailCa","abteilung":{"id":86,"isDeleted":null,"domainId":0,"parentId":85,"code":"mailCa","description":null},"authenticatedAccess":-1,"emailId":"[email protected]","uuid":null,"userCode":"mailCa","localOrg":null,"industryTypeId":{"name":"INSR","id":1,"isDeleted":"N","description":"Insurance"},"memeber":false,"profileType":"Manager","lastName":"mailCa","firstName":"mailCa"},"company":"company","statusId":{"name":"New","id":1,"isDeleted":"N","description":"New"},"startDate":null,"endDate":null,"lastName":"Search","firstName":"Search"},"eventId":{"URL":null,"location":null,"url":null,"id":92,"type":{"name":"govinda","id":20,"isDeleted":"N","description":"desc"},"isDeleted":"N","followUp":null,"countryId":null,"budget":0,"abteilung":{"id":86,"isDeleted":null,"domainId":0,"parentId":85,"code":"mailCa","description":null},"startDate":1337731200000,"endDate":1338422400000,"prospectId":null,"person":null,"eventName":"eeee-updated","place":null,"description":null}}", //Data sent to server
//contentType: "application/json", // content type sent to server
dataType: "json", //Expected data format from server
processdata: true, //True or False
success: function (json) {//On Successfull service call
//shell.loaded();
alert("cross domain ajax success full.");
var result = json.id;
alert("result===" + result);
$("#dvAjax").html(result);
},
error: ServiceFailed// When Service call fails
});
누구든지 알려 주시면 알려주세요. 미리 감사드립니다.
감사 Karthick 당신의 data
재산 주위
크로스 도메인 아약스 호출의 경우 JSONP를 사용할 수 있습니다. 여기에 심판이 있습니다. http://stackoverflow.com/questions/5141531/cross-domain-jquery-ajax-request – Hoque
JavaScript 코드가 작성된 방식으로 실행해서는 안되며, 데이터 행에서 오류가 발생해야합니다. – epascarello