Unable to retrieve package information
Tuesday, April 2, 2019 at 08:13pmHi ,
I am trying to call the RETRIEVE INFORMATION ABOUT A PACKAGE api and getting the below error. Can you please let me know why i am seeing this error. I have pasted my code below.
GET request for "https://sandbox.e-signlive.com/api/packages/hT6KgjULdVx6sJsGN20GVqrWCFw=" resulted in 404 (Not Found); invoking error handler
Exception in thread "main" org.springframework.web.client.HttpClientErrorException: 404 Not Found
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91)
at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:588)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:546)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:510)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:453)
at com.unionbank.soa.api.esign.service.OneSpanServices.main(OneSpanServices.java:35)
Code:
public static void main(String args[]){
String url = "https://sandbox.e-signlive.com/api/packages/{packageId}";
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
String encodedAuth = "*****"; // i am passing the api key here
String authHeader = IWebserviceConstants.BASIC + encodedAuth;
headers.set(IWebserviceConstants.AUTHORIZATION , authHeader);
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
HttpEntity entity = new HttpEntity("parameters", headers);
Map params = new HashMap();
params.put("packageId", "hT6KgjULdVx6sJsGN20GVqrWCFw=");
ResponseEntity result = restTemplate.exchange(url, HttpMethod.GET, entity, Package.class,params);
System.out.println(result);
}
Reply to: Unable to retrieve package information
Wednesday, April 3, 2019 at 01:39amReply to: Unable to retrieve package information
Wednesday, April 3, 2019 at 02:33amReply to: Unable to retrieve package information
Wednesday, April 3, 2019 at 03:32amReply to: Unable to retrieve package information
Wednesday, April 3, 2019 at 04:13amReply to: Unable to retrieve package information
Wednesday, April 3, 2019 at 05:35am