
tutorial.jaxws-sample.README Maven / Gradle / Ivy
The newest version!
JAX-WS sample
-------------
This example shows how to access to a webservice deployed via a Web application (quote.war).
The web service is implemented by an annotated POJO (QuoteReporterPoOJO)
A stateless session bean EJB3 (QuoteClientBean) packaged in an ejbjar accesses to the getQuote method
provided by the webservice.
A java client launched by the client container call the doTenQuotes method of the stateless session bean
- the service directory contains :
the POJO QuoteReporterPoOJO that implements QuoteReporter interface that needs the quote class
an empty web.xml descriptor in order to pacakage a web application quote.war
- the clients direcory contains:
* the QuoteClientBean stateless session bean EJB3 client of the web service.
(it implements the QuoteClient interface)
* the main java class QuoteMain that access to the QuoteClientBean.
In order to run this example JOnAS must be launched with ejb3, web, jaxws services
to build and deploy the web application quote.war do :
ant clean build-deploy
the target build-deploy :
1) compile the services classes, build the quote.war and put it under $JONAS_BASE/deploy.
when quote.war is deployed by JOnAS a WSDL is created and published at the following URL:
http://localhost:9000/quote/QuoteReporterService?WSDL
2) creates the artifacts needs by the clients from the published WSD, compiles the corresponding classes
and package the whole in a ejbjar file quoteEJB.jar and put it under $JONAS_BASE/deploy
3) creates an application client quote-client.jar that can be launch via the container client
then do:
ant run-client
that run the main QuoteMain.
the result is 10 lines written on system.out by the JOnAS server.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy