Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by KenTanaka:
http://wiki.apache.org/ws/XmlRpcExampleStringArray

The comment on the change is:
Added notes on compiling and running the servlet

------------------------------------------------------------------------------
  = Example Configuration =
  Two programs are included in this example. The first listed is the server and 
the second part is the client, which will communicate via XML-RPC over HTTP 
with the server. The server code is intended to run as a Tomcat servlet, while 
the client is a command line application. These can both be run on the same 
system.
  
- If you have the Net''''''Beans IDE with web development plugins installed, 
then you can run with the client with the integrated Tomcat server. Otherwise, 
you can start up the tomcat servlet container and then deploy the server 
program (myXmlRpcServer.war) to the `webapps` directory.
+ If you have the Net''''''Beans IDE with web development plugins installed, 
then you can run with the client with the integrated Tomcat server. Otherwise, 
you can manually start up the tomcat servlet container and then deploy the 
server program (myXmlRpcServer.war) to the `webapps` directory.
   
  ----
  = myXmlRpcServer Code =
@@ -244, +244 @@

  
  }
  }}}
+ 
+ == Compiling ==
+ 
+ Compile the source code with
+ {{{
+ mvn clean package
+ }}}
+ This will create a jar file in the standard {{{target}}} directory with a 
name of `myXmlRpcServer.war`. Near the bottom of the output should be a `[INFO] 
BUILD SUCCESSFUL` message, indicated all is well.
+ 
+ If you did include the JUnit test file (XmlRpcServlerTest.java), then the 
output should contain something like this:
+ {{{
+ [INFO] [resources:testResources {execution: default-testResources}]
+ [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
resources, i.e. build is platform dependent!
+ [INFO] skip non existing resourceDirectory 
/extra/data/src/java/NetBeans_projects/myXmlRpcServer/src/test/resources
+ [INFO] [compiler:testCompile {execution: default-testCompile}]
+ [INFO] Compiling 1 source file to 
/extra/data/src/java/NetBeans_projects/myXmlRpcServer/target/test-classes
+ [INFO] [surefire:test {execution: default-test}]
+ [INFO] Surefire report directory: 
/extra/data/src/java/NetBeans_projects/myXmlRpcServer/target/surefire-reports
+ 
+ -------------------------------------------------------
+  T E S T S
+ -------------------------------------------------------
+ Running gov.noaa.eds.myXmlRpc.DirListTest
+ fileCount
+ ls
+   100000 files, average name length=27
+   First 10:
+     sample_wtzgfxlwdukohv
+     sample_vgwsucz
+     sample_xwkt
+     sample_rryyitdcxs
+     sample_sric
+     sample_vfaoionq
+     sample_tqfqcdwrg
+     sample_dmvczjmqrntqlwvthfxqdwcuspvhwnggxmfeze
+     sample_rovqppvnofhrmxooqeoigyadts
+     sample_jogldvknhzotyt
+ Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.333 sec
+ 
+ Results :
+ 
+ Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+ }}}
+ 
+ == Running ==
+ Apache tomcat is fairly easy to install if it's not already on your system, 
you can usually install it in your home directory for personal use if you don't 
have root (administrator) permissions. You can run the server in your IDE, like 
Net''''''Beans with Web Application plugins installed, or in a standalone 
Tomcat. Note that the port number may vary depending on which method you use, 
set the port in the client (App.java) to match. Manually starting the service 
should be on port 8080, inside Net''''''Beans the port chosen tends to be 8084.
+ 
+ Use a command like this to start up tomcat manually if not already running:
+ {{{
+ ~/bin/tomcat/bin/startup.sh 
+ }}}
+ Adjust the path to match your system. On my system I've set up a link called 
`tomcat` in my `bin` directory as an alias for 
`/extra/data/bin2/apache-tomcat-6.0.16/` which is where tomcat is installed.
+ 
+ Put a copy of your application into the webapps directory. The default 
installation of tomcat will notice the new warfile and start running it. If 
tomcat on your system is configured differently then you will need to manually 
request the warfile to start as a new service.
+ {{{
+ cp target/myXmlRpcServer.war ~/bin/tomcat/webapps/
+ }}}
+ 
  ----
  
  = myXmlRpcClient Code =

Reply via email to