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

Difference between revisions of "Scout/Tutorial/3.7/Webservices with JAX-WS"

< Scout‎ | Tutorial‎ | 3.7
(Add JAX-WS support to the project)
(Removing all content from page)
 
(143 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Abstract ==
 
This tutorial is a guide to developing [http://jax-ws.java.net/ JAX-WS] webservices in [http://www.eclipse.org/scout/ Eclipse Scout]. JAX-WS stands for '''J'''ava '''A'''PI for '''X'''ML '''W'''eb '''S'''ervices. 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 [http://jax-ws.java.net/2.2.5/ 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 [http://db.apache.org/derby/ Derby] database and allow the user to request a company's stock price with a 20 minute delay from the public [http://services.nexus6studio.com/StockQuoteService.asmx 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 [http://download.eclipse.org/scout/nightly/update/ nightly updatesite]. That is because Scout JAX-WS integration is not part of the [http://www.eclipse.org/indigo/ Eclipse Indigo] release but of the [http://www.eclipse.org/downloads/index-developer.php Eclipse Juno] release planned for mid of 2012. For more information on the Eclipse release plan, please see [http://wiki.eclipse.org/Simultaneous_Release Eclipse releases].
 
 
== Resources ==
 
The Eclipse projects for this tutorial can be downloaded from our SVN at [https://dev.eclipse.org/svnroot/technology/org.eclipse.scout/scout.example/trunk/ 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 [https://dev.eclipse.org/svnroot/technology/org.eclipse.scout/scout.example/trunk/org.eclipse.scout.tutorial.jaxws.database/database/org.eclipse.scout.tutorial.jaxws.database.zip org.eclipse.scout.tutorial.jaxws.database.zip]. Alternatively, the database can be created from scratch by using the SQL script [https://dev.eclipse.org/svnroot/technology/org.eclipse.scout/scout.example/trunk/org.eclipse.scout.tutorial.jaxws.database/script/create_database.sql create_database.sql] located in the Plug-In [https://dev.eclipse.org/svnroot/technology/org.eclipse.scout/scout.example/trunk/org.eclipse.scout.tutorial.jaxws.database org.eclipse.scout.tutorial.jaxws.database]. {{ScoutLink|Tutorials|Webservices with JAX-WS/Setup Derby database|Learn more}} on how to setup the derby database from scratch.
 
 
== Preliminary work  ==
 
First of all, you have to {{ScoutLink|Tutorials/Webservices with JAX-WS|Create Scout Project|create a new Scout project}}. Enter <code>org.eclipse.scout.tutorial.jaxws</code> as project name and choose <code>Outline Tree and Table Form</code> as template. {{ScoutLink|Tutorials/Webservices with JAX-WS|Configure Product Launch Configuration|Configure the product launch configuration}} to easily start the application.
 
Afterwards, {{ScoutLink|Tutorials|Webservices with JAX-WS/Create Derby SQL Service|create a Derby SQL Service}} to access company data and to persist webservice log entries. In order to display data from database, {{ScoutLink|Tutorials|Webservices with JAX-WS/Create Main Outline|create the Main Outline}} with a {{ScoutLink|Tutorials|Webservices with JAX-WS/Create Company Table Page|Company Table Page}} as its child page. In order to display stock quote information for a company, {{ScoutLink|Tutorials|Webservices with JAX-WS/Create Company Form|create a Company Form}}.
 
 
To track webservice requests, they are logged into the database in the course of this tutorial. This is why a {{ScoutLink|Tutorials|Webservices with JAX-WS/Create WsLogTablePage|WS Log Table Page}} and {{ScoutLink|Tutorials|Webservices with JAX-WS/Create WsLogForm|WS Log Form}} 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 <code>org.eclipse.scout.jaxws216</code> to the server's required Plug-Ins in plugin.xml and to your product-files. {{ScoutLink|Tutorials|Webservices with JAX-WS/Add JAX-WS support to project|Learn more}} how to accomplish this. In turn, in Scout Explorer you should see the node <code>Webservices (JAX-WS RI 2.1.6)</code>[http://wiki.eclipse.org/Image:Org.eclipse.scout.tutorial.jaxws.JaxWsDependency_3.png] on server node. If not, refresh the server node with {{keypress|[[Shift key|Shift]]}} + {{keypress|[[F5 key|F5]]}} or if it does not help, restart Eclipse IDE.
 
 
[[Image:org.eclipse.scout.tutorial.jaxws.JaxWsDependency_3.png|thumb|JAX-WS Webservices node]]
 

Latest revision as of 09:09, 24 April 2012

Back to the top