This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Checking for the Existence of a Resource

We can use the following code to confirm whether the resource exists:

boolean value = registry.resourceExists("/c1/c2/r1");

If the resource does exist, a boolean value of true will be returned. And if it does not exist, the false value is returned.