getBaseUrl() in WebServiceBeforeOperation rule is not working

Hi IdentityNow Experts,

I am using a WebService Connector and writing a WebServieBeforeOperation rule for an HTTP Operation. Looking at the documentation there is a method getBaseUrl() from requestEndPoint object that should return the base URL from the connector configuration. I remember it was working in June but somehow it does not work anymore (just returning null) from July 2024. Has anyone faced the same issue?
I could do some parsing from requestEndPoint.getFullUrl() but it’s not the best way. Any suggestions are welcome, thanks.

References:
Web Services Before/After Operation Rule (sailpoint.com)

Endpoint (sailpoint.com)

Ronald

hi @ronaldchui - to get base URL from source you can use the below snippet

String baseUrl = (String) application.getAttributeValue(“genericWebServiceBaseUrl”);

getBaseUrl() may not work. I have not tried this.

Thanks,
Uday

6 Likes

Hey @ronaldchuiASB,

I have also noticed issues with that. I’ve always resorted to pulling from the application variable or parsing.

1 Like

Hi @ronaldchuiASB

Yes, i would agree here with @bcariaga. You can use the application object and then get the base url from there.

String genericWebServiceBaseUrl = application.getStringAttributeValue(\"genericWebServiceBaseUrl\")

This is what i am also using and should work.
I hope this helps.

Regards
Vikas.

2 Likes

Thank you, it works the same way as it used to be when I was using getBaseUrl() some time back. I hope SailPoint can update the documentation to avoid any confusion.

1 Like

Thank you Vikas, tested and it works!

1 Like

Hi @ronaldchuiASB

Glad to hear that it works. I agree with you that documentation could be improved here a bit.

In general i find application object very powerful as it allows us to have dynamic configurations also on the source level. Just create your own key and store the value in connector attributes and then you can include these configurations in the rule to achieve your use-case. With this approach then if in future some new things comes, then we do not need to update the rule but instead we just change the configuration which is relatively easy to maintain.

Thank You.
Regards
Vikas.

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