gogga Frequent Contributor.
Frequent Contributor.
1348 views

Unable to search for all items across all folders

Hi

I am writing an archiver for GroupWise and I need to find all new items since the last time the archiver ran. I am using a filter on the modified field. According to the documentation I can use getItemsRequest without a container and just a filter.

When I send the following request:

<getItemsRequest>
<view>default</view>
<count>-1</count>
<filter>
<element type="FilterEntry">
<op>gt</op>
<field>modified</field>
<value>2014-12-22T21:23:49Z</value>
</element>
</filter>
</getItemsRequest>

I get an empty response - no errors.

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Header/>
<s:Body>
<getItemsResponse>
<items>
</items>
<status>
<code>0</code>
</status>
</getItemsResponse>
</s:Body>
</s:Envelope>

It does not matter what value I use for the time. It only returns items when I add a valid container id. I am using GroupWise 2014.

The docs read as follows:

If a container is not supplied, either a filter or an item reference list is required to limit the search. Also, if the container is not specified, all folders are searched.

The getItemsRequest reads all the items in the specified container. The number of items returned can be reduced by providing the count element. For example, if a container has 4,000 items, getItemsRequest returns all 4,000 items if a count is not specified. If a count of 200 is specified, 4,000 items are read and only 200 items are returned. Reading all the items in a container and returning a subset of items is not efficient.

Be aware that getItemsRequest returns only 5,000 items. If the more than 5,000 items are available, an error message is returned, directing you to refine your search criteria.

You can use filters to limit your searches.

So my question is - are the docs wrong or am I doing something wrong ?

Thanx

Johan
Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: Unable to search for all items across all folders

I can't reproduce what you are seeing.
Can you send the actual soap trace?
What are you using as the <version> element when you log in?

Preston



>>> On Monday, December 22, 2014 at 2:56 PM,

gogga<gogga@no-mx.forums.novell.com> wrote:

> Hi
>
> I am writing an archiver for GroupWise and I need to find all new items
> since the last time the archiver ran. I am using a filter on the
> modified field. According to the documentation I can use getItemsRequest
> without a container and just a filter.
>
> When I send the following request:
>
> <getItemsRequest>
> <view>default</view>
> <count>‑1</count>
> <filter>
> <element type="FilterEntry">
> <op>gt</op>
> <field>modified</field>
> <value>2014‑12‑22T21:23:49Z</value>
> </element>
> </filter>
> </getItemsRequest>
>
> I get an empty response ‑ no errors.
>
> <?xml version="1.0" encoding="UTF‑8"?>
> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance">
> <s:Header/>
> <s:Body>
> <getItemsResponse>
> <items>
> </items>
> <status>
> <code>0</code>
> </status>
> </getItemsResponse>
> </s:Body>
> </s:Envelope>
>
> It does not matter what value I use for the time. It only returns items
> when I add a valid container id. I am using GroupWise 2014.
>
> The docs read as follows:
>
> If a container is not supplied, either a filter or an item reference
> list is required to limit the search. Also, if the container is not
> specified, all folders are searched.
>
> The getItemsRequest reads all the items in the specified container. The
> number of items returned can be reduced by providing the count element.
> For example, if a container has 4,000 items, getItemsRequest returns all
> 4,000 items if a count is not specified. If a count of 200 is specified,
> 4,000 items are read and only 200 items are returned. Reading all the
> items in a container and returning a subset of items is not efficient.
>
> Be aware that getItemsRequest returns only 5,000 items. If the more than
> 5,000 items are available, an error message is returned, directing you
> to refine your search criteria.
>
> You can use filters to limit your searches.
>
> So my question is ‑ are the docs wrong or am I doing something wrong ?
>
> Thanx
>
> Johan


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.