Skip to main content

hi, I am trying to call web service from Nintex form using jqeury but it keeps giving error.

Any ideas on what the problem is below? thanks.The method name is checkEmail.

function checkEmail()

{

var webserUrl = 'http:/www.mywebservice.com/checkcontact.svc?singleWsdl';

var soapMessage = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/><soapenv:Body><tem:CheckEmail><tem:Email>abc@test.com</tem:Email></tem:CheckEmail></soapenv:Body></soapenv:Envelope>'; 

                NWF$.ajax({

                    type: "POST",

                    url: webserUrl,

                    data: soapMessage,

                    contentType: "text/xml",

                    dataType: "xml",

                    success: SuccessOccur,

                    error: ErrorOccur

                });

        function SuccessOccur() {

           alert("worked");

        }

        function ErrorOccur() {

           alert("failed");

}

What is the error that you get ?


I was not getting any response back from the web service. After some research, I discovered it was because the ajax call was made to web service on different server and cross domain call using ajax is not supported unless something like CORS is implemented on the web service server.

It is working now, thanks.


Reply