Index: [Article Count Order] [Thread]

Date:  Fri, 13 Jun 2008 13:46:47 -0700
From:  "Jim Scott" <jscott (at mark) infoconex.com>
Subject:  [coba-e:13299] Re: BlueQuartz - Webservice API? - Partly Completed
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <008a01c8cd96$99966d20$0569a8c0@WORK1>
References:  <009901c8cbf0$699a5250$0569a8c0 (at mark) WORK1> <200806112303.18144.bq (at mark) solarspeed.net> <030801c8cc52$1acee390$0569a8c0 (at mark) WORK1>
X-Mail-Count: 13299

Well I decided based on what Michael Stauber suggested to create my 
webservice API to wrap around the BlueQuartz shell-tools.

So I decided to create a prototype of what this might look like and make 
sure I did not into any issues with Mono and the BQ box. So here is what I 
have done so far.

Created 2 Webservice Methods

1) HelloWorld()  ;-) I think everyone needs one of these. Figured I would 
create this so that anyone looking to implement the WS could atleast make a 
very simple WS method call.

2) AddVirtualSite(Credentials credentials, AddVirtualSiteRequest 
addVirtualSiteRequest) . The signature shows in my class method. Credentials 
is an object that takes username and password. AddVirtualSiteRequest object 
contains all the properties needed to create a new site. The method returns 
a AddVirtualSiteResponse object that contains a boolean value if success and 
if failed an Array of messages indicating the failure reason.

Requirements:
Install the following Mono components

libgdiplus0.i386                         1.9-1.rhel4.novell     installed
mono-nunit.i586                          1.9.1-2.novell         installed
mono-core.i586                           1.9.1-2.novell         installed
mono-data-sqlite.i586                    1.9.1-2.novell         installed
mono-web.i586                            1.9.1-2.novell         installed
xsp.noarch                               1.9.1-0.novell         installed
mono-data.i586                           1.9.1-2.novell         installed
mono-winforms.i586                       1.9.1-2.novell         installed

Note: I am not using mod_mono or apache to host the application as I did not 
want to force the user to host this on apache. You could of course if you 
already have mono installed on apache simply host the webservice how you 
want. I used XSP2 as the webserver engine.

The webservice components I wrote which is one file provision.asmx and a bin 
folder with IFX.BQ.dll

I setup a startup script to start xsp and run on port 8091 but you can 
define in /etc/xsp.conf any port you like and whatever the startup folder is 
for this project.

If you are interested in testing this out email me privately and I will 
package up a howto guide and send you the files.

I have only done a little bit of testing so you should only use this on a 
test box. If you dont have one then you should download something like 
VMWare or MS Virtual PC and setup a virtual machine to play with. I am also 
going to setup a public machine that people can go to and see the webservice 
for review later today.

Things to complete:
Need to add more validation than I have to verify input data. Right now just 
do some basic validation to see if null or empty and check for required 
fields.

Once this method has been verified and proven to be useful I will work on 
implementing the other methods.

Jim