logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Peter  
#1 Posted : Friday, July 10, 2009 12:53:30 PM(UTC)
Rank: Administration
Peter
Groups: Registered, Administrators

Posts: 20
Location: Atlanta, GA
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("[email protected]", "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/...ut/webservice/index.html

Edited by moderator Friday, October 30, 2009 7:35:06 AM(UTC)  | Reason: Not specified

Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.