Video Screencast Help

Symantec Workspace Streaming - SWS SDK Examples in C#

Created: 09 Feb 2011 • Updated: 02 Mar 2011 | 1 comment
Language Translations
Scot Curry's picture
+1 1 Vote
Login to vote

Introduction

I was working with a customer that wanted to set up a self service software provisioning portal. While Workspace Streaming does expose a portal of available applications, those applications have already been provisioned to the user. The customer asked if there was a way that the user could see a list of available applications, pick theapplication and have it provisioned to the user. I was happy to report that Workspace Streaming ships with an SDK and we could build the solution using that SDK.

As I worked with the SDK, I learned a couple of thing that will hopefully make your experience using it a bit quicker and more productive which I will cover in this article. I also built a sample program that is nothing more than a command line program that runs through some of the major methods exposed by the SDK. Attached is a Visual Studio 2010 project that you can use as samples of how to use the SDK. The sample is based on .NET Framework 2.0 in an attempt to keep the dependencies to a minimum.

The sample code here is based on Symantec Workspace Streaming 6.1 SP6 MP1. We are constantly adding functionality to the SDK, so the example code may not work with earlier versions.

Building the Solutions

To get the solution off the ground you will need to build the C# Proxy classes with the BuildProxyClass.bat file. Note: Do a search and replace, searching for SWSServer and replacing it with your SWS Server name. The reference to these assemblies are in the solution. You will need to have the Workspace.Streaming.Identity, Workspace.Streaming.Packaging, Workspace.Streaming.Provision DLL's in the same folder as the project, or you will need to remove the references and point to the location where you built the assemblies.

Note: I have hardcoded the path to the CSC.EXE and WSDL.EXE. Make sure these works for your environment before building the proxy classes.

Note: Delete the Config.xml file or replace the elements with the appropriate information for your configuration.

Use WSDL.EXE not Web References

When I started with the project, I used Visual Studio to create Web References. It may be because I don't really understand how to make modifications once the Web References are created, but I found that method challenging. I would recommend creating proxy classes. The BuildProxyClass.bat file iwas built to handle this step of the process

Be Careful with Namespace Conflicts

I have reported to the development team that in a future release we might want to make some changes to the class names. When you start to work with the provisioning class, you will almost always need to use some of the functionality from the packaging class. BriefPackageInfo is defined in both namespaces so you will need to fully qualify any instances of that class if you reference both the packaging and provision assemblies

Error Handling

The sample doesn't have any. I wanted this to serve just as a tool to see how to implement the methods in the SDK. It is not built to be a true application. If you are having issues, I would recommend you fire up VS 2010 and run the code through the debugger to see what is going on.

Conclusion

I am hopeful that this sample code will get you off to a good start with the SWS SDK and you can develop some unique solutions. Please post comments to this article. Based on my work I have submitted some suggestions to the development team. They are always good about taking input, so if you have suggestions, please let us know.

Comments 1 CommentJump to latest comment

mark_green's picture

You may want to check out Metascan.
Metascan antivirus SDK provides IT professionals and software engineers with an easy way to integrate URL filtering and multiple antivirus scanning technologies (CA, Norman, ESET, AVG, ClamWin, Quick Heal, Sunbelt and VirusBuster) into their proprietary solutions to perform real-time anti-malware scanning.

Here is the link: http://www.opswat.com/products/metascan.

0
Login to vote