use of org.apache.cxf.ws.policy.attachment.reference.ReferenceResolver in project cxf by apache.
the class Wsdl11AttachmentPolicyProvider method resolveLocal.
Policy resolveLocal(PolicyReference ref, DescriptionInfo di) {
String uri = ref.getURI().substring(1);
String absoluteURI = di.getBaseURI();
if (absoluteURI == null) {
absoluteURI = Integer.toString(di.hashCode()) + ref.getURI();
} else {
absoluteURI = absoluteURI + ref.getURI();
}
Policy resolved = registry.lookup(absoluteURI);
if (null != resolved) {
return resolved;
}
ReferenceResolver resolver = new LocalServiceModelReferenceResolver(di, builder);
resolved = resolver.resolveReference(uri);
if (null != resolved) {
ref.setURI(absoluteURI);
registry.register(absoluteURI, resolved);
}
return resolved;
}
Aggregations