String key = ((PolicyReference) policyElement).getURI();
if (key.startsWith("#")) {
key = key.substring(key.indexOf("#") + 1);
}
PolicyLocator locator = new PolicyLocator(axisService);
Policy p = locator.lookup(key);
if (p == null) {
throw new Exception("Policy not found for uri : " + key);
}
addPolicyToDefinitionElement(key, p);