Author: richard.opalka(a)jboss.com
Date: 2010-02-05 07:43:27 -0500 (Fri, 05 Feb 2010)
New Revision: 11541
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
Log:
[JBWS-2919] removing dependency on xalan impl classes - using transform API
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2010-02-05
11:18:52 UTC (rev 11540)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2010-02-05
12:43:27 UTC (rev 11541)
@@ -30,10 +30,11 @@
import javax.xml.bind.JAXBElement;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.TransformerException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
-import org.apache.xpath.XPathAPI;
-import org.apache.xpath.objects.XObject;
import org.jboss.logging.Logger;
import org.jboss.ws.core.soap.SOAPConnectionImpl;
import org.jboss.ws.extensions.eventing.EventingConstants;
@@ -112,17 +113,16 @@
public boolean accepts(Element event)
{
-
boolean b = true;
if (filter != null)
{
try
{
- XObject o = XPathAPI.eval(event, filter.getExpression());
- b = o.bool();
+ XPath xpath = XPathFactory.newInstance().newXPath();
+ b = (Boolean)xpath.evaluate(filter.getExpression(), event,
XPathConstants.BOOLEAN);
}
- catch (TransformerException e)
+ catch (XPathExpressionException e)
{
log.error("Failed to evalute xpath expression", e);
}