Web Resource Sample
About the sample
WSO2 Data Services Server supports scraping and extracting Web information and exposing it as dataservices. This sample demonstrates how to extract app information using Google Apps (https://play.google.com/store/apps). The WebResource
sample service contains a single operation named getAppInfo
, which returns a list of books and authors.
Building the sample
Deploy the sample data service named WebResourceSample, using the instructions in Samples Setup.
Running the sample
The sample service can be run using the TryIt tool, which comes with the Data Services Server. You can also run it using a code-generated java client. See Data Services Clients for details.
Follow the steps below to demonstrate this functionality using the TryIt tool:
- Log in to the management console of your server and click List under Services in the navigator. The WebResourceSample will be listed here.
- Click Try this service to open the TryIt tool.
Select the "getAppInfo" operation and click Send to execute the operation. You will get the response as shown below.
<AppInfo xmlns="http://ws.wso2.org/dataservice"> <App> <Title>Photo Editor - FotoRus </Title> <Description>Pic Collage Maker&Makeup&Photo Grid with Layouts&Frames&Filters for Instagram </Description> </App> <App> <Title>Selfie Editor-InstaBeauty </Title> <Description>The best makeup photo editor that you makeup on grid & candy filter selfie </Description> </App> <App> <Title>InstaSize-Photo Editor </Title> <Description>InstaSize- Filter, Collage Edit </Description> </App> <App> <Title>YouCam Perfect - Selfie Pro </Title> <Description>Pro tools for camera & selfie editor used by celebs and millions globally! </Description> </App> <App> <Title>Mirror Image - Photo Editor </Title> <Description>Mirror Image Photo Editor is the best mirror and reflection effect photo editor. </Description> </App> <App> <Title>Candy Camera for Selfie </Title> <Description>Look beautiful with Candy Camera&#39;s filters, optimized for selfies! </Description> </App> <App> <Title>B612 - Selfie from the heart </Title> <Description>B612 has won the Red Dot “Best of the Best” 2015 Award! </Description> </App> <App> <Title>Perfect365: One-Tap Makeover </Title> <Description>Custom makeup designs, tutorials and beauty tips. </Description> </App> <App> <Title>Facetune </Title> <Description>Easily achieve magazine-level portraits. Download now! </Description> </App> <App> <Title>BeautyPlus-Easy Photo Editor </Title> <Description>The BeautyPlus camera transforms everyday images into perfect, sharable photos. </Description> </App> <App> <Title>Clash of Queens:Dragons Rise </Title> <Description>As a Queen or Knight, battle rival empires, raise dragons and fight monsters! </Description> </App> <App> <Title>MORTAL KOMBAT X </Title> <Description>Experience the over-the-top, visceral fighting of MORTAL KOMBAT X! </Description> </App> <App> <Title>Bulb Boy </Title> <Description>Multi-award winning 2D horror puzzle adventure about a boy with a glowing head. </Description> </App> <App> <Title>Splashy Cats: Endless ZigZag! </Title> <Description>Just grab a log and Waterslide over beautiful Kitty Cat worlds! Best Family Fun! </Description> </App> <App> <Title>Rune Rebirth </Title> <Description>Unique QTE combat. Collect runes, explore uncharted, and defeat powerful enemy! </Description> </App> <App> <Title>Earn to Die 2 </Title> <Description>Drive your car through a zombie apocalypse in this epic sequel to Earn to Die! </Description> </App> <App> <Title>CN Superstar Soccer: Goal!!! </Title> <Description>Become a soccer superstar with your favorite Cartoon Network characters! </Description> </App> <App> <Title>Driving Evolution </Title> <Description>The History of Motoring. Drive & Park 15 Most Ground-Breaking Cars Ever Built! </Description> </App> <App> <Title>First Class Flurry HD </Title> <Description>Become a Flight Attendant in this challenging Time Management game! </Description> </App> <App> <Title>Bloons TD Battles </Title> <Description>Go head to head online with other players in a bloon-popping battle for victory. </Description> </App> <App> <Title>Super-Bright LED Torch </Title> <Description>Instantly turn your device into a REAL brightest flashlight! </Description> </App> <App> <Title>Torch - Tiny Flashlight ® </Title> <Description>Free torch app. Uses the camera LED / flash / screen as a flashlight. </Description> </App> <App> <Title>Flashlight </Title> <Description>The brightest, fastest, and the most powerful LED flashlight - torch! </Description> </App> <App> <Title>Color Torch HD LED flash light </Title> <Description>Turn your phone into a versatile torch light with Color Torch HD LED flashlight </Description> </App> <App> <Title>Torch - LED Flashlight </Title> <Description>Bright. Fast. Simple. The most elegant and functional flashlight app, ever! </Description> </App> <App> <Title>Torch: LED Flashlight </Title> <Description>The brightest, fastest, and most handy free LED flashlight torch app! </Description> </App> <App> <Title>Flashlight - Torch LED Light </Title> <Description>Free flashlight with powerful torch LED flash light lamp and magnifying glass! </Description> </App> <App> <Title>Brightest Flashlight Free ® </Title> <Description>Brightest Flashlight Free - Turns on all available lights. </Description> </App> <App> <Title>CM Flashlight (Compass, SOS) </Title> <Description>Safety + Reliability + Variety + Free = CM Flashlight </Description> </App> <App> <Title>LED Flashlight </Title> <Description>The most powerful Flashlight . </Description> </App> <App> <Title>Cymbal | Music Social Network </Title> <Description>Discover songs the world is falling in love with. </Description> </App> <App> <Title>B&H Photo Video Pro Audio </Title> <Description>Shop digital cameras, video equipment, computers & electronics. Est. in 1973. </Description> </App> <App> <Title>ClevCalc - Calculator </Title> <Description>A calculator app that helps all the calculations necessary for everyday life. </Description> </App> <App> <Title>Photo Collage Maker </Title> <Description>Create an awesome collage from your photos. Easy to create and share. </Description> </App> <App> <Title>Clue - Period Tracker </Title> <Description>Predict your next period and get PMS alerts with Clue - Period Tracker. </Description> </App> <App> <Title>aimera </Title> <Description>from selfies to photography, aimera is the camera with all the filters. </Description> </App> <App> <Title>AliExpress Shopping App </Title> <Description>A fascinating shopping experience designed for time and money savvy people. </Description> </App> <App> <Title>Home Improvement </Title> <Description>The best place to save home improvement plans! </Description> </App> <App> <Title>Weather & Radar </Title> <Description>Hourly weather forecasts. Rainfall radar and satellite map every 5 min. </Description> </App> <App> <Title>Minecraft: Pocket Edition </Title> <Description>Minecraft is about placing blocks to build things and going on adventures! </Description> </App> <App> <Title>Wikipedia </Title> <Description>Official Wikipedia app for Android. </Description> </App> <App> <Title>Candy Crush Saga </Title> <Description>The sweetest game around! </Description> </App> <App> <Title>Maps - Navigation & Transport </Title> <Description>Real-time GPS navigation, traffic, public transport and place details </Description> </App> <App> <Title>Subway Surfers </Title> <Description>Help Jake, Tricky & Fresh escape from the grumpy Inspector and his dog! </Description> </App> <App> <Title>Google Translate </Title> <Description>The world is closer than ever with over 100 languages </Description> </App> <App> <Title>Dumb Ways to Die </Title> <Description>You’ve seen the video. Now their lives are in your hands. </Description> </App> <App> <Title>Learn English with Duolingo </Title> <Description>Free Spoken English App. Learn English speaking, reading, writing and listening. </Description> </App> <App> <Title>2048 </Title> <Description>2048 is one of the coolest games of all times! It&#39;s fun and very simple! Try it! </Description> </App> <App> <Title>Temple Run </Title> <Description>Run for your life! </Description> </App> </AppInfo>