jQuery Post to webservice

jQuery Post to webservice

Hello,

I'm looking for a way to post to my webservice. I've tested this via SOAPUI and it works like a charm. Now I want to code it but this does not seem to work.

I'm using the following code:

  1.  var aData = jQuery.ajax({ type: "POST", contentType: "application/xml", url: "http://delyo001.you.local:8000/sap/bc/youconsulting/ws/rest/anonymous/z_names_post?firstname=testz&lastname=zefzef", // for different servers cross-domain restrictions need to be handled  //dataType: "json" success: function(xml) { // callback called when data is received //oModel.setData(data); // fill the received data into the JSONModel alert("success to post"); }, error: function(xml) { // callback called when data is received //oModel.setData(data); // fill the received data into the JSONModel alert("fail to post");  } });