Java Reference
In-Depth Information
Then, we need to select the RESTful web service that our client will consume. In
our case, we need to select the From Project radio button under Select the REST
resource and click on the button labeled Browse .
Then, we simply need to select the RESTful web service we developed earlier.
At this point, NetBeans generates the following code:
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ensode.netbeansbook.jaxrsclient;
import javax.ws.rs.ClientErrorException;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.WebTarget;
 
Search WWH ::




Custom Search