Creating REST Webservice With NetBeans

Embed Size (px)

Citation preview

Blue Lines and Gradients

Demo Time !

Consuming WS (Flickr Example)

Creating RESTFul serivice from Patterns

Creating RESTFul service using JPA

Consuming WS using Ajax

Sabyasachi Ghosh ( Tweet @neilghosh) IEEE Hyderabad

Webservices Demo

Requited ToolsNetBeans IDE 6.9.1 with J2EE

Glassfish Server V3

Mysql 5.1

SCHEMA

Log in to MySQLMySQL -u -h -p

MySQL -u root -p demo

Version Check SELECT VERSION();

describe People;

DATA

Select * from People;

New Project

Project Name

Choose Server

Entity Class from Table

Entity Classes

Source Created

New RESTful service

Resource Classes

Test RESTful Webservice

Google Maps Integration

Sign up for a Keyhttp://www.google.com/apis/maps/signup.html

http://localhost:8080 As website URL

@GET
@Produces("text/html") public String getGoogleMap() {// Drag and drop the getGoogleMap operation return "";}

Drag the service Method

Test the Service

Thank you [email protected]