Package org.helm.notation2.wsadapter
Class WSAdapterUtils
java.lang.Object
org.helm.notation2.wsadapter.WSAdapterUtils
public class WSAdapterUtils extends Object
WSAdapterUtils is used to generalize webservice calls.- Version:
- $Id$
- Author:
- Marco Lanig
-
Method Summary
Modifier and Type Method Description protected static org.apache.http.client.methods.CloseableHttpResponsegetResource(String fullURL)Call a GET routine on given resource URL.protected static org.apache.http.client.methods.CloseableHttpResponseputResource(String json, String fullURL)Calls a PUT routine with given JSON on given resource URL.
-
Method Details
-
putResource
protected static org.apache.http.client.methods.CloseableHttpResponse putResource(String json, String fullURL) throws org.apache.http.client.ClientProtocolException, IOException, URISyntaxExceptionCalls a PUT routine with given JSON on given resource URL.- Parameters:
json- the input JSONfullURL- the resource URL- Returns:
- Response
- Throws:
org.apache.http.client.ClientProtocolException- if an error exists in the HTTP protocolIOException- IO ErrorURISyntaxException- url is not valid
-
getResource
protected static org.apache.http.client.methods.CloseableHttpResponse getResource(String fullURL) throws IOException, URISyntaxExceptionCall a GET routine on given resource URL.- Parameters:
fullURL- the resource URL- Returns:
- Response
- Throws:
IOException- IO errorURISyntaxException- if url is not valid
-