Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1004271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:06:30+00:00 2026-05-16T08:06:30+00:00

I am attempting to pull list Items from a sharepoint server(via python/suds) and am

  • 0

I am attempting to pull list Items from a sharepoint server(via python/suds) and am having some difficulty with making queries to GetListItems. If i provide no other parameters to GetListItems other than the list Name, it will return all the items in the default view for that List. I want to query a specific set of items(ID=15) to be returned and a specific set of fields(Date and Description) to be returned for those items. Here is my SOAP packet:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope "xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
  <ns1:GetListItems>
     <ns1:listName>MyCalendar</ns1:listName>
     <query>
        <Where>
           <Eq>
              <FieldRef Name="_ows_ID">15</FieldRef>
           </Eq>
        </Where>
     </query>
     <viewFields>
        <FieldRef Name="Description"/>
        <FieldRef Name="EventDate"/>
     </viewFields>
  </ns1:GetListItems>
</ns0:Body>
</SOAP-ENV:Envelope>

This appears to conform to the WSDL, however, when making the query i get back a full list of items with all the fields(as if i did not pass any query XML at all).

Any suggestions for a SOAP noob?

Also, here is my python code that generated this XML:

query = Element('query')
where = Element('Where')
eq = Element('Eq')
eq.append(Element('FieldRef').append(Attribute('Name', '_ows_ID')).setText('15'))
where.append(eq)
query.append(where)

viewFields = Element('viewFields')
viewFields.append(Element('FieldRef').append(Attribute('Name','Description')))
viewFields.append(Element('FieldRef').append(Attribute('Name','EventDate')))

results = c_lists.service.GetListItems('MyCalendar', None, query, viewFields, None, None)

Any help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:06:31+00:00Added an answer on May 16, 2026 at 8:06 am

    I figured this one out. The problem was the CAML query.

    1. You need to wrap the CAML ‘Query’ in a ‘query’ element.

    2. You need to set the proper ‘Value Type’ Element and attributes.

    See me other posting titled ‘Sharepoint Filter for List Items(GetListItems)’ for more info and code.

    Thanks!
    Nick

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to pull a list from SharePoint via CAML and I want the
I am attempting to pull out some items from a mysql DB and place
I'm attempting to pull some data from a SQLite database so that I can
I am attempting to pull some information from my tnsnames file using regex. I
I am attempting to pull posts from my Wordpress (on the same server as
I'm attempting to pull data from a page that a user is viewing and
I've been attempting to pull hard-coded configuration data from a Tomcat web-app which I'm
I am currently running into an issue when attempting to pull contacts from a
I am attempting to make some cross-DB(SQL Server and PostgreSQL) compatible SQL. What I
I'm attempting to pull a list of files that changed during a range of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.