Error in web service before operation rule

Hi, I am having errors in a ws before rule. For debugging purposes, I left it at its minimal expression, but it throws the same exception.

actual rule is:

<?xml version='1.0' encoding='UTF-8'?> Modify body <![CDATA[ import sailpoint.object.*; import sailpoint.connector.*;

return requestEndPoint;
]]>

When I attach it to source, all operations fail (included test operation). If I detach, connector works fine, so I realized that perhaps I am missing something in rule creation.

I created rule following documentation. This is the actual json payload of rule creation:
{
“description”: “This rule is used by Senior Aggregation”,
“type”: “WebServiceBeforeOperationRule”,
“signature”: {
“input”: [
{
“name”: “application”,
“description”: “The application whose data file is being processed.”,
“type”: null
},
{
“name”: “requestEndPoint”,
“description”: “The current request information contain header, body ,response object”,
“type”: null
},
{
“name”: “processedResponseObject”,
“description”: “Response Object processed by the Web services connector”,
“type”: null
},
{
“name”: “rawResponseObject”,
“description”: “Response Object returned from the end system”,
“type”: null
},
{
“name”: “restClient”,
“description”: “REST Client Object”,
“type”: null
}
],
“output”: {
“name”: “Update Account/Group List”,
“description”: “Update information Map contains parsed list of accounts”,
“type”: null
}
},
“sourceCode”: {
“version”: “1.0”,
“script”: “<?xml version='1.0' encoding='UTF-8'?>\r\n\r\n<Rule name="SeniorBodyMod" type="WebServiceBeforeOperationRule">\r\n Modify body</Description>\r\n </Source>\r\n</Rule>”
},
“attributes”: {
“sourceVersion”: “1.0”
},
“id”: “dd0a4ab6d3ca4deda6b554a5ea63be08”,
“name”: “BodyMod”,
“created”: “2023-08-09T19:16:02.580Z”,
“modified”: null
}


Exception shown in log is:

{“exception”:{“stacktrace”:“sailpoint.connector.ConnectorException: Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo\n\tat com.sailpoint.ccg.cloud.container.Container.testConnection(Container.java:337)\n\tat com.sailpoint.ccg.cloud.container.ContainerIntegration.ping(ContainerIntegration.java:73)\n\tat com.sailpoint.ccg.handler.TestConnectionHandler.invoke(TestConnectionHandler.java:29)\n\tat sailpoint.gateway.accessiq.CcgPipelineMessageHandler.handleMessage(CcgPipelineMessageHandler.java:42)\n\tat com.sailpoint.pipeline.server.PipelineServer$InboundQueueListener$MessageHandler.run(PipelineServer.java:369)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: sailpoint.connector.ConnectorException: Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo\n\tat sailpoint.connector.webservices.v2.WebServiceFacadeV2.testConnection(WebServiceFacadeV2.java:504)\n\tat sailpoint.connector.webservices.WebServicesConnector.testConfiguration(WebServicesConnector.java:112)\n\tat sailpoint.connector.ConnectorProxy.testConfiguration(ConnectorProxy.java:411)\n\tat com.sailpoint.ccg.cloud.container.Container.testConnection(Container.java:330)\n\t… 9 more\n”,“exception_class”:“sailpoint.connector.ConnectorException”,“exception_message”:“Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo”},“stack”:“ccg”,“pod”:“cook”,“connector-logging”:“148”,“clusterId”:“2274”,“buildNumber”:“912”,“apiUsername”:“6b439e5d-79eb-4eb1-9064-d9143324fbef”,“orgType”:“”,“file”:“BaseHandler.java”,“encryption”:“1266”,“messageType”:“test-connection”,“connector-bundle-identityiq”:“202”,“line_number”:228,“@version”:1,“CB_version”:“986”,“logger_name”:“com.sailpoint.ccg.handler.BaseHandler”,“mantis-client”:“1266”,“class”:“com.sailpoint.ccg.handler.BaseHandler”,“atlas-api”:“1752”,“va-gateway-client”:“40”,“clientId”:“6640”,“request_milliseconds”:“493”,“source_host”:“d30625237730”,“method”:“handleException”,“org”:“rodobens-sb”,“level”:“ERROR”,“IdentityIQ”:“8.3p4 Build 1527a593753-20230805-223436”,“message”:“Exception “,“pipeline”:“1266”,”@timestamp”:“2023-08-09T21:34:09.890Z”,“thread_name”:“pool-7-thread-147”,“atlas-util”:“1752”,“metrics”:“1266”,“region”:“us-east-1”,“AppType”:“Web Services”,“Application”:“WS - Copy [source]”,“request_id”:“76659c96dcdb48829a4e0f3a8952b710”,“CB_Type”:“connector-bundle-webservices”,“queue”:“cook-rodobens-sb-cluster-2274”,“SCIM Common”:“8.0 Build 00b1f252d1b-20200225-190809”}
{“exception”:{“stacktrace”:“sailpoint.connector.ConnectorException: Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo\n\tat com.sailpoint.ccg.cloud.container.Container.testConnection(Container.java:337)\n\tat com.sailpoint.ccg.cloud.container.ContainerIntegration.ping(ContainerIntegration.java:73)\n\tat com.sailpoint.ccg.handler.TestConnectionHandler.invoke(TestConnectionHandler.java:29)\n\tat sailpoint.gateway.accessiq.CcgPipelineMessageHandler.handleMessage(CcgPipelineMessageHandler.java:42)\n\tat com.sailpoint.pipeline.server.PipelineServer$InboundQueueListener$MessageHandler.run(PipelineServer.java:369)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: sailpoint.connector.ConnectorException: Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo\n\tat sailpoint.connector.webservices.v2.WebServiceFacadeV2.testConnection(WebServiceFacadeV2.java:504)\n\tat sailpoint.connector.webservices.WebServicesConnector.testConfiguration(WebServicesConnector.java:112)\n\tat sailpoint.connector.ConnectorProxy.testConfiguration(ConnectorProxy.java:411)\n\tat com.sailpoint.ccg.cloud.container.Container.testConnection(Container.java:330)\n\t… 9 more\n”,“exception_class”:“sailpoint.connector.ConnectorException”,“exception_message”:“Exception occurred in Test Connection. Error: Error executing before operation rule for endpoint ‘Test - WS’: BeanShell script error: bsh.ParseException: Parse error at line 1, column 1. Encountered: < BSF info: BodyMod at line: 0 column: columnNo”},“stack”:“ccg”,“pod”:“cook”,“connector-logging”:“148”,“clusterId”:“2274”,“buildNumber”:“912”,“apiUsername”:“6b439e5d-79eb-4eb1-9064-d9143324fbef”,“orgType”:“”,“file”:“BaseHandler.java”,“encryption”:“1266”,“messageType”:“test-connection”,“connector-bundle-identityiq”:“202”,“line_number”:228,“@version”:1,“CB_version”:“986”,“logger_name”:“com.sailpoint.ccg.handler.BaseHandler”,“mantis-client”:“1266”,“class”:“com.sailpoint.ccg.handler.BaseHandler”,“atlas-api”:“1752”,“va-gateway-client”:“40”,“clientId”:“6640”,“request_milliseconds”:“493”,“source_host”:“d30625237730”,“method”:“handleException”,“org”:“rodobens-sb”,“level”:“ERROR”,“IdentityIQ”:“8.3p4 Build 1527a593753-20230805-223436”,“message”:“Exception “,“pipeline”:“1266”,”@timestamp”:“2023-08-09T21:34:09.890Z”,“thread_name”:“pool-7-thread-147”,“atlas-util”:“1752”,“metrics”:“1266”,“region”:“us-east-1”,“AppType”:“Web Services”,“Application”:“WS - Copy [source]”,“request_id”:“76659c96dcdb48829a4e0f3a8952b710”,“CB_Type”:“connector-bundle-webservices”,“queue”:“cook-rodobens-sb-cluster-2274”,“SCIM Common”:“8.0 Build 00b1f252d1b-20200225-190809”}
bo

1 Like

In the json payload you should be putting in only the java codes inside the script under sourceCode as shown below:

    "sourceCode": {
        "version": "1.0",
        "script": "import sailpoint.object.*; import sailpoint.connector.*;return requestEndPoint;"
    }
2 Likes

Thank you @iam_nithesh !! Working!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.