Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Want to Fetch some data from xml response comes from ajax jquery call of plugin

$
0
0

Hi,

I have ajax call for execute plugin through action and in success I get xml response as per below .And I want to fetch "This is Response" which is my output parameter from the response displayed below.

         $.ajax({
                type: "POST",
                contentType: "text/xml; charset=utf-8",
                datatype: "xml",
                url: serverUrl + "/XRMServices/2011/Organization.svc/web",
                data: requestXML,
                beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("Accept", "application/xml, text/xml, */*");
                    XMLHttpRequest.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../Execute");
                },
                success: function (data, textStatus, XmlHttpRequest) {
                    debugger;
                    if (XmlHttpRequest.status === 200) {
                        var response = XmlHttpRequest.responseXML;
                        alert(XmlHttpRequest.responseText);
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(errorThrown);
                }
            });


Response of call which I get in success:

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><ExecuteResponse xmlns="schemas.microsoft.com/.../Services"><ExecuteResult xmlns:a="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><a:ResponseName>new_PASMcreateProject</a:ResponseName><a:Results xmlns:b="schemas.datacontract.org/.../System.Collections.Generic"><a:KeyValuePairOfstringanyType><b:key>Response</b:key><b:value i:type="c:string" xmlns:c="www.w3.org/.../XMLSchema">This is response</b:value></a:KeyValuePairOfstringanyType></a:Results></ExecuteResult></ExecuteResponse></s:Body></s:Envelope>

Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>