cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1054802 - in /cxf/branches/2.3.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/service/factory/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ systests/jaxws/src/test...
Date Mon, 03 Jan 2011 22:14:42 GMT
Author: dkulp
Date: Mon Jan  3 22:14:41 2011
New Revision: 1054802

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

........
  r1052200 | ema | 2010-12-23 04:02:01 -0500 (Thu, 23 Dec 2010) | 1 line
  
  [CXF-3209]:Added NeedReset boolean flag in ServiceFactory to avoid creating service twice
when the port is get without portName
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java

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

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java?rev=1054802&r1=1054801&r2=1054802&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
Mon Jan  3 22:14:41 2011
@@ -49,6 +49,7 @@ public abstract class AbstractServiceFac
     private static final Logger LOG = LogUtils.getL7dLogger(AbstractServiceFactoryBean.class);
     
     protected boolean dataBindingSet;
+    protected boolean needReset = true;
     protected List<String> schemaLocations;
 
     private Bus bus;
@@ -119,6 +120,10 @@ public abstract class AbstractServiceFac
         this.dataBindingSet = dataBinding != null;
     }
 
+    public void setNeedReset(boolean reset) {
+        needReset = reset;
+    }
+    
     public Service getService() {
         return service;
     }

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=1054802&r1=1054801&r2=1054802&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Mon Jan  3 22:14:41 2011
@@ -433,8 +433,10 @@ public class ServiceImpl extends Service
             Service service = serviceFactory.getService();
             if (service == null) {
                 serviceFactory.setServiceClass(serviceEndpointInterface);
-                serviceFactory.setBus(getBus());                
+                serviceFactory.setBus(getBus());
                 service = serviceFactory.create();
+                //Add this flag and not need to create service twice
+                serviceFactory.setNeedReset(false);
             }
             
             EndpointInfo ei = ServiceModelUtil.findBestEndpointInfo(portTypeName, service.getServiceInfos());

Modified: cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1054802&r1=1054801&r2=1054802&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Mon Jan  3 22:14:41 2011
@@ -227,6 +227,9 @@ public class ReflectionServiceFactoryBea
         return retVal;
     }
     public void reset() {
+        if (!needReset) {
+            return;
+        }
         if (!dataBindingSet) {
             setDataBinding(null);
         }

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?rev=1054802&r1=1054801&r2=1054802&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
Mon Jan  3 22:14:41 2011
@@ -1003,4 +1003,21 @@ public class ClientServerTest extends Ab
         ins.close();
     }
     
+    @Test
+    public void testGetPortWithoutPortName() throws Exception {
+        SOAPService service = new SOAPService();
+        assertNotNull(service);
+        Greeter greeter = service.getPort(Greeter.class);
+        updateAddressPort(greeter, PORT);
+        try {
+            greeter.greetMe("test");           
+            String reply = greeter.sayHi();
+            assertNotNull("no response received from service", reply);
+            assertEquals("Bonjour", reply);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+    }
+    
+    
 }



Mime
View raw message