Steps to build and deploy Beagle Web Service interface:
=======================================================
<apology>
	Sorry for this crude list of steps. Haven't had time to create/edit Makefiles yet!
</apology>

1. Unzip the attached zip file into the main beagle folder.
   It should create a sub-folder 'websvc'.

2. Open a Terminal. Change to this beagle/websvc folder and run ./bmake. (Edit bmake shell script
   file for your setup, if needed). This will build the dll's required for web service interface
   and copy them to default install directory viz. /usr/local/lib/beagle.

3. Setup for XSP:
   Note: If you run xsp from a terminal, the rootdir for xsp is current working directory.
   You must have a sub-folder named 'bin' under the current directory, which contains all dlls
   needed for BeagleWebService operation. So, you need to:
   a. Copy beagled.asmx to the xsp rootdir.
   b. Copy all Beagle dll's (Util.dll, Beagle.dll, BeagleDaemonPlugins.dll & BeagleDeamonLib.dll)
      and the two web service dll's (beagledBridge.dll, BeagleWebSvc.dll) to the bin folder.

   e.g. if the rootdir for xsp is /usr/share/doc/xsp/test &
        a. copy beagled.asmx to /usr/share/doc/xsp/test 
        b. copy the dll's mentioned above to /usr/share/doc/xsp/test/bin

4. Edit beagled/BeagleDaemon.cs, to update the Main() method to call 
	beagledBridge.initBridge();

   So, add the statement after QueryDriver.Start() (around line no. 350) like this: 
      	....
	// Start the query driver.
	Logger.Log.Debug ("Starting QueryDriver");
	QueryDriver.Start ();

	Logger.Log.Debug ("Starting beagledBridge Listener");
	beagledBridge.initBridge();
	
	// Start the Global Scheduler thread
	....

5. Edit the Makefile in beagled subfolder for target BeagleDaemon.exe to reference
   beagledBridge.dll as follows:

	DAEMON_LOCAL_ASSEMBLIES =			\
		../Util/Util.dll			\
		../BeagleClient/Beagle.dll		\
		BeagleDaemonPlugins.dll			\
		BeagleDaemonLib.dll			\
		../websvc/beagledBridge.dll		\
		./$(PLUGIN_TARGET)			\
		./$(DAEMON_DLL_TARGET)

    Do configure, make and make install from beagle folder. 

6. If you have executed all the above steps successfully, you are ready to test the Beagle Web
   Service interface:
   a. Run 'beagled --fg'in one terminal
   b. In another terminal, run 'xsp' from the folder in which you copied beagled.asmx (and which
      has the 'bin' sub-folder with all needed dlls)

   Open Firefox browser and connect to "http://127.0.0.1:8080/beagled.asmx"
   This should bring up an initial page from BeagleWebSvc.
   c. Click on 'simplebeagledQuery' link in the left Panel under Methods.
   d. Click on 'Test Form' in the right panel.
   e. Enter a search string in the form and click Invoke. this should return results in xml form.
      (If you get 'Page not found' error message, click browser Refresh button).


   
	
