geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r696015 - /geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
Date Tue, 16 Sep 2008 19:25:41 GMT
Author: gawor
Date: Tue Sep 16 12:25:41 2008
New Revision: 696015

URL: http://svn.apache.org/viewvc?rev=696015&view=rev
Log:
handle the additional JAX-WS 2.1 Service getPort and createDispatch operations

Modified:
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java?rev=696015&r1=696014&r2=696015&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
Tue Sep 16 12:25:41 2008
@@ -49,13 +49,14 @@
     public Object intercept(Object target, Method method, Object[] arguments, MethodProxy
methodProxy) throws Throwable {
         Object proxy = methodProxy.invokeSuper(target, arguments);       
         
-        if (method.getName().equals("getPort")) {     
+        if (method.getName().equals("getPort")) {  
             // it's a generic getPort() method
-            if (arguments.length == 1) {
-                // getPort(Class) called - use SEI annotation
+            Class<?> paramType = method.getParameterTypes()[0];
+            if (paramType.equals(Class.class)) {
+                // getPort(Class) or getPort(Class, WebServiceFeatures) called - use SEI
annotation
                 setProperties((BindingProvider)proxy, JAXWSUtils.getPortType((Class)arguments[0]));
-            } else if (arguments.length == 2) {
-                // getPort(QName, Class) called
+            } else if (paramType.equals(QName.class)) {
+                // getPort(QName, Class) or getPort(QName, Class, WebServiceFeatures) called
                 if (arguments[0] == null) {
                     // port qname not specified - use SEI annotation
                     setProperties((BindingProvider)proxy, JAXWSUtils.getPortType((Class)arguments[1]));
@@ -70,7 +71,11 @@
             setProperties((BindingProvider)proxy, endpoint.name());
         } else if (method.getName().equals("createDispatch")) {
             // it's one of createDispatch() methods
-            setProperties((BindingProvider)proxy, ((QName)arguments[0]).getLocalPart());
+            Class<?> paramType = method.getParameterTypes()[0];
+            if (paramType.equals(QName.class)) {
+                // one of creatDispatch(QName, ....) methods is called
+                setProperties((BindingProvider)proxy, ((QName)arguments[0]).getLocalPart());
+            }
         }
                 
         return proxy;



Mime
View raw message