cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r640923 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/ systests/...
Date Tue, 25 Mar 2008 18:14:59 GMT
Author: dkulp
Date: Tue Mar 25 11:14:54 2008
New Revision: 640923

URL: http://svn.apache.org/viewvc?rev=640923&view=rev
Log:
Merged revisions 640537 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r640537 | dkulp | 2008-03-24 15:35:46 -0400 (Mon, 24 Mar 2008) | 2 lines
  
  Updates for some 2.1 TCK issues
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java?rev=640923&r1=640922&r2=640923&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
Tue Mar 25 11:14:54 2008
@@ -39,6 +39,7 @@
 
 public class JaxWsProxyFactoryBean extends ClientProxyFactoryBean {
     List<Handler> handlers = new ArrayList<Handler>();
+    boolean loadHandlers = true;
     
     public JaxWsProxyFactoryBean() {
         super(new JaxWsClientFactoryBean());
@@ -51,6 +52,13 @@
     public List<Handler> getHandlers() {
         return handlers;
     }
+    
+    public void setLoadHandlers(boolean b) {
+        loadHandlers = b;
+    }
+    public boolean isLoadHandlers() {
+        return loadHandlers;
+    }
 
     
     @Override
@@ -71,10 +79,10 @@
         AnnotationHandlerChainBuilder builder = new AnnotationHandlerChainBuilder();
         JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)getServiceFactory(); 
         List<Handler> chain = new ArrayList<Handler>(handlers);
-        chain.addAll(builder.buildHandlerChainFromClass(sf.getServiceClass(), 
-                                                        sf.getEndpointInfo().getName()));
-        
-        
+        if (loadHandlers) {
+            chain.addAll(builder.buildHandlerChainFromClass(sf.getServiceClass(), 
+                                                            sf.getEndpointInfo().getName()));
+        }
 
         if (!chain.isEmpty()) {
             ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=640923&r1=640922&r2=640923&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Tue Mar 25 11:14:54 2008
@@ -372,7 +372,10 @@
             clientFac.setAddress(portInfo.getAddress());
         }
         configureObject(portName.toString() + ".jaxws-client.proxyFactory", proxyFac);
-        
+        if (clazz != ServiceImpl.class) {
+            // handlerchain should be on the generated Service object
+            proxyFac.setLoadHandlers(false);
+        }
         Object obj = proxyFac.create();
         
         // Configure the Service
@@ -391,7 +394,6 @@
         // Configure the JaxWsEndpoitnImpl
         JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) clientFac.getClient().getEndpoint();
         configureObject(jaxwsEndpoint);  
-                                      
         List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain();
         
         hc.addAll(handlerResolver.getHandlerChain(portInfos.get(portName)));

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java?rev=640923&r1=640922&r2=640923&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
Tue Mar 25 11:14:54 2008
@@ -371,10 +371,13 @@
                 }
                 continueProcessing = false;
                 setFault(e);
-                if (e instanceof SOAPFaultException) {
-                    throw mapSoapFault((SOAPFaultException)e);
+                if (responseExpected) {
+                    //brain dead spec - if it's one way, swallow it
+                    if (e instanceof SOAPFaultException) {
+                        throw mapSoapFault((SOAPFaultException)e);
+                    }
+                    throw e;
                 }
-                throw e;
             } else {
                 continueProcessing = false;
                 if (responseExpected || outbound) {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java?rev=640923&r1=640922&r2=640923&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
Tue Mar 25 11:14:54 2008
@@ -615,7 +615,8 @@
         //boolean continueProcessing = true;
         try {
             invoker.invokeLogicalHandlers(false, lmc);
-            fail("did not get expected exception");
+            //don't fail.  TCK says this shouldn't be thrown.
+            //fail("did not get expected exception");
         } catch (ProtocolException e) {
             assertEquals("banzai", e.getMessage());
         }

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java?rev=640923&r1=640922&r2=640923&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
Tue Mar 25 11:14:54 2008
@@ -483,7 +483,7 @@
 
         try {
             handlerTest.ping();
-            fail("did not get expected exception");
+            //fail("did not get expected exception");
         } catch (ProtocolException e) {
             assertEquals(clientHandlerMessage, e.getMessage());
         }
@@ -652,7 +652,7 @@
 
         try {
             handlerTest.ping();
-            fail("did not get expected exception");
+            //fail("did not get expected exception");
         } catch (ProtocolException e) {
             assertEquals(clientHandlerMessage, e.getMessage());
         }



Mime
View raw message