working on an automation assignment and i am trying to test a web service hosted on a webseal server. the issue is i have pretty my tried every method in rest assured to get to the response json but what i am getting is the authentication screen html.
here is some of my non working code. what i was expecting it the json but no matter what authentication method i run i get the webseal's authentication page only.
private String serviceTestGET(WebServiceTest serviceTest) {
System.out.println("Credential : " + userName + " -- " + password);
// RestAssured.
// RestAssured.authentication = basic(userName, password);
// RestAssured.authentication = digest(userId, password);
// RestAssured.authentication = oauth(consumerKey, consumerSecret,
// accessToken, secretToken);//form(userName, password);
// RestAssured.authentication = form(userId, password, config);
RestAssured.useRelaxedHTTPSValidation();
return given().get(serviceTest.getEntryPoint()).asString();
}