Search in sources :

Example 1 with LocalServiceModelReferenceResolver

use of org.apache.cxf.ws.policy.attachment.reference.LocalServiceModelReferenceResolver 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;
}
Also used : Policy(org.apache.neethi.Policy) LocalServiceModelReferenceResolver(org.apache.cxf.ws.policy.attachment.reference.LocalServiceModelReferenceResolver) ReferenceResolver(org.apache.cxf.ws.policy.attachment.reference.ReferenceResolver) LocalServiceModelReferenceResolver(org.apache.cxf.ws.policy.attachment.reference.LocalServiceModelReferenceResolver)

Aggregations

LocalServiceModelReferenceResolver (org.apache.cxf.ws.policy.attachment.reference.LocalServiceModelReferenceResolver)1 ReferenceResolver (org.apache.cxf.ws.policy.attachment.reference.ReferenceResolver)1 Policy (org.apache.neethi.Policy)1