SiemensSEN
asked on
Jersey, Jax-rs ssl
Hello,
I need to consume a restAPI via SSL using jersey. The certificate for the application is self sign. I have a class that work via http but not https. How can I re-write it to support https
Thanks
I need to consume a restAPI via SSL using jersey. The certificate for the application is self sign. I have a class that work via http but not https. How can I re-write it to support https
public String getIssue(String issueID)
{
WebResource webResource;
ClientResponse response;
auth = new String(Base64.encode(JConstant.ID_PASS));
Client client = Client.create();
//ROOTURL=https://server.net:8443
webResource = client.resource(JiraConstant.ROOTURL+"/issue/"+issueID);
response = webResource.header("Authorization", "Basic " + auth).type("application/json").accept("application/json").get(ClientResponse.class);
return(response.getEntity(String.class));
}
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.