Problem access REST web service via Connector rule
Getting the following error when I attempt to access a web service from Pega 8.1 (and previously, 7.3) REST Connector.
When I attempt to Test Connectivity, I'm seeing this error in the Response data ...
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /qcbin/api/authentication/sign-in. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.io.IOException: Redirect failed at org.owasp.esapi.reference.DefaultHTTPUtilities.sendRedirect(DefaultHTTPUtilities.java:814) ... etc.
I've run tests of the service in a browser (absent of any Pega software) as well. I determined that using Basic authentication I can call the service, enter an Id and Pw in the authentication pop-up that appears, and I'll get a similar error after I hit enter. If I then access the service a second time in the same window/session by highlighting the URL and hitting Enter, the service will render data for me onscreen. So, I know it's authenticating.
Is it possible the redirect for authentication is the problem here? Is the handoff from service->authentication->service not flowing properly? And if so, is that a problem better addressed on the service provider's end and not on my (the consumer of the service) end?
I'm really trying to isolate the problem and don't think I'm comfortable with whether the issue is "your web service isn't redirecting me back to itself properly after it sends me for authentication" or "I have to write something more complex than the OOTB Pega REST Connector rule uses to test connectivity and make this thing work". Any guidance?
Yes. I can confirm that if I create a new test in SOAPUI with a process that is only calling the "retrieve data" service (with Authentication parameters specified, but not in a separate call to an authentication method in the web service) the call to the service fails with an HTTP 500 error. So, in both Pega and in SOAPUI I can create a situation where if I call a service while specifying the authentication parameters I will get this "redirect failed" error. I'm going to assume then that this is a probelm on the server the service is hosted. I am no genius at allowing or disallowing redirects on a server ... is there anyone that happens to know if that's a setting somewhere?
I guess this is pointing to a setting/behavior on the destination server side and not in Pega then? Seems to be what all this shows.
As a side note, building an activity in Pega that (1) calls a REST Connect service for authentication, (2) maintains the connection and passes it to (3) another REST Connect service to retrieve data and then (4) calls a third REST Connect service that will release the connection and sign-out ... works fine. That is similar to my service calls in SOAP UI. I suppose it works that way as well.
I believe, though I've been unable to confirm that the destination system wasn't allowing for the redirect for authentication. In the end, I had to build an activity to handle the authenticate-fetch-release cycle. This also means I was unable to utilize the OOTB data model builder when I setup the resource in Pega, so I improvised and just loaded the data results of a SOAP UI function I created in parallel to help in setting up the data mapping. Problem solved.