Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello all-

I have been trying to talk to a sharepoint server, starting with this post: squish.net 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="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <namesp2:GetListItems xmlns:namesp2="http://schemas.microsoft.com/ +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="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http +://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.Soa +pServerException' was thrown.</faultstring> <detail> <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap +/">Value does not fall within the expected range.</errorstring> </detail> </soap:Fault> </soap:Body> </soap:Envelope>


Thanks for any help or suggestions!

    -Thomas

In reply to Accessing SharePoint via SOAP by tomva

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-28 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found