public static SynapseXPath getSynapseXPath(OMElement elem, String expression) throws JaxenException { if (expression == null) { handleException("XPath expression cannot be null"); } SynapseXPath xpath = new SynapseXPath(expression); OMElementUtils.addNameSpaces(xpath, elem, log); return xpath; }
String namespaceURI = OMElementUtils.getNameSpaceWithPrefix(prefix, elem); if (namespaceURI == null) { handleException("Invalid namespace prefix '" + prefix + "' in name attribute");
handleException("A QName is expected for fault code as prefix:name"); String namespaceURI = OMElementUtils.getNameSpaceWithPrefix(prefix, code); if (namespaceURI == null) { handleException("Invalid namespace prefix '" + prefix + "' in code attribute");
public static SynapsePath getSynapsePath(OMElement elem, String expression) throws JaxenException { if (expression == null) { handleException("XPath expression cannot be null"); } SynapseXPath xpath = new SynapseXPath(expression); OMElementUtils.addNameSpaces(xpath, elem, log); return xpath; }
public static SynapseXPath getSynapseXPath(OMElement elem, String expression) throws JaxenException { if (expression == null) { handleException("XPath expression cannot be null"); } SynapseXPath xpath = new SynapseXPath(expression); OMElementUtils.addNameSpaces(xpath, elem, log); return xpath; }
OMElementUtils.addNameSpaces(this, elem, log); this.addNamespacesForFallbackProcessing(elem); domXpath.setNamespaceContext(domNamespaceMap);
public static SynapseXPath getSynapseXPath(OMElement elem, QName attribName) throws JaxenException { SynapseXPath xpath = null; OMAttribute xpathAttrib = elem.getAttribute(attribName); if (xpathAttrib != null && xpathAttrib.getAttributeValue() != null) { xpath = new SynapseXPath(xpathAttrib.getAttributeValue()); OMElementUtils.addNameSpaces(xpath, elem, log); } else { handleException("Couldn't find the XPath attribute with the QName : " + attribName.toString() + " in the element : " + elem.toString()); } return xpath; }
public static SynapseXPath getSynapseXPath(OMElement elem, QName attribName) throws JaxenException { SynapseXPath xpath = null; OMAttribute xpathAttrib = elem.getAttribute(attribName); if (xpathAttrib != null && xpathAttrib.getAttributeValue() != null) { try { xpath = new SynapseXPath(xpathAttrib.getAttributeValue()); } catch (org.jaxen.XPathSyntaxException ex) { /* Try and see whether the expression can be compiled with XPath 2.0 * This will only be done if the failover DOM XPath 2.0 is enabled */ if (Boolean.parseBoolean(SynapsePropertiesLoader.loadSynapseProperties(). getProperty(SynapseConstants.FAIL_OVER_DOM_XPATH_PROCESSING))) { if (log.isDebugEnabled()) { log.debug("Trying to compile the expression in XPath 2.0:" + xpathAttrib.getAttributeValue()); } xpath = new SynapseXPath(xpathAttrib.getAttributeValue(), elem); } else { throw ex; } } OMElementUtils.addNameSpaces(xpath, elem, log); xpath.addNamespacesForFallbackProcessing(elem); } else { handleException("Couldn't find the XPath attribute with the QName : " + attribName.toString() + " in the element : " + elem.toString()); } return xpath; }
OMElementUtils.addNameSpaces(path, elem, log); path.addNamespacesForFallbackProcessing(elem);
try { SynapseXPath xpath = new SynapseXPath(expr); OMElementUtils.addNameSpaces(xpath, variableOM, log); ((MediatorCustomVariable) variable).setExpression(xpath);
try { SynapseXPath xpath = new SynapseXPath(expr); OMElementUtils.addNameSpaces(xpath, variableOM, log); ((MediatorCustomVariable) variable).setExpression(xpath);
OMElementUtils.addNameSpaces(xp, elem, log); mediator.setAttachPath(xp); } catch (JaxenException e) {
OMElementUtils.addNameSpaces(xp, elem, log); mediator.setAttachPath(xp); } catch (JaxenException e) {