cancel
Showing results for 
Search instead for 
Did you mean: 
shk21
Nintex Newbie

Problem calling web service using jquery

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");

}

0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: Problem calling web service using jquery

What is the error that you get ?

0 Kudos
Reply
shk21
Nintex Newbie

Re: Problem calling web service using jquery

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.

0 Kudos
Reply