----------------------------------------------- | Authors: Janelle Mason and Monica Barnette | Date: October 22, 2007 | Project: Multi-Agent Systems (US Army Project) | Advisor: Dr. Esterline | Semester: Fall 2007 ----------------------------------------------- Purpose: Documentation regarding installing JUnit4.4, Axis 1.4, Jakarta Tomcat 6.0.14, MySQL, and jUDDI. Installing Techniques ===================== Java Installation ----------------- 1. Make sure that you have Java installed version jdk1.6.0_03 at least. You can verify this by looking in the following path: C:\Program Files\Java 2. If it is not installed on the system, then google search for "Windows Platform - Java(TM) SE Development Kit 6 Update 3". Then download the application. 3. Add the location to of this version of Java to the System variables. Select 'New' and 'Variable name:' is JAVA_HOME. The 'Variable value' should be C:\Program Files\Java\jdk1.6.0_03 or location where you downloaded it. 4. Then locate the 'Path' System variable and add this path to list of 'Variable value'. Do the same thing for the User variables for Administrator for the 'PATH' variable. Installing JUnit ---------------- 1. Go to the site: http://junit.sourceforge.net/doc/faq/faq.htm 2. Go to the section entitled "Getting Started". 3. Follow Step 2 "How Do I install JUnit?" and the instructions listed below. 4. Add the junit.jar file to your CLASSPATH variable. 5. Before completing Step 4, open a command prompt and go to this path C:\junit4.4\javadoc\org\junit\runners 6. Then execute the command java org.junit.runner.JUnitCore org.junit.tests.AllTests Installing Axis --------------- 1. Go to the Web Services - Axis 1.4 site, http://apache.mirror99.com/ws/axis/1_4/, download the axis-src-1_4.zip file. 2. Save this file in the C:\Program Files folder. 3. Extract all the files from the zip file in the C:\Program Files folder. 4. Go to the Apache Ant website, http://ant.apache.org/srcdownload.cgi 5. Under the 'Current Release of Ant' section, the bullet, '.zip archive:' select the link, apache-ant-1.7.0-src.zip and open the file. Do not save this file, it is not necessary. 6. Copy the 'xercesImpl.jar' and 'xerces-apis.jar' files from the 'apache-ant-1.7.0/lib' folder. 7. Paste the 'xercesImpl.jar' and 'xerces-apis.jar' files into the C:\Program Files\axis-src-1_4\axis-1_4\webapps\axis\WEB-INF\lib folder. 8. Installing Jakarta Tomcat ------------------------- 1. Go to the Jakarta Tomcat website, http://jakarta.apache.org/tomcat/. 2. Under the 'Download' section on the left hand side of the page, select the 'Tomcat 6.x' link. 3. Under the '6.0.14' section of the page, under the 'Binary Distributions' section, select the zip (pgp, md5) file, under the 'Core' section. 4. Save the apache-tomcat-6.0.14.zip file to C:\Program Files folder. 5. Extract all the files from the zip file in the C:\Program Files folder. Installing MySQL ---------------- 1. Go to the MySQL site, http://dev.mysql.com/downloads/mysql/5.0.html#downloads, to download the MySQL server. 2. Under the 'Windows downloads(platform notes)' section, select the 'Windows ZIP/Setup.EXE (x86)' select the 'Pick a mirror' link. 3. Select a mirror from the page. Save this executable file to the C:\Program Files folder. 4. Execute the executable file. Installing jUDDI ---------------- 1. Go to the Apache jUDDI website to download, http://ws.apache.org/juddi/releases.html. 2. Select the '0.9rc4' link. 3. Select a mirror to download the jUDDI application, from the http://www.trieuvan.com/apache/ws/juddi/0_9RC4/ website. 4. Select the juddi-0.9rc4.zip file. 5. Save this zip file to the C:\Program Files folder. 6. Extract all the files from the zip file in the C:\Program Files folder. 7. Copy the juddi folder from C:\Program Files\juddi-0.9rc4\juddi-0.9rc4\webapp. 8. Paste the juddi folder into the C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps Finish setting up Tomcat 6.0.14 ---------------------------------- ** Please refer to the 'How To use the JADE WSIG' document, http://jade.cselt.it/doc/tutorials/JADE_WSIG_Guide.pdf. ** For information regarding Web Services, read the book, 'Developing Web Services with Apache Axis', by Ka lok 'Kent' Tong. IMPORTANT STEP: Configure the MySQL database ---------------------------- 1. Copy the create_database.sql and insert_publishers.sql files from C:\Program Files\juddi-0.9rc4\juddi-0.9rc4\sql\mysql 2. Paste the create_database.sql and insert_publishers.sql files into C:\Program Files\MySQL\MySQL Server 5.0\bin 3. Then continue following the instructions 'Configure the MySQL database using ...'. Download JavaMail API --------------------- 1. Go to the following site: https://sdlc5b.sun.com/ECom/EComActionServlet;jsessionid=CA5095E2051BB729712BF43D6E50DEB5 2. Download the .zip file to this location C:\Program Files\ 3. Extract the javamail files. 4. Go to the following path: C:\Program Files\javamail-1.4.1 5. Copy the mail.jar file and paste it in the following path: C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib Download Activation file ------------------------ 1. Go to the following site: http://java.sun.com/products/javabeans/jaf/downloads/index.html#download 2. Download the .zip file and save it to this location: C:\Program Files\ 3. Extract the activation file to this location: C:\Program Files\jaf-1_1_1 4. Go to the following path: C:\Program Files\jaf-1_1_1 5. Copy and paste the activation.jar file to the location below: C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib Setting the CLASSPATH Environment Variable ------------------------------------------ 1. Under the CLASSPATH variable, enter the following paths to link the .jar files from Axis to set up the webserver. Enter the following: C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\axis.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\jaxrpc.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\saaj.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\mail.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\activation.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\xml-apis.jar; C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\lib\xercesImpl.jar; Note: when adding JADE to the CLASSPATH environment variable, make sure the jade libraries come before the libraries to setup the webserver. Web Tools Project plugins for Eclipse ------------------------------------- 1. Go to the following link to get the web tools project plugins: http://www.eclipse.org/webtools/ 2. Select the 'WTP 2.0.1' link to download this version of the plugin. 3. Select the 'Download' link. 4. Select the 'wtp-all-in-one-sdk-win32' link under the Web Tools Platform All-In-One Packages, for the Windows platform. 5. Download this and place this folder in the plugins folder for Eclipse Europa 3.3.0 Web Services Demonstration -------------------------- 1. Use the book, "Developing Web Services with Apache Axis", to create the SimpleService project. Deployment instructions using Eclipse ------------------------------------- WORD TO THE WISE: Make sure Tomcat is running!!! 1. After creating the entire example, select the option 'Launch the Web Services Explorer' from the toolbar. 2. Select the 'WSDL page' option, which is in the upper right hand corner of the toolbar. 3. In the Navigator portal, the link 'WSDL Main' should appear. In the 'Open WSDL' portal, select the 'Browse...' link. 4. Verify that the information from the drop down menus are referring to the SimpleService project. Once you have verified this information, select 'Go'. 5. Then select 'Go' again, in the 'Open WSDL' portal. 6. A new portal entitled 'WSDL Binding Details' should replace the 'Open WSDL' portal. Within this portal you should find information referring to the Operations that exists and the Endpoints of the WSDL file. Please make sure this information is correct. ie. Under Name, the link 'concat' should appear. 7. Select the 'concat' link in the 'WSDL Binding Details' portal. A new portal should replace this entitled 'Invoke a WSDL Operation'. 8. In the textboxes, s1 and s2, enter a string in each textbox. Then select the 'Go' button. 9. After selecting 'Go', in the 'Status' portal, the text you entered should appear. ------------------------------------------------ (We are still working on this!!) ************************************************ Deployment instructions using the Command Prompt ------------------------------------------------ 1. Go to Start->command Prompt 2. Enter the following command: cd C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\classes 3. Open 'Notepad', copy the following code into a notepad file. //TEST log4j Configuration File /* #set the level of the root logger to DEBUG and set its appender as an appender named SimpleService log4j.rootLogger = DEBUG, SimpleService #set the appender named SimpleService to be a console appender log4j.appender.SimpleService=org.apache.log4j.ConsoleAppender #set the layout for the appender SimpleService log4j.appender.SimpleService.layout=org.apache.log4j.PatternLayout log4j.appender.SimpleService.layout.conversionPattern=%m%n */ 4. Save this file as 'log4j.properties', in the following location: C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\classes 5. In the command prompt change to the following directories: com\ttdev\ss 6. In this directory type the following command: java org.apache.axis.client.AdminClient deploy.wsdd The response text should be something like Done processing. 7. Go back to this directory C:\Program Files\apache-tomcat-6.0.14\apache-tomcat-6.0.14\webapps\axis\WEB-INF\classes 8. Type the following command: java com.ttdev.ss.client.StubClient -lhttp://localhost:8080/axis/services/MyService The response text should be something like "abc 123". 9. And thats that!!! (We are still working on this!!) Downloading the WSIG Add-on plugin ---------------------------------- 1. Go to the http://jade.tilab.com/ . 2. Select the add-on link. 3. Login to the protected area, using your Email and Password. 4. Scroll down to the WSIG link. 5. Save the .zip file to the C:\Program Files directory. 6. Extract the .zip file to the location: C:\Program Files\Jade 7. Two folders, add-ons and doc folders, will be extracted. 8. Go to the location: C:\Program Files\Jade\add-ons\wsig. 9. Right click on the build file, select the 'Edit' option. 10. The build file will open in Notepad. 11. Scroll down to the classpath section of the document, find this code Change it to the following code: 12. Find this segment of code: !------------- -------------! // Change this line of code Change this line of code to the following: 13. Save this file. 14. Open a command prompt and go to the following location: C:\Program Files\Jade\add-ons\wsig 15. Execute the following command: ant build 16. A 'BUILD SUCCESSFUL' message should appear. From the Book pg. 186 "10.5.2 RUNNING THE WSIG" ----------------------------------------------- 1. Please following the instructions below: 1. Go to the following location: C:\Program Files\Jade\add-ons\wsig\bin 2. Right click on the runJade.bat file, select the 'Edit' option. 3. Select the 'Run' option. The runJade file should appear in Notepad. 4. Change the code to the following: #call setClasspath SET PORT=1099 java jade.Boot -name "WSIGTestPlatform" -port %PORT% -gui pause 5. Save the file. 6. Go to the command prompt and execute the following command: runJade 7. The Jade GUI should open with the 'WSIGTestPlatform'. 2. Disregard step 2 from the book.