Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Scout/Tutorial/3.7/Webservices with JAX-WS

< Scout‎ | Tutorial‎ | 3.7
Revision as of 09:18, 9 November 2011 by Unnamed Poltroon (Talk)

Abstract

This tutorial is a guide to developing JAX-WS webservices in Eclipse Scout. JAX-WS stands for Java API for XML Web Services. The JAX-WS version supported by Eclipse Scout is JAX-WS RI 2.1.6 bundled with Java SE 6. We are not using the lastest version (such as JAX-WS RI 2.2.5 because we encountered a lot of problems in having a newer version aside the Java built-in internal JAX-WS RI 2.1.6 implementation.

The scope of this tutorial is to create a simple Scout application with a webservice consumer and a webservice provider installed. The application will load company data from a Derby database and allow the user to request a company's stock price with a 20 minute delay from the public StockQuoteService. Also, a webservice will be published to access the application's company data from within another application.

Requirement

In order to run this tutorial, you require to have the latest Eclipse Scout Plug-Ins from the nightly updatesite. That is because Scout JAX-WS integration is not part of the Eclipse Indigo release but of the Eclipse Juno release planned for mid of 2012. For more information on the Eclipse release plan, please see Eclipse releases.

Resources

The Eclipse projects for this tutorial can be downloaded from our SVN at scout.example. All projects that belong to this tutorial start with the name org.eclipse.scout.tutorial.jaxws.*

In order to run the tutorial you need to have the Derby database installed on your system. A ready-to-go database can be downloaded from org.eclipse.scout.tutorial.jaxws.database.zip. Alternatively, the database can be created from scratch by using the SQL script create_database.sql located in the Plug-In org.eclipse.scout.tutorial.jaxws.database. The Scout documentation has been moved to https://eclipsescout.github.io/. on how to setup the derby database from scratch.

Preliminary work

First of all, you have to The Scout documentation has been moved to https://eclipsescout.github.io/.. Enter org.eclipse.scout.tutorial.jaxws as project name and choose Outline Tree and Table Form as template. The Scout documentation has been moved to https://eclipsescout.github.io/. to easily start the application. Afterwards, The Scout documentation has been moved to https://eclipsescout.github.io/. to access company data and to persist webservice log entries. In order to display data from database, The Scout documentation has been moved to https://eclipsescout.github.io/. with a The Scout documentation has been moved to https://eclipsescout.github.io/. as its child page. In order to display stock quote information for a company, The Scout documentation has been moved to https://eclipsescout.github.io/..

To track webservice requests, they are logged into the database in the course of this tutorial. This is why a The Scout documentation has been moved to https://eclipsescout.github.io/. and The Scout documentation has been moved to https://eclipsescout.github.io/. are to be created.

Add JAX-WS support to the project

In order to have JAX-WS support available in the project, add the Plug-In org.eclipse.scout.jaxws216 to the server's required Plug-Ins in plugin.xml and to your product-files. The Scout documentation has been moved to https://eclipsescout.github.io/. how to accomplish this.

Create Webservice Consumer

On server node, go to the node 'Webservices (JAX-WS RI 2.1.6)' | 'Consumer' | 'Services'. Right-click on that node to create a new webservice consumer [1]. In the first wizard step, choose the 2nd option 'WSDL from URL'. In the URL field, enter the URL to the WSDL of the stock quote service provider [2]. By pressing TAB or clicking somewhere outside the URL field, the WSDL file is evaluated. If it is about a valid WSDL file, you can click Finish to create the webservice consumer. Learn more on the other options in the wizard.

Create webservice consumer

Back to the top