geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r557871 - in /geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2: Axis2WebServiceContainer.java client/Axis2PortMethodInterceptor.java client/Axis2ServiceReference.java
Date Fri, 20 Jul 2007 05:32:30 GMT
Author: gawor
Date: Thu Jul 19 22:32:29 2007
New Revision: 557871

URL: http://svn.apache.org/viewvc?view=rev&rev=557871
Log:
collect SOAPHandler headers and register then

Added:
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
  (with props)
Modified:
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ServiceReference.java

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?view=diff&rev=557871&r1=557870&r2=557871
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Thu Jul 19 22:32:29 2007
@@ -385,6 +385,8 @@
             }
             
             this.binding = BindingUtils.createBinding(desc);
+            
+            DescriptionUtils.registerHandlerHeaders(desc.getAxisService(), this.binding.getHandlerChain());
           
         }
     }
 

Added: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java?view=auto&rev=557871
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
(added)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
Thu Jul 19 22:32:29 2007
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.axis2.client;
+
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.handler.Handler;
+
+import net.sf.cglib.proxy.MethodProxy;
+
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.impl.DescriptionUtils;
+import org.apache.axis2.jaxws.spi.BindingProvider;
+import org.apache.geronimo.jaxws.client.EndpointInfo;
+import org.apache.geronimo.jaxws.client.PortMethodInterceptor;
+
+public class Axis2PortMethodInterceptor extends PortMethodInterceptor {
+
+    public Axis2PortMethodInterceptor(Map<Object, EndpointInfo> seiInfoMap) {
+        super(seiInfoMap);
+    }
+    
+    public Object intercept(Object target, Method method, Object[] arguments, MethodProxy
methodProxy) throws Throwable {
+        Object proxy = super.intercept(target, method, arguments, methodProxy);
+        
+        BindingProvider axisProxy = (BindingProvider) proxy;
+        
+        List<Handler> handlers = 
+            (axisProxy.getBinding() != null) ? axisProxy.getBinding().getHandlerChain() :
null;
+        AxisService axisService =
+            (axisProxy.getEndpointDescription() != null) ? axisProxy.getEndpointDescription().getAxisService()
: null;
+        
+        DescriptionUtils.registerHandlerHeaders(axisService, handlers);
+        
+        return proxy;
+    }
+    
+}
\ No newline at end of file

Propchange: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ServiceReference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ServiceReference.java?view=diff&rev=557871&r1=557870&r2=557871
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ServiceReference.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ServiceReference.java
Thu Jul 19 22:32:29 2007
@@ -32,6 +32,7 @@
 import org.apache.geronimo.jaxws.JNDIResolver;
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.jaxws.client.JAXWSServiceReference;
+import org.apache.geronimo.jaxws.client.PortMethodInterceptor;
 import org.apache.geronimo.xbeans.javaee.HandlerChainsDocument;
 import org.apache.geronimo.xbeans.javaee.HandlerChainsType;
 import org.apache.xmlbeans.XmlException;
@@ -72,4 +73,9 @@
                 new Axis2HandlerResolver(classLoader, serviceClass, types, annotationProcessor);
         return handlerResolver;
     }
+    
+    protected PortMethodInterceptor getPortMethodInterceptor() {
+        return new Axis2PortMethodInterceptor(this.seiInfoMap);
+    }
+    
 }



Mime
View raw message