To run the demo, you need to do the following:

Pre-requisites:

1. Download & install Java 6 (if not done already)
   [from java.sun.com]

2. Download & install Mule 2.2.1
   [from mulesource.org]

3. Set environment variables to the root of the installation folder
   - JAVA_HOME (if not done already)
   - MULE_HOME (I put mine in /tools/mule-standalone-2.2.1)

4. Start a command shell
   1) cd to MULE_HOME/examples/echo folder
   2) execute the echo.bat (or echo) shell script
      NOTE: you will need to accept the Mule license only the first
      time you run Mule.
   3) at the prompt, you should choose option 1 and hit return
   4) enter something when prompted by the echo demo and hit return
   5) if all went well, then you will see the reply, which is what you
      typed in at the console as input.
   6) enter <Ctrl-C> to exit Mule

At this point, you have the prerequisites in place for the demo.

5. Unzip the esb-demo.zip file on the filesystem -- I chose
   /Users/Rich/dev as the root folder.

6. cd to the new esb-demo folder you just unzipped

7. Edit the properties files

   1) Configure the file system directories to match where you
      installed the esb-demo.  Specifically, change the values
      for LOGMSG_IN_URI and LOGMSG_OUT_DIR appropriately.

   	    on Windows, edit conf\win-file.properties
        on Mac/Unix, edit conf/mac-file.properties

   2) configure the email and SMTP server properties appropriately
      NOTE: this currently expects you can run a mail server locally
      and have an account name Rich setup.  You can also use the
      same values for your ISP outbound SMTP settings for both the
      SMTP and SMS properties - not your POP3 inbound settings. The
      email.fromAddress should be your own email assigned by your
      ISP.  The email.toAddress can be pretty much anything, like a
      gmail account or the same as the email.fromAddress.
   
   	    on all systems, edit conf/common.properties

   3) configure the SMS server properties appropriately
   
   	    on all systems, edit conf/common.properties
   
      NOTE: the sms.toAddress would only need a number change if
      you use AT&T.  If you use T-Mobile or Verizon, or something
      else, then you will need to change the server part as well.
      A good reference for the different SMS email gateway servers
      can be found at http://en.wikipedia.org/wiki/SMS_gateway
      
         for verizon, use number@vtext.com
         for t-mobile, use number@tmomail.net
      
      where 'number' is the 10 digit phone number without dashes

   Brief aside here...  If you want to use your external SMTP server for
   all message flows, then you can configure the SMTP and the SMS properties
   to be the same external server.  This would be appropriate if you don't
   have your own email server to play with locally.

   Now, you should be ready to run the demo.

8. Start Mule by running the appropriate shell script from a command
   window.

	   NOTE: on Windows, this is bin\demo.bat
	         on Mac/Unix, this is bin/demo.sh

   0) first, edit the DEMO_HOME and MULE_HOME environment variables in the
      demo.bat or demo.sh files to match where you installed them both.

   1) run the newly edited script and you should see the nice box of
      asterisks with the notice that Mule started.
   
   2) open a new command shell window and cd to the logmsg folder in
      the esb-demo folder
   
   3) copy the logmsg.csv file into the in folder
   
   4) you should see activity in the Mule console window and if all
      went well, you should get an email with the WARNING
   
   5) copy the logmsg-I.xml file into the in folder and you should
      see some more activity.  This message will be disposed, because
      it is only an INFO message.
   
   6) copy either (or both) of the logmsg-E.xml or logmsg-F.xml and
      you should see some activity and if you setup the SMS address
      correctly for your phone, you should get an SMS text message

9.  If step 8 went well, then you can also run the LogMessageProducer
    program by executing the appropriate muleclient shell script. This
    will produce four messages and send them to Mule using the MuleClient
    APIs provided by Mule.
    
       NOTE: on Windows, this is bin\muleclient.bat
             on Mac/Unix, this is bin/muleclient.sh

    0) first, edit the DEMO_HOME and MULE_HOME environment variables in the
      muleclient script file to match where you installed them both.

    1) in a second command window, execute the muleclient script and
       note all the nice messages in the Mule console.

10: If step 9 worked, then you can try the WebService demo.  You will
    need to download SoapUI (soapui.org) or some other web service test
    client.  You will also need to create the test database using your
    favorite DB. I use MySql and there is a SQL backup script you can
    use to create the database and the table used in the demo.  Look
    in the sql folder at the root of the unzipped demo.
    
    You will also need to edit the common-config.xml and uncomment
    the <spring:beans> block near the top.  And, you will probably
    need to edit the common.properties file to ensure your JDBC
    properties are set correctly. If you are not running MySql, you
    will need to add the appropriate JDBC driver jar file the the
    lib folder and edit the demo script to add it to your CLASSPATH.
    
    Once the Mule demo is running, you can get the WSDL for the
    service by pointing your browser (or SoapUI) at:
    
		http://localhost:9999/services/LogMessageService?wsdl    

    SoapUI will create a test message for you, which you will need to
    edit.  There is a sample request (found in the ws folder) you can
    paste as the complete SOAP request.

	Once you've got the request created appropriately, send it by
    clicking the green "play" button.  If all went well, you will
    see lots of success messages in the Mule console, get a SMS
    message, see that a new record was inserted into the db.

======================
That's all folks :-)
======================

Unless you want to mess around with the source files.  If so, then
read on...

There is a build.xml file ready for you to type in "ant" at the command
line.  This assumes you have ant version 1.7 or later installed.  Assuming
you have no errors in code, it will compile all the source files found in
the src folder.  Once you've successfully compiled the source, just run
the shell script again.

Have fun and good luck!