OSU Calendar Web Service

 

Introduction

T

he OSU Calendar Web Service provides a mean of retrieving calendar events for display.  Events can be retrieved from any start date the user chooses and a range of the users desired time frame (up to 999 days).  The OSU Calendar Web Service uses SOAP and returns the data in XML.  If you require assistance in using the web service please contact OSU Information Technology Software Services at webteam@okstate.edu.

 

Web Service

getEvents

URL:  https://app.it.okstate.edu/WebServices/wsdl/eventsService.wsdl

Results:  Events in XML format with the time frame provided.  If an error occurs, the error message will also be returned in XML.  The table below describes all fields in each event returned by getEvents.

Name

Value

Description

eventid

string

The index number of this event.

sponsorid

integer

The short identifier of the organization that inputted the event into the calendar.

inputsponsor

string

The name of the organization that inputted the event into the calendar.  See the table titled “Sponsors” below.  This value is tied with sponsorid in the database.

displayedsponsor

string

The name of the sponsor that is displayed in the calendar's detailed view.

displayedsponsorurl

string

The URL of the homepage of the sponsor that is displayed in the calendar's detailed view.

date

string

The date the event takes place, written in the ISO-8601 format (YYYY-MM-DD).

timebegin

string

Either

·         The time the event begins, written in the ISO-8601 format (military/24 hour time).

·         If the value is "00:00" and timeend is "23:59" the event is considered to be an "all day event".

timeend

string

Either

·         The time the event ends, written in the ISO-8601 format (military/24 hour time).

·         If the value is completely omitted the event is considered to not have a specified ending time

repeat_vcaldef

string

Null if the event is not recurring, or:

·         If the event is a recurring event it contains the recurrence definition in vCalendar format.  For example "W1 MO WE FR 20000502T235900" means that an event repeats every week Monday, Wednesday & Friday until May 2, 2000

repeat_startdate

string

Null if the event is not recurring, or:

·         The date when the recurrence starts.

repeat_enddate

string

Null if the event is not recurring, or:

·         The date where the recurrence ends.

categoryid

integer

The index number indicating the category of the event (see the table titled “Category Values” below).

category

string

The name of the category associated with the event.

title

string

The event title (displayed in weekly, monthly and detailed view).

description

string

A long text describing the specifics of an event.

location

string

The location where the event takes place (building, room etc.)

price

string

The price of the event.

contact_name

string

The name of a person that can be contacted if further info is required.

contact_phone

string

Contact phone number(s).

contact_email

string

Contact email address.

url

string

URL of a web page specifically describing the event.

brochure_url

string

URL of an event brochure.

register_url

string

URL of an event registration page.

recordchangedtime

string

A timestamp indicating when this event was changed the last time.

recordchangeduser

string

The name of user who changed the event the last time.

 

Required Data: 

Parameter

Value

Description

calendarid

string

Currently only value is “default”.

type

string

Currently only value is “xml”.

categoryid

string

See Categories below, use ID.

sponsortype

string

“all” or “specific”

specificsponsor

string

If sponsortype is specific.  See the sponsor names below else NULL.

timebegin_month

string

1 through 12.

timebegin_day

string

1 through 31.

timebegin_year

string

4 digit year.

rangedays

string

Number of desired days from time begin.  Must be 0 through 999.

 

Category Values

ID

Name

0

All

1

Academic

2

Athletics

3

Community

4

Organization

5

Training

6

Research

8

Holiday & School  Break

9

Alumni

10

Recruitment

14

Human Resources Training

15

Health/Wellness



Sponsors

Name

ACADEMIC AFFAIRS

ADMINISTRATION

Administration

ADMISSIONS

AFRICAN STUDENT ORGANIZATION

AFRICAN-AMERICAN BUS. STU. ASSOC.

AGRICULTURE

ALLIED ARTS/SPECIAL EVENTS

ALUMNI ASSOCIATION

ART DEPARTMENT

ARTS & SCIENCE LECTURE SERIES

ARTS & SCIENCES

ATHLETICS

BOTANY

CAMP COWBOY

CAMPUS LIFE

CAREER SERVICES (HIREOSUGRADS.COM)

CEAT

CENTER FOR AFRICAN STUDIES

CENTER FOR EXEC AND PROF DEVE

COLLEGE OF EDUCATION

CULTURAL ITALIAN AMERICAN ORGANIZATION

DIVISION OF INTERNATIONAL STUDIES AND OUTREACH

ECO-OSU

ENGLISH DEPARTMENT

ENTREPRENEURSHIP

EPSCoR

FOOD & AG PRODUCT CENTER

FORESTRY

FRATERNITY & SORORITY AFFAIRS

GARDINER ART GALLERY, DEPT. OF ART

GPSGA

GRAD PROF SGA

GRADUATE COLLEGE

HES

HISTORY CLUB

HISTORY DEP

HONORS COLLEGE

Housing and Residential Life

HUMAN RESOURCES

Inclusion Center for Academic Excellence

INFORMATION TECHNOLOGY

INSTITUTIONAL DIVERSITY

INTERNATIONAL STUDENT ORGANIZATION

INTERNATIONAL STUDENTS AND SCHOLARS

IRIS LAB

LIBRARY

MUSIC DEPARTMENT

NATIVE AMERICAN STUDENT ASSOCIATION

OFFICE OF LEADERSHIP DEVELOPMENT

OFFICE OF THE PRESIDENT

OK WATER RESOURCES RESEARCH INST

OKLAHOMA STATE IMPROV

OSU CENTER FOR VET HEALTH SCIENCES

OSU FOREIGN LANGUAGES

OSU PARENTS ASSOCIATION

OSU SCREEN STUDIES

OSU THEATRE

OSU TULSA CAREER SERVICES

OSU WRITING CENTER

PHI BETA SIGMA

PHILOSOPHY

PHYSICS

PSI CHI HONORARY

PSYCHOLOGY CLUB

REGISTRAR

Research

RIATA CENTER

SCHOLAR DEVELOPMENT & RECOGNITION

SERETEAN WELLNESS CENTER

SERVICE LEARNING VOLUNTEER CENTER

SOCIETY OF WOMEN ENGINEERS

SPEARS SCHOOL CAREER SERVICES

SPEARS SCHOOL OF BUSINESS

SPRING SING

STAFF ADVISORY COUNCIL

STUDENT AFFAIRS

STUDENT ASSOCIATION OF GLOBAL AFFAIRS

STUDENT GOVERNMENT ASSOCIATION

STUDENT UNION ACTIVITIES BOARD

STUDENT UNION MARKETING

STUDENTS IN FREE ENTERPRISE

STUDY ABROAD OFFICE

TECHNOLOGY SUPPORT

TRAINING SERVICES

TRANSFER STUDENT ORGANIZATION

University Club

UNIVERSITY COUNSELING SVCS.

UNIVERSITY HEALTH SERVICES

VETERINARY MEDICINE

VP FOR RESEARCH AND TECH TRANSFER

WOMEN'S FACULTY COUNCIL

WOMENS PROGRAMS

YOUNG DEMOCRATS

ZETA PHI BETA SORORITY

 

 

Sample Code

PHP (Reference: http://www.php.net/manual/en/class.soapclient.php)

1.     Make a new instance of a soap client using built-in library, and point https://app.it.okstate.edu/WebServices/wsdl/eventsService.wsdl as the location of wsdl file.

2.     Prepare an array of parameters to be sent to the web service.  Please look at the table (Required Data) above for what it needs to have.

3.     Call the function getEvents() on soap client by sending the function name and array of parameter to __call() method of the soap client.

$wsdl = "https://app.it.okstate.edu/WebServices/wsdl/eventsService.wsdl";

$client = new SoapClient($wsdl);

$params = array(

      'calendarid' => 'default',

      'type' => 'xml',

      'categoryid' => '0',

      'sponsortype' => 'all',

      'specificsponsor' => null,

      'timebegin_month' => '4',

      'timebegin_day' => '10',

      'timebegin_year' => '2011',

      'rangedays' => '60'

);

$results = $client->__call('getEvents',$params);

 

.NET

Start by adding a WebReference to https://app.it.okstate.edu/WebServices/wsdl/eventsService.wsdl to your project.  For consistency with the samples below, name this reference EVENTS.  Paste the following code where desired.

VB

Dim disp_events As EVENTS.eventsServiceService = New EVENTS.eventsServiceService()

 

Dim calendarid As String

Dim type As String

Dim categoryid As String

Dim sponsortype As String

Dim specificsponsor As String

Dim timebegin_month As String

Dim timebegin_day As String

Dim timebegin_year As String

Dim rangedays As String

Dim get_events As String

 

calendarid = "default"

type = "xml"

categoryid = "0"

sponsortype = "all"

specificsponsor = ""

timebegin_month = "7"

timebegin_day = "1"

timebegin_year = "2009"

rangedays = "10"

 

Try

get_events = disp_events.getEvents(calendarid, type, categoryid, sponsortype, specificsponsor, timebegin_month, timebegin_day, timebegin_year, rangedays)

My.Computer.FileSystem.WriteAllText("C:\\vbtext.txt", get_events, True)

Catch ex As Exception

 

End Try

 

C#

string calendarid, type, categoryid, sponsortype, specificsponsor, timebegin_month, timebegin_day,timebegin_year, rangedays;

 

calendarid = "default";

type = "xml";

categoryid = "0";

sponsortype = "all";

specificsponsor = null;

timebegin_month = "7";

timebegin_day = "1";

timebegin_year = "2009";

rangedays = "2";

 

EVENTS.eventsServiceService disp_events = new EVENTS.eventsServiceService();

try

{

System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\test.txt");

 

file.WriteLine(disp_events.getEvents(calendarid, type, categoryid, sponsortype, specificsponsor, timebegin_month, timebegin_day, timebegin_year, rangedays));

 

file.Close();

}

catch (System.Web.Services.Protocols.SoapException exception)

{

Response.Write(exception);

}

JAVA

Coming Soon