Forum breadcrumbs - You are here:OfficeClip ForumsGeneral Discussion: Developer ResourcesWeb ServicesWeb Service Example: Get All Cale …
Web Service Example: Get All Calendar Events
Deepa Kapoor@deepa
190 Posts
#1 · November 27, 2025, 10:48 am
Quote from Deepa Kapoor on November 27, 2025, 10:48 amThe following code (written in C#) shows how to get all the events from the OfficeClip Web Service:
Code:
using System; using System.Collections.Generic; using System.Web.Services; using System.Web.Services.Protocols; using WebServiceClient.Generic; namespace WebServiceClient { public class Program { static void Main(string[] args) { // Create a web services connection WebServiceClient.Generic.OfficeClipGeneric ofg = new WebServiceClient.Generic.OfficeClipGeneric(); try { // Create a cookie container so that the session can persist on the server ofg.CookieContainer = new System.Net.CookieContainer(); // Login to the Server string errorMessage = ofg.ValidateUser("octest1@officeclip.com", "password"); Console.WriteLine ( (errorMessage == string.Empty) ? "Login Successful" : "Login Failed: " + errorMessage); // Get all the events // Service Type 14 is for Event, for details of other parameter and output schema see the API. // The output dataset will contain all the event information. DataSet ds = ofg.GetDataSet(14, -1, string.Empty, string.Empty, string.Empty, -1); } catch (SoapException ex) { Console.WriteLine(ex.Message); } finally { // Finally end the Session with OfficeClip Server ofg.SessionOver(); } } }Various service items codes are given in the document: https://www.officeclip.com/docs/output/webservice/index.html
The following code (written in C#) shows how to get all the events from the OfficeClip Web Service:
Code:
using System;
using System.Collections.Generic;
using System.Web.Services;
using System.Web.Services.Protocols;
using WebServiceClient.Generic;
namespace WebServiceClient
{
public class Program
{
static void Main(string[] args)
{
// Create a web services connection
WebServiceClient.Generic.OfficeClipGeneric ofg = new WebServiceClient.Generic.OfficeClipGeneric();
try
{
// Create a cookie container so that the session can persist on the server
ofg.CookieContainer = new System.Net.CookieContainer();
// Login to the Server
string errorMessage = ofg.ValidateUser("octest1@officeclip.com", "password");
Console.WriteLine ( (errorMessage == string.Empty) ? "Login Successful" : "Login Failed: " + errorMessage);
// Get all the events
// Service Type 14 is for Event, for details of other parameter and output schema see the API.
// The output dataset will contain all the event information.
DataSet ds = ofg.GetDataSet(14, -1, string.Empty, string.Empty, string.Empty, -1);
}
catch (SoapException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
// Finally end the Session with OfficeClip Server
ofg.SessionOver();
}
}
}
Various service items codes are given in the document: https://www.officeclip.com/docs/output/webservice/index.html
Click for thumbs down.0Click for thumbs up.0
Last edited on November 27, 2025, 10:50 am by Deepa Kapoor
