AnsweredAssumed Answered

Problem calling web service using jquery

Question asked by shk21 on Sep 18, 2015
Latest reply on Sep 24, 2015 by shk21

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

}

Outcomes