Generic REST Service Call - Using Java and Wink API
Below is a Java REST service example for Generic Service call using Wink API. Override methods according to the requirement. /************************************************************************* * REST Service Example * *************************************************************************/ import javax.ws.rs.core.MediaType; import org.apache.wink.client.ClientConfig; import org.apache.wink.client.ClientResponse; import org.apache.wink.client.Resource; import org.apache.wink.client.RestClient; import org.apache.wink.client.handlers.BasicAuthSecurityHandler; public class Test { public static void main(String[] args) { try { //1. Execute Get Service. Resource restClientResource = getRestClientResource("username", "password", "serviceUrl"); ...