WebAccess needed a way to get the list of unread items in the user’s mailbox. The list needs to be returned as quickly as possible. This is a specialized call to return that list. There are a few parameters to qualify the list returned. The list returned is a list of sid's (short identifiers). Once you have the list you can pass the sid's in a getItemsRequest to return part or all of the items. --For GroupWise 2012 and later.


  <startDate type="dateTime" minOccurs="0"/>
  <types type="string" minOccurs="0"/>
  <source type="xs:string" minOccurs="0"/>


  <sids type="xs:string" minOccurs="0"/>
  <status type="types:Status"/>



If specified, return items with a startDate greater than or equal to the date. (For Mail, PhoneMessage or DocumentReference, it compares the value against the created date.)


A space delimited string of item types to include in the search. You can have one or more of the following values

  • Mail

  • Appointment

  • Note

  • Task

  • PhoneMessage

  • DocumentReference

  • CalendarItem

    (This includes appointments, notes and tasks.)

If you don't supply a value for "types", appointments, mail, notes, tasks and phone messages are returned.


A space delimited string of box types to include in the search. You can have one or more of the following values:

  • received

  • sent

  • personal (posted)

  • draft

If you do not supply a value, received, personal and draft items is returned.


The return value is a space-delimited list of sids of the matching items matching the query.


The query returns approximately 4000 items. If there are more items available, a D11B (53531) WPF_WARN_TOO_MANY_RECORDS error is returned. To get more items, you must adjust the startDate value and call getUnreadRequest again.


Here is some sample code. It gets the unread items. If there are too many items, it reads the last item, finds the startDate, and uses that to read the next set of sids.

NOTE:You might have some duplicate sids in this case. You must merge the sets.

  public void testFindUnread() {
    Calendar start = null;
    GetUnreadResponse   uresp = null;
    GetItemsResponse    resp = null;
    int i = 0;
    ItemRefList list = null;
    String read;
    String  str;
    String  view = "id sid status subject startDate created";
    String [] items = null;
    String [] one   = {""};
    StringTokenizer tokens;
    try {
      uresp = m_main.getService().getUnreadRequest( null, "Mail CalendarItem",
         null, m_main.getSessionId(), m_main.getTrace() );
      if ( null == uresp.getStatus() ) {
      if ( !(0 == uresp.getStatus().getCode() || 
        0xd11b == uresp.getStatus().getCode() ) ) {
        m_main.displayError( uresp.getStatus(), "testFindUnread" );
      tokens = new StringTokenizer( uresp.getSids(), " " );
      m_main.displayString( "Count = " + String.valueOf(tokens.countTokens())
      if ( 0xd11b == uresp.getStatus().getCode() ) {
        items = new String[ tokens.countTokens() ];
        while ( tokens.hasMoreTokens() ) {
          one[ 0 ] = items[ i++ ] = tokens.nextToken();
        list = new ItemRefList( one );
        resp = m_main.getService().getItemsRequest( "folders", view, null,
           list, 0, m_main.getSessionId(), m_main.getTrace() );
        start = ((Mail)(resp.getItems().getItem()[0])).getCreated();
        uresp = m_main.getService().getUnreadRequest( start, 
           "Mail CalendarItem", null, m_main.getSessionId(), m_main.getTrace()
        tokens = new StringTokenizer( uresp.getSids(), " " );
        m_main.displayString( "Count = " + 
           String.valueOf(tokens.countTokens()) );
    } catch ( Exception ex ) {
SOAP Trace
  <types>Mail CalendarItem</types>
  <sids>260815 264110 270837 ... 283851 283848 283845 283842 283839</sids>
    <description>More than 5000 records</description>
  <view>id sid status subject startDate created</view>
    <item >283839</item>
    <item type="Mail">
      <container sid="57442">4B82436A.domain.PO1.100.1776172.1.E062.1@13
      <subject>test three [962]</subject>
  <types>Mail CalendarItem</types>
  <sids>283851 283848 283845 ... 287055 287056</sids>