Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Accessing the web service via jQuery

$
0
0

I am trying to get a list of projects from the PSI web service using jQuery. When I run the code below all I get is the wsdl returned. I have tried it with the url: "http://w2k8r2-01/pwa/_vti_bin/PSI/Project.asmx", without soap, with soap and any number of combinations but all I get is the wsdl returned or an error.

Any help would be greatly appreciated!

var soapEnv = "\
        <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
            <soapenv:Body> \
                <ReadProjectList xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                </ReadProjectList> \
            </soapenv:Body> \
        </soapenv:Envelope>";

    function projectSuccess(data, textStatus, jqXHR) {
        console.log(data);
        alert("success");
    }

    $.ajax({
        url: "http://w2k8r2-01/pwa/_vti_bin/PSI/Project.asmx?wsdl",
        type: "POST",
        dataType: "xml",
        success: projectSuccess,
        contentType: "text/xml; charset=\"utf-8\"",
    })


Viewing all articles
Browse latest Browse all 5347

Trending Articles