Thứ Ba, 26 tháng 8, 2014

Install glassfish 4 as a windows service

Install glassfish 4 as a windows service


1-Download this one

2- Extract the rar file then you have this one



 3-Go into the folder and then copy the path that leads to bin folder

4 - Open cmd program as admin role and type as follow



5 - Type "asadmin create-service" to create service



6 - go to url: http://localhost:4848



What is a web service ?
-Web services là các  thành phần ứng dụng;
-Việc giao tiếp của các web service dựa trên giao thức protocal
-Các web service có thể được search thông qua UDDI
-Web services có thể được sử dụng bởi ứng dụng khác.
-HTTP và XML là nền tảng cho web service




Thứ Ba, 19 tháng 8, 2014

Build restful web service

Build restful web service

Exercise : Create an restful web services to bring weather information to your customer

I - Create a java libary to use in both serverr and client side

  
Create two java classes named Weather and WeatherList to present two entities item and item list
Weather class content
WeatherList class cotent
 

-Create a web app to implement rest service

  
-Import library made above for this app
  

new a restful web java from pattern 
  \
Write content for ItemsResource
Deploy the web app and test resousrce uri


 

New another web app as client side based jsf, aslo import the lib above for it . 
create a web service client 
 

Create a managed bean 

In xhtml page

Deploy and The result displayed as follow: