You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get the response error message while calling a webservice

Received Response
31
Views
1
Comments
in Sales 1 comment

Summary:

I am hitting a third-party webservice from Oracle CX Sales. Whenever the third-party sends us the error message in the response body I have to read the response body and display the error message in CX Sales.

try {

def httpHeaders = ['Content-Type':'application/json','x-functions-key':keyValue];

def wsService = adf.webServices.XXXXX;

 wsService.requestHTTPHeaders = httpHeaders;

 def PUT_param = []

 def wsResponse = wsService.PUT(PUT_param);

}

catch (Exception e)

{

println (e)

}

In the above code, e displays 400 Bad request/ 500 Internal server error. But I need to display the error response body the third party sends.

Please provide any solution for this.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!