
JOnAS WebServices Sample
-------------------------

This example is composed of 3 sub examples :
 - a Standalone Web Application exposing a JaxRpc Endpoint as WebService (wsWarSample.war)
 - a Standalone WebApplication which is client of a WebServices (Google) (wsAccessTest.war)
 - an Application with 2 EJBs and a webapp :
   -> 1 SSB exposed as WebService endpoint by Axis
   -> 1 SSB client of the Google WebServices
   -> 1 WebApp used to display SSB WebService call results

What it show ?
---------------

In this sample, we will show the usage of a new tag in Web and Ejb Deployment Desc.
  - service-ref tag is used to declare a dependancy of the component on a WebServices. In other word, the component is client of an external WebService. This tag can be used in the web.xml Deployment desc and in ejb-jar deployment desc.
  -> This tag has to be used jointly with jonas-service-ref tag in JOnAS specific Deployment Descriptor (jonas-web.xml and jonas-ejb-jar.xml).

For declaring a WebService endpoint, a new Deployment Descriptor has been introduced : webservices.xml. It can be used in an ejbjar or webapp file.

Report to the documentation for more information.

How to :
---------

0. Manually change DOCTYPE in some web.xml (see Notes section below).

1. Install the example
	ant install

2. start JOnAS
	jonas start

3. install the archives in JOnAS
	jonas admin -a wsAccessTest.war
	jonas admin -a wsWarSample.war
	jonas admin -a wsEarSample.ear

4. View the results in your browser
	http://<hostname>:<port>/wsAccessTest/
	http://<hostname>:<port>/wsWarSample/
	http://<hostname>:<port>/wsEarSample/


Notes :
--------
If you have a proxy to access the internet, you have to add some properties in your JAVA_OPTS environment variable.
export JAVA_OPTS=$JAVA_OPTS"-Dhttp.proxyHost=<proxy-hostname> \
		    -Dhttp.proxyPort=<proxy-port> \
		    -Dhttp.proxyUser=<username> \
		    -Dhttp.proxyPassword=<password> \
		    -Dhttp.nonProxyHosts=<list-of-hosts without proxy> \
		    -Dhttp.proxySet=true"

IMPORTANT : you have to change by hand the DOCTYPE for the web.xml(s) :
in wsAccesstest (etc/wsaccess/web.xml) and in wsEarSample (etc/earsample/web.xml)
Change the SYSTEM attribute to a filesystem local location where the web-app_2_3_ws.dtd can be found.
