[jboss-svn-commits] JBL Code SVN: r34167 - in labs/jbossesb/trunk/product/services/soap/aop: resources/META-INF and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 26 05:47:36 EDT 2010
Author: mageshbk at jboss.com
Date: 2010-07-26 05:47:35 -0400 (Mon, 26 Jul 2010)
New Revision: 34167
Added:
labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientEndpointsAspect.java
Modified:
labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
Log:
[JBESB-3380] - Added support for CXF endpoints in Wise.
Added: labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientEndpointsAspect.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientEndpointsAspect.java (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientEndpointsAspect.java 2010-07-26 09:47:35 UTC (rev 34167)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.soap.wise;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * Aspect used to choose only methods that have no paramaters when creating WebEndpoint within WSDynamicClient.
+ *
+ * @author <a href='mailto:mageshbk at jboss.com'>Magesh Kumar B</a>
+ */
+public class WSDynamicClientEndpointsAspect
+{
+ public Object interceptMethod(Invocation invocation) throws Throwable
+ {
+ final Method method = (Method)invocation.getTargetObject();
+ Object annotation = invocation.invokeNext();
+
+ if ((annotation != null) && (method.getParameterTypes().length > 0))
+ {
+ return null;
+ }
+ return annotation;
+ }
+}
+
Modified: labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml 2010-07-26 08:28:04 UTC (rev 34166)
+++ labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml 2010-07-26 09:47:35 UTC (rev 34167)
@@ -4,6 +4,7 @@
<aspect class="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientClasspathAspect" scope="PER_VM"/>
<aspect class="org.jboss.internal.soa.esb.soap.wise.WSMethodIsOneWayAspect" scope="PER_VM"/>
<aspect class="org.jboss.internal.soa.esb.soap.ws.CompilerAspect" scope="PER_VM"/>
+ <aspect class="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientEndpointsAspect" scope="PER_VM"/>
<bind pointcut="execution(* it.javalinux.wise.core.client.WSMethod->getParmeterInRightPositionArray(..))">
<advice name="getParameterInRightPositionArray" aspect="org.jboss.internal.soa.esb.soap.wise.WSMethodParameterMappingAspect"/>
@@ -25,4 +26,8 @@
<advice name="getJarFile" aspect="org.jboss.internal.soa.esb.soap.ws.CompilerAspect"/>
</bind>
+ <bind pointcut="call(* java.lang.reflect.Method->getAnnotation(..)) AND withincode(* it.javalinux.wise.core.client.WSDynamicClient->processEndpoints())">
+ <advice name="interceptMethod" aspect="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientEndpointsAspect"/>
+ </bind>
+
</aop>
More information about the jboss-svn-commits
mailing list