0

I have one web service built in .NET SOAP. URLlike http://.../abc.asmx?WSDL

In that i have one function called abc.

So how can i call that webservice because it not directly return me XML.

In WSDL i have to call function then it return me XML file.

Tried using

$.ajax({
    type: "GET",
    url: 'http://...asmx?WSDL',
    dataType: "xml",
    success: function(xml) {
           alert(xml);

   },
    error: function(xhr, xml) { alert('else'+xml + '\n' + xhr.responseText); }
  }); 

but it send me to error not success

Jackson
  • 1,426
  • 3
  • 27
  • 60
  • Take a good read at http://stackoverflow.com/questions/124269/simplest-soap-example-using-javascript – BigMike May 04 '12 at 07:34

1 Answers1

0

use $.ajax(), specify the URL, and the data type

$.ajax({
  url: "yourPage.aspx/yourWebSerivice/YourMethod",
  type: "POST",
  data: "{}",
  dataType: "xml"
});
Ravi Gadag
  • 15,735
  • 5
  • 57
  • 83
  • So it is so easy ? well, I've wasted a couple of year fliyng through envelopes, security headers and cross domain stuffs for nothing... - just joking pal, this example shows only how to perform an ajax post, not a SOAP call. – BigMike May 04 '12 at 07:39