Import and Use Web Services in Skyway – Part 2: Import Web Service
1. Introduction and Project Creation
2. Importing the Web Service
3. Creating the Web Layer
4. Appendix
Import the Weather Web Service
In the Import WSDL Document dialog, paste in the following CDYNE web service: http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl. The CDYNE Weather Web Service is a free Web Service that provides you with up to date weather information in the United States. (As a note, the data is not always up to date and sometimes missing, but hey- it’s free and easy, and you can always contact CDYNE with issues.)
Click Finish, and let Skyway do its thing.
Once completed, take a moment to familiarize yourself with the generated artifacts. The WeatherSoap service is the only service needed in this project, so delete the WeatherHttpGet and the WeatherHttpPost services.
Take a look at the generated WeatherSoap Operations and Data Types as seen in the Skyway Navigator below.
The ForecastReturn and Forecast Data Types are specifically used in this project in our call to the Web Service. You’ll notice the ForecastReturn Data Type has a One to One mapping to the ArrayOfForecast Data Type, which only contains a One to Many mapping to the Forecast Data Type. The Data Type relationships of this web service can be visually seen through the Eclipse WSDL editor. A merged view of the relationships are shown below.
Understanding the WSDL relationships, or simply taking a look at the WSDL XML, you’ll begin to see the same relationships that were visually created in the Skyway Data Types.
Another item to notice is Skyway generates empty DefaultAction actions for each Operation discovered in the WSDL. This feature is useful in a couple different use cases during development. One such use case is when the developer does not want to call the discovered web service directly during development. The empty DefaultAction can then be used as a stubbed action to test the surrounding logic in the project.
Another key use case is during Contract-First web services development. Skyway’s ability to generate Operation stubs with a WSDL file gives the contract-first developer an MDD framework to build the implementation of a web service faster than other frameworks, which force hand coding and only generate stubs.
Prev | 1: Intro | 2: Web Service | 3: UI | 4: Appendix | Next
Tags: ajax, Contract-First Development, JSP EL, long running request, skyway, User Interface, Weather, Web Services, WSDL










September 29th, 2008 at 10:36 am
[...] blog is broken up into 4 parts. 1. Introduction and Project Creation 2. Importing the Web Service 3. Creating the Web Layer 4. [...]
September 29th, 2008 at 10:37 am
[...] « Import and Use Web Services in Skyway – Part 2: Import Web Service Import and Use Web Services in Skyway – Part 4: Appendix »Sep 29thImport and Use Web Services [...]