Build Restful Webservice
Create an restful webservice to bring weather information to your customers
Create java class library named "Lib", and create a class named Weather in package entities .
Create server app
Create client app
Import the llbrary above for server app and client app
Create and write content for Restfull web service from patterns class name PostResources, the deploy server app.
Create Restful java client class that matchs the service needed on server and then its contain is automatically generated.
Create ManagedBean to obtain the resutl form server
Next ,write code in index.xhtml page
Run client app and the result as follow
Không có nhận xét nào:
Đăng nhận xét