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

This example is composed of 4 sub examples :
 - a Standalone Web Application exposing a JaxRpc Endpoint as WebService and a simple client (wswarsample.war)
 - a Standalone WebApplication which is client of a WebServices (Google) (wsaccess.war)
 - an Application with 1 EJB : a Stateless Session bean exposed as web service (ws.ear). This example also shows 
   how to add security to a Stateless Session bean using WsGen. The security parameters are specified in jonas-webservices.xml
   and the username and password required is jonas:jonas
 - an Application composed by a Session Bean acting as web service client accessed through a JSP (wsclient.ear)

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 MAY be used jointly with jonas-service-ref tag in JOnAS specific Deployment Descriptor (jonas-web.xml and jonas-ejb-jar.xml) : It's optionnal.

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 :
---------

1. Install the example
	ant install

2. start JOnAS
	jonas start

3. install the archives in JOnAS
	jonas admin -a wsaccess.war
	jonas admin -a wswarsample.war
	jonas admin -a ws.ear
	jonas admin -a wsclient.ear

4. View the results in your browser
	http://<hostname>:<port>/wsaccess/
	http://<hostname>:<port>/wswarsample/
	http://<hostname>:<port>/axis-ws/ssbEndpoint/WSBeanEndpointLocal?JWSDL (username:jonas password: jonas)
	http://<hostname>:<port>/wsclient/


Notes :
--------
If you have a proxy to access the internet, you have to add some properties in your JAVA_OPTS environment variable before you launch JOnAS.
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"

You should see some Exceptions when using WsGen (Class not found with digester), don't be afraid, this is normal.