servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r641072 - in /servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean: XPath.java support/BeanInfo.java
Date Tue, 25 Mar 2008 23:14:03 GMT
Author: gnodet
Date: Tue Mar 25 16:13:56 2008
New Revision: 641072

URL: http://svn.apache.org/viewvc?rev=641072&view=rev
Log:
SM-1123: Namespace support for the xpath parameter annotation

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java?rev=641072&r1=641071&r2=641072&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
Tue Mar 25 16:13:56 2008
@@ -31,5 +31,7 @@
 public @interface XPath {
 
     String xpath() default "";
+    String prefix() default "";
+    String uri() default "";
 
 }

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java?rev=641072&r1=641071&r2=641072&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
Tue Mar 25 16:13:56 2008
@@ -174,7 +174,13 @@
             return createContentExpression(marshaller);
         } else if (annotation instanceof XPath) {
             XPath xpathAnnotation = (XPath) annotation;
-            return new JAXPStringXPathExpression(xpathAnnotation.xpath());
+            JAXPStringXPathExpression expr = new JAXPStringXPathExpression(xpathAnnotation.xpath());
+            if (!annotation.prefix().equals("") && !annotation.uri().equals(""))
{
+                DefaultNamespaceContext ctx = new DefaultNamespaceContext();
+                ctx.add(annotation.prefix(), annotation.uri());
+                expr.setNamespaceContext(ctx);
+            }
+            return expr; 
         }
         return null;
     }



Mime
View raw message