Monday, May 19, 2008

Creating a CWA client with Silverlight 2 beta1 (part 2)

In Part 1 we got started on building the CWA client. Overcoming some development problems. In this part we actually gone start developing.


Getting Started
First thing to do in your silverlight application is creating 3 textboxes in which you can enter your logon information. Best way is to put them in a grid so you can hide the grid after logging in. We are gone need username, domain and password.
The next thing we need is a new class file in my case UserAgent.cs. In this class we going to put all our CWA Ajax logic. As you can see all code is in C#.
First add some private and public properties we are going to need:
public class UserAgent

Next step is the initializing of this class. As this application can only run on a cwa server we can get our server url dynamically.


Logging in to the server.
Now it is starting to get interesting. Let’s create the login method on our class. After that we can call it from our silverlight application.
First create a new class for building the request.
Now we can build our request and start signing in.

As you can see we get our CWA-Ticket back. We going to need this for all future request we are going to make.
As this article has become a little larger as I initially planned, processing the response and initiating the session will be addressed in the next part of this series. Question of maybe feature requests please send us an email or contact us directly.
Marc Wetters and Joachim Farla or

No comments:

working at e-office