Hi can someone please help me with the webservice connector to map the response using afterrule. I have manually without the afterrule and its not working I couldn’t see any values in the schema.
@pradeepireddy_123
Please share your sample response from postman and also is this for aggregation or which operation.
@iamksatish Hi this is for account aggregation and do I need to mention the response mapping and in schema if I wrote afterrule
Try :
Root Path: //Lookup
Response Mapping:
Schema Attribute | Attribute Path |
---|---|
ID | ID/text() |
Code | Code/text() |
It’s not working . So basically the response has the carriage returns from the database and I have cleaned the rawresponse using afterrule. Now do I need to assign the cleaned response to Processedobjectresponse and map them using afterrule??? The afterrule I have used is
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
// Initialize the logger for the web service connector AfterRule
Log log = LogFactory.getLog(“sailPoint.connector.webservice.AfterRule”);
if (log.isDebugEnabled()) {
log.debug(“Raw Response Object before cleaning: " + rawResponseObject);
}
// Clean the rawResponseObject by removing the carriage return characters
// Remove carriage return (
) and newline (
) characters
cleanedResponse = rawResponseObject.replaceAll(”
“, “”).replaceAll(”
", “”);
if (log.isDebugEnabled()) {
log.debug("Raw Response Object after cleaning: " + cleanedResponse);*
}
// Proceed to process the cleaned response
processedResponseObject = cleanedResponse;
if (log.isDebugEnabled()) {
log.debug("Processed Response Object: " + processedResponseObject);
}
Please review Web Services Before/After Operation Rule
The provided example afterrule will not function as anticipated.
Example connectorDebug output for the above root path and schema attributes:
> connectorDebug labpradeep iterate account
<ResourceObject displayName="35542" identity="35542" objectType="account">
<Attributes>
<Map>
<entry key="Code" value="9931XTL"/>
<entry key="ID" value="35542"/>
</Map>
</Attributes>
</ResourceObject>
<ResourceObject displayName="35555" identity="35555" objectType="account">
<Attributes>
<Map>
<entry key="Code" value="P35198"/>
<entry key="ID" value="35555"/>
</Map>
</Attributes>
</ResourceObject>
Iterated [2] objects in [238 ms]
>
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.