use of org.apache.cxf.ws.policy.attachment.reference.LocalDocumentReferenceResolver in project cxf by apache.
the class ExternalAttachmentProvider method resolveLocal.
Policy resolveLocal(PolicyReference ref, Document doc) {
String relativeURI = ref.getURI().substring(1);
String absoluteURI = doc.getBaseURI() + ref.getURI();
Policy resolved = registry.lookup(absoluteURI);
if (null != resolved) {
return resolved;
}
ReferenceResolver resolver = new LocalDocumentReferenceResolver(doc, builder);
resolved = resolver.resolveReference(relativeURI);
if (null != resolved) {
ref.setURI(absoluteURI);
registry.register(absoluteURI, resolved);
}
return resolved;
}
Aggregations