jquery WebService responseXML / responseText

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-04-29T06:19:24Z Indexed on 2010/04/29 6:27 UTC
Read the original article Hit count: 765

Filed under:
|
|
|

I get an empty response back from this local WebService call via jquery / ajax.

I have verified the URL and XML input string by invoking the call in a browser. I DO get XML code back as expected.

What am I missing? Could it have something to do with the return type "XmlDocument"? I have tried changing out text/xml to text. No affect. Tried a GET instead of POST.


Webservice (running locally)...

_ Public Function GetXML(ByVal strXML As String) As XmlDocument... Dim retXML As XmlDocument = New XmlDocument()

...CODE....

Return retXML


Calling Function:

#

GetStat() {

var Url = 'http://localhost/myService.asmx?op=GetXML';

var msg = ' 55 POPE myUser
myPwd


';

$.ajax({
    url: Url,
    type: "POST",
    dataType: "text/xml",
    data: msg,
    complete: processResult,
    contentType: "text/xml"
});

return false;

}

function processResult(xmlData, status) { var jData = $(xmlData); }

#

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX