0
$("#urlform").submit(function(event) {
    $.mobile.loading('show');
    event.preventDefault();
    loginurl("d", "d", "00:1C:B3:09:85:15", "Ekse")
    $.mobile.loading('hide');
});

var productServiceUrl = "http://someip/CaliberLIMS/Service1.asmx?op=UserLoginSts";

function loginurl(UserName, pswd, MacAddre, otherInfo) {
    var soapMessage =
        '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
        +'<soap:Body>' +
        '<UserLoginSts xmlns="http://Caliberindia.com/webservices/">' +
        '<UserName>' + UserName + '</UserName>' +
        '<pswd>' + pswd + '</pswd>' +
        '<MacAddr>' + MacAddre + '</MacAddr>' +
        '<OtherInfo>' + otherInfo + '</OtherInfo>' +
        '</UserLoginSts>' +
        '</soap:Body>' +
        '</soap:Envelope>';

    $.ajax({
        url: productServiceUrl,
        type: "POST",
        dataType: "xml",
        data: soapMessage,
        complete: endSaveProduct,
        contentType: "text/xml; charset=\"utf-8\""
    });

    return false;
}

function endSaveProduct(xmlHttpRequest, status) {
    console.log(xmlHttpRequest.responseXML);
}

I have already allowed cross scription on the server but this request still doesn't work am i doing something wrong in the code.

EDIT:

enter image description here

Get the above error.

Alexandre Neukirchen
  • 2,713
  • 7
  • 26
  • 36
vini
  • 4,657
  • 24
  • 82
  • 170
  • 1
    Did you try to use dataType: "jsonp" ? Check [XML - CrossDomain](http://stackoverflow.com/questions/24377804/cross-domain-jsonp-xml-response). To try this you need change dataType to `dataType: 'jsonp',` and add at the end of your URL `&callback=?` –  Mar 09 '15 at 09:37
  • Just updated my question – vini Mar 09 '15 at 10:42

0 Answers0