Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Accessing SharePoint via SOAP

by tomva (Initiate)
on Sep 09, 2011 at 20:51 UTC ( #925162=perlquestion: print w/replies, xml ) Need Help??

tomva has asked for the wisdom of the Perl Monks concerning the following question:

Hello all-

I have been trying to talk to a sharepoint server, starting with this post: link

The server is running SharePoint 2010, and I'm accessing via https.

I've been able to connect and make SOAP requests, and I am able to successfully invoke GetListCollection(), for instance.

However, all of my attempts to call GetListItems() fail with a "Value does not fall within the expected range." exception from the server.

I'm guessing the documentation online is for older versions of SharePoint, so there is some additional field I need to supply to my GetListItems() call. But the errors are pretty opaque, and I've been unable to find, guess, or steal the correct field from MSDN or other searches.

Has anyone run into this or have any suggestions?

Here is a sample request as dumped by SOAP::Lite: (the listName is the list ID as returned by GetListCollection).
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="" xmlns:soapenc="" xmlns:xsd="" soap:encodingStyle="" xmlns:soap=""> <soap:Body> <namesp2:GetListItems xmlns:namesp2=" +sharepoint/soap/"> <listName xsi:type="xsd:string">{C3E2B6FC-8847-49F7-8164-E98FDE4 +08FC0}</listName> </namesp2:GetListItems> </soap:Body> </soap:Envelope>

And the response:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="" +xmlns:xsi="" xmlns:xsd="http +://"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.Soa +pServerException' was thrown.</faultstring> <detail> <errorstring xmlns=" +/">Value does not fall within the expected range.</errorstring> </detail> </soap:Fault> </soap:Body> </soap:Envelope>

Thanks for any help or suggestions!


Replies are listed 'Best First'.
Re: Accessing SharePoint via SOAP
by Anonymous Monk on Sep 10, 2011 at 04:09 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://925162]
Approved by chrestomanci
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2023-12-02 02:34 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (13 votes). Check out past polls.