Posted: 12 Jul 2016 3:55 EDT Last activity: 27 Jan 2017 1:16 EST
Connect REST and Service REST
Can anyone help on below issue.
We have Service RESt and Connect REST built. when we running Service REST in Service Contact with Request JSOn it is working firn. but when we are trying to hit with connect-rest we are getting error message as
Error mapping incoming response to .Test: org.codehaus.jackson.JsonParseException: Unexpected character ('R' (code 82)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@4678aa54; line: 1, column: 2]
Even we are not able to trace ServiceRest rule when we are triggerring from Connect-REST i.e., nothing is traced. is this some related to Connectivity Issue or any issue is building Connect REST Rule
***Updated by moderator: Lochan. Removed user added #helpme tag. Apologies for confusion, shouldn't have been an end-user option.
There are no special Chars and when we run Service manually in Service Requestor Context it is working Fine. So I have doubt whether there is any Connectivity issue with the EndPoint. Also the version is 7.1.6
Perhaps there is an exception on the service side and your service was returning an error which isn't in JSON format? Hence you see the exception during mapping of incoming response. To identify the root cause, dump the entire response onto a single-value property or a parameter on the parameter page using Map to as Clipboard instead of JSON on your Connect REST rule. Log the response and check if the response is as expected and that it is valid JSON.
here Service rule is not tracing (Trace open Rule) any thing when hit through COnnect-REST it is empty.But its fine when run manually. Also I tried through external REST Clients (Google Plug-In POSTMAN REST Client) then it is giving the below error
Request URI must contain tenant Hash, service package, class, and method keys
The EndPoint used is below it is Pega PDn Cloud where the Service is hosted
Usually the URL format is a good indicator. The tenant hash in the URL is mandatory to log into a tenant. The Pega PDN Cloud instance must be a multi-tenant set up. That's why you ran into this issue. Always try to retrieve your Service REST URL from the service package. I guess the links to the services on the service package rule have the tenant hash included if you are logged into a tenant.