Clarizen Web Services Developer's Guide
Execute Method (request)
Perform operations against the Clarizen web services
Parameters
request (array<BaseMessage>[]()[][])
An array of requests derived from BaseMessage
Return Value
array<Result>[]()[][]
An array of Result corresponsding to each request. You must cast each result to the specific instance that corresponds to the request parameter. See the remarks section for more information
Usage
This is the main entry point to the Clarizen web service platform. Using the Execute method you can perform the various operations that are exposed by the web service and receive a result for each operation. The Execute method uses a message based approach and supports a hierarchy of messages and a corresponding hierarchy of results. Each request is derived from the abstract BaseMessage class and each response derives from the Result class. Requests class names end with the "Message" keyword and most request have a corresponding Result class. For example, the CreateMessage that is used to create new entities returns a CreateResult instance. You must cast each result to its specific instance in order to get information specific for the request you sent.
Examples
The following example shows how to create an entity of type Task
 Copy imageCopy
static void CreateTask()
{
    CreateMessage createTask=new CreateMessage();
    //Create a Task entity
    GenericEntity task = new GenericEntity();
    task.Id = new EntityId();
    task.Id.TypeName = "Task";
    //Fill the task name
    FieldValue name = new FieldValue();
    name.FieldName = "Name";
    name.Value = "My Task";
    createTask.Entity = task;
    Result[] results = clarizen.Execute(new BaseMessage[] { createTask });
    CreateResult createResult=results[0] as CreateResult;
}