private Policy loadPolicy(String location) { InputStream is = null; try { is = new FileInputStream(location); return policyBuilder.getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } }
if (null != policyElements) { for (Element e : policyElements) { loadedPolicies.add(builder.getPolicy(e)); PolicyReference pr = builder.getPolicyReference(e); Policy resolved = resolveReference(pr, builder, bus, i); if (null != resolved) {
if (null != policyElements) { for (Element e : policyElements) { loadedPolicies.add(builder.getPolicy(e)); PolicyReference pr = builder.getPolicyReference(e); Policy resolved = resolveReference(pr, builder, bus, i); if (null != resolved) {
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } }
if (null != policyElements) { for (Element e : policyElements) { loadedPolicies.add(builder.getPolicy(e)); PolicyReference pr = builder.getPolicyReference(e); Policy resolved = resolveReference(pr, builder, bus, null); if (null != resolved) {
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } }
if (null != policyElements) { for (Element e : policyElements) { loadedPolicies.add(builder.getPolicy(e)); PolicyReference pr = builder.getPolicyReference(e); Policy resolved = resolveReference(pr, builder, bus, null); if (null != resolved) {
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } } }
Policy p = builder.getPolicy(nd); if (null != attachment.getPolicy()) { p = p.merge(attachment.getPolicy()); PolicyReference ref = builder.getPolicyReference(nd); if (null != ref) { Policy p = resolveReference(ref, doc);
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } }
Policy p = builder.getPolicy(nd); if (null != attachment.getPolicy()) { p = p.merge(attachment.getPolicy()); PolicyReference ref = builder.getPolicyReference(nd); if (null != ref) { Policy p = resolveReference(ref, doc);
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } }
if (policy == null) { try { policy = builder.getPolicy(e.getElement()); String fragement = "#" + uri; registry.register(fragement, policy); Policy p = null; if (Constants.isPolicyElement(e.getElementType())) { p = builder.getPolicy(e.getElement()); PolicyReference ref = builder.getPolicyReference(e.getElement()); if (null != ref) { p = resolveReference(ref, di);
private Policy loadPolicy(String location, Bus cxf) { InputStream is = null; try { is = new FileInputStream(location); return cxf.getExtension(PolicyBuilder.class).getPolicy(is); } catch (Exception e) { throw new RuntimeException("Cannot load policy", e); } finally { if (null != is) { try { is.close(); } catch (IOException e) { // just ignore } } } } }
if (policy == null) { try { policy = builder.getPolicy(e.getElement()); String fragement = "#" + uri; registry.register(fragement, policy); Policy p = null; if (Constants.isPolicyElement(e.getElementType())) { p = builder.getPolicy(e.getElement()); PolicyReference ref = builder.getPolicyReference(e.getElement()); if (null != ref) { p = resolveReference(ref, di);
protected void setPolicyInternal(Element newPolicy) { this.setPolicyInternal(bus.getExtension(PolicyBuilder.class).getPolicy(newPolicy)); }
protected void setPolicyInternal(Element newPolicy) { this.setPolicyInternal(bus.getExtension(PolicyBuilder.class).getPolicy(newPolicy)); }
public Policy resolveReference(String uri, Element el) { if (el == null) { return null; } if (uri.equals(el.getAttributeNS(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_ID_ATTR_NAME))) { return builder.getPolicy(el); } Element el2 = DOMUtils.getFirstElement(el); while (el2 != null) { Policy p = resolveReference(uri, el2); if (p != null) { return p; } el2 = DOMUtils.getNextElement(el2); } return null; }
public Policy resolveReference(String uri, Element el) { if (el == null) { return null; } if (uri.equals(el.getAttributeNS(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_ID_ATTR_NAME))) { return builder.getPolicy(el); } Element el2 = DOMUtils.getFirstElement(el); while (el2 != null) { Policy p = resolveReference(uri, el2); if (p != null) { return p; } el2 = DOMUtils.getNextElement(el2); } return null; }