Our infrared team set up a ca service center in the car and share the details. I need to make a call to create an incident from a java program. And here I want to use basic authentication by providing an access key. To do this, I tried to make the endpoint URL to get the access key, and then create the incident, as shown below.
http: // Host: port / caisd-rest / rest_access http: // CAdeskHost: port / caisd-rest / in
String endpoint = "http://host:port/caisd-rest/rest_access";
HttpClient client = new HttpClient();
String encodedCredentials = new String(Base64.encodeBase64(("username" + ":" + "password").getBytes()));
PostMethod post = new PostMethod(endpoint);
post.addRequestHeader("Accept", "application/xml");
post.addRequestHeader("Content-Type", "application/xml; charset=UTF-8");
post.addRequestHeader("Authorization", "Basic " + encodedCredentials);
post.setRequestBody("<rest_access/>");
try {
System.out.println("Execute Basic Authentication request on " + endpoint);
int result = client.executeMethod(post);
But when I try to execute the above code, getting 404 error
"The requested resource (/ caisd-rest / rest_access) is unavailable."
- URL- REST , URL- , /caisd-rest, . CA. , - ?