Web service failing connection

Hi all,

I am trying to connect to a Web service Application but getting an error saying that the client id is invalid.

I have tried the same on postman but it works.

I am using a before rule to get the access token. (Rule attached)

My understanding is that when I click on the Test connection button, it should call the operation and the before rule. But there is no logs in the files.

Am I missing something.

Thanks in advance

Hi Rishav

Can you add logs in Test connection Before operation rule and check if you are able to print some statements?

Also what is Grant type selected in General settings of application

@rishavghoshacc Could you please enable logs and see if logs are getting printed or not. Additionally please share your app xml for review.

@tharshith I tried putting logs in the before rule. No logs getting printed. I also tried sending an email on the first line. That also does not work

can you please share your app xml here

@neel193 I tried putting logs in the before rule. No logs getting printed. I also tried sending an email on the first line. That also does not work. Attached the xmls

HR App.xml (25.9 KB)

Before Rule.xml (7.8 KB)

Can you also attach the error you’re getting

@tharshith

image

are you able to connect it via postman?? with the same credentials shared??

@naveenkumar3 Yes I am able to connect with same creds on Postman

Could you please remove everything from before rule and just add loggers to see if your rule getting triggered or not?

@neel193 What I tried as sending an email from the rule on the first line. It does not work

@rishavghoshacc Reason i said logs because for email there are another set of factors come into play if it is not coming. SMTP server config coule be incorrect, or server is down or something else. That’s why for testing just remove everything and have couple of log messages.

@neel193 The email should work as I have tested email in a separate rule, and it works.
So as per my understanding it should also be sending an email as soon as I click on test connection

@rishavghoshacc As part of troubleshooting, you should remove all the additional factors. If your issue is before rule is not being triggered, easiest way is to add log.error and see if that is getting printed or not.

Whether email is being sent or not, comes at the later stage when your flow enters the before operation rule. As of now your rule itself not being triggered.

@neel193 I tried with putting a brand new rule with just a logging statement. It does not appear on the logs. Is it not correct that the rule should be called when I click on the test connection button?

In you test connection operation, did you put log.error(“Inside the rule”); just put these lines and see what it prints in the loggers.

Also, when you do test connection, can you check the server log or catalina.out logs for the exact error, when you hit test connection.

Hi Rishav, how are you adding logs? Please add them the way Naveen suggested and see if they print.

@naveenkumar3 It is a log.error(“Testing 05062026”) line that I have added to the before rule. NO other lines in the rule

This shows up when the rule is ran from DEBUG but not when I click on the Test connection button

This is the error in the logs

@santhirajumunganda Done