First of all lets create the new NetBeans project. Select “java” from the project categories and “java Application” from the projects list. Click Next, name your project as “zend_rest_client” and finally click Finish button.

Snap-1

Snap-2

Right click on the Library and Select the Property. Add downloaded Library files using “Add Jar/Folder”.

Snap-3

Click “OK” and then replace the content of Main.Java file with the following code.

Step-4: Create Weather REST API using Zend Framework Library.
Here we are all set to begin the coding.
Lets create the weather_rest.php file under the document root (/var/apache2/2.2/htdocs) with following code.