[Download] | [Documentation Home] | [Release Note]

Web Resource Sample

Introduction

WSO2 Data Services Server supports to scrape web information and extract web information as a service. This sample will use Yahoo Weather Forecasts to extract weather information.

Prerequisites

The sample data service "WebResourceSample" should be deployed as per the instructions mentioned in Deploying Samples section.

Running the Sample

The sample service can be run using the "tryit" tool, which is bundled with WSO2 Data Services Server, or a code-generated java client sample using this service.

Web Resource Information

The web resource extracts weather information from Yahoo Weather Forecasts

Service Definition

The WebResource sample service contains a single operation named "getWheatherInfo" which returns Temperature of regions.

Sample Run

A sample run of the service using the "tryit" tool is shown below.


Figure 1: Web Resource data source based service invocation.