1

I am developing web services (using Java) for an iOS mobile application, and as a part of the requirement there is a need to get all the recurrences for all defined Calender events in SharePoint. I was able to generate all the stubs for this and use the getListItems method to get the calendar event lists without any issues. But I was not able to use this method to fetch the recurrent data. I have tried many different query and query option parameters and every time it fails with javax.xml.ws.soap.SOAPFaultException.

Using the getListItems method I was able to retrieve the Calender event list like this but not the recurrences:

<z:row ows_Created="2012-03-30 17:07:49"
    ows_EndDate="2012-06-04 16:30:00"
    ows_EventDate="2012-04-02 14:00:00"
    ows_FSObjType="881;#0"
    ows_FileRef="881;#teamsite/SCM/Lists/CIG ISTQA Build  Deployment Calender/881_.000"
    ows_ID="881" ows_MetaInfo="881;#"
    ows_Title="IST7 (COL + nJPMOL) - September PnT PH2 Early IST "
    ows_UniqueId="881;#{3F79DE4B-7609-4559-9176-3F8598CEC45B}"
    ows__Level="1" ows__ModerationStatus="0"
    ows_fAllDayEvent="0" ows_fRecurrence="1"
    ows_owshiddenversion="2"/>

I tried all the options in following link as well and failed with the same exception.

Expand recurring events from a Sharepoint calendar over webservices

I tried all these queries with the getListItems method:

            <Where><Or><And><Geq>
            <FieldRefName='EventDate'/>
            <ValueType='DateTime'StorageTZ='TRUE'>
            <Today/></Value></Geq><Leq>
            <FieldRefName='EventDate'/>
            <ValueType='DateTime'StorageTZ='TRUE'>
            <Today/></Value></Leq></And><And><Leq>
            <FieldRefName='EventDate'/>
            <ValueType='DateTime'StorageTZ='TRUE'><Today/>
            </Value></Leq><Geq><FieldRefName='EndDate'/>
            <ValueType='DateTime'StorageTZ='TRUE'>
            <Today/></Value></Geq></And></Or></Where>";

            <Where><DateRangesOverlap>
            <FieldRef Name=\"EventDate\" />
            <FieldRef Name=\"EndDate\" />
            <FieldRef Name=\"RecurrenceID\" />
            <Value Type='DateTime'><Year/></Value>
            </DateRangesOverlap></Where>";

            <Where><DateRangesOverlap>
            <FieldRef Name=\"EventDate\" />
            <FieldRef Name=\"EndDate\" />
            <FieldRef Name=\"RecurrenceID\" />
            <Value Type=\"DateTime\"><Month />
            </Value></DateRangesOverlap></Where>";

            <Where><DateRangesOverlap>
            <FieldRef Name=\"EventDate\" />
            <FieldRef Name=\"EndDate\" />
            <FieldRef Name=\"RecurrenceID\" />
            <Value Type=\"DateTime\"><Month/>
            </Value></DateRangesOverlap>
            </Where><OrderBy><FieldRef Name='ID' /></OrderBy>";

AND Query options:

        <ExpandRecurrence>TRUE</ExpandRecurrence> 
        <CalendarDate>2012-05-01T00:00:00Z</CalendarDate>
       <ViewAttributes Scope=\"RecursiveAll\" />";

        <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
        <DateInUtc>TRUE</DateInUtc><ViewAttributes Scope=\"Recursive \"/>
        <RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>   
        <ExpandRecurrence>True</ExpandRecurrence>
        <CalendarDate>2011-10-16T00:00:00Z</CalendarDate>
        <RecurrenceOrderBy>TRUE</RecurrenceOrderBy>
        <ViewAttributes Scope=\"RecursiveAll\"/>";

        <ExpandRecurrence>TRUE</ExpandRecurrence>";

But none of them worked and failed with the same javax.xml.ws.soap.SOAPFaultException.

Can anyone please help me to fetch this recurring data ? Is there any other way to do it? It is possible to get it using Java?

Community
  • 1
  • 1
hiranthah
  • 11
  • 1
  • 3

1 Answers1

0

The following article was published last week and contains detailed information:

https://www.nothingbutsharepoint.com/sites/eusp/Pages/Use-SPServices-to-Get-Recurring-Events-as-Distinct-Items.aspx

Christophe
  • 27,383
  • 28
  • 97
  • 140
  • @Christope:Thanks for your valuable comments. But this has highlighted the way doing this thing in java script and I need to do the same in JAVA – hiranthah May 07 '12 at 18:18
  • @hiranthah I understand, and I am not familiar with java. But the CAML query should be the same. – Christophe May 07 '12 at 19:07