cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r603998 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ systests/src/test/java/org/apache/cxf/systest/aegis/ systests/sr...
Date Thu, 13 Dec 2007 19:36:36 GMT
Author: dkulp
Date: Thu Dec 13 11:36:35 2007
New Revision: 603998

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

........
  r603363 | dkulp | 2007-12-11 16:18:29 -0500 (Tue, 11 Dec 2007) | 4 lines
  
  Add system test from a bug report on the list
  That test found an unrelated bug with creating clients with Aegis using a WSDL.   Fix that
bug.
........

Added:
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/SportsService.java
      - copied unchanged from r603363, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/SportsService.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java
      - copied unchanged from r603363, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/Team.java
      - copied unchanged from r603363, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/Team.java
Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/resources/webapp/WEB-INF/beans.xml

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/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java?rev=603998&r1=603997&r2=603998&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
Thu Dec 13 11:36:35 2007
@@ -37,6 +37,10 @@
     private Map<Method, OperationInfo> methodToOp = 
         new ConcurrentHashMap<Method, OperationInfo>();
 
+    public SimpleMethodDispatcher() {
+        //complete
+    }
+    
     public void bind(OperationInfo o, Method... methods) {
         Method primary = methods[0];
         for (Method m : methods) {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=603998&r1=603997&r2=603998&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Thu Dec 13 11:36:35 2007
@@ -255,20 +255,32 @@
         }
     }
 
+    protected void setServiceProperties() {
+        getService().put(MethodDispatcher.class.getName(), getMethodDispatcher());
+        if (properties != null) {
+            getService().putAll(properties);
+        }
+        
+    }
+    
     protected void buildServiceFromWSDL(String url) {
         LOG.info("Creating Service " + getServiceQName() + " from WSDL: " + url);
         WSDLServiceFactory factory = new WSDLServiceFactory(getBus(), url, getServiceQName());
         setService(factory.create());
 
-        if (properties != null) {
-            getService().putAll(properties);
-        }
+        setServiceProperties();
 
         initializeWSDLOperations();
 
         if (getDataBinding() != null) {
             getDataBinding().initialize(getService());
         }
+        
+        for (ServiceInfo si : getService().getServiceInfos()) {
+            if (getExtraClass() != null) {
+                si.setProperty(EXTRA_CLASS, getExtraClass());
+            }
+        }
     }
 
     protected void buildServiceFromClass() {
@@ -284,17 +296,19 @@
 
         setService(service);
 
-        if (properties != null) {
-            service.putAll(properties);
-        }
-
-        service.put(MethodDispatcher.class.getName(), getMethodDispatcher());
+        setServiceProperties();
 
         serviceInfo.setName(getServiceQName());
         serviceInfo.setTargetNamespace(serviceInfo.getName().getNamespaceURI());
 
         createInterface(serviceInfo);
 
+        for (ServiceInfo si : getService().getServiceInfos()) {
+            if (getExtraClass() != null) {
+                si.setProperty(EXTRA_CLASS, getExtraClass());
+            }
+        }
+        
         getDataBinding().initialize(service);
 
         boolean isWrapped = isWrapped();

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=603998&r1=603997&r2=603998&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
Thu Dec 13 11:36:35 2007
@@ -21,6 +21,7 @@
 
 
 import java.net.URL;
+import java.util.Collection;
 import java.util.List;
 import java.util.logging.Logger;
 
@@ -131,5 +132,19 @@
         dom = XMLUtils.parse(url.openStream());
         util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                          dom);
+    }
+    
+    @Test
+    public void testCollection() throws Exception {
+        AegisDatabinding aegisBinding = new AegisDatabinding();
+        JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
+        proxyFactory.setDataBinding(aegisBinding);
+        proxyFactory.setServiceClass(SportsService.class);
+        proxyFactory.setWsdlLocation("http://localhost:9002/jaxwsAndAegisSports?wsdl");
+        SportsService service = (SportsService) proxyFactory.create();
+        Collection<Team> teams = service.getTeams();
+        assertEquals(1, teams.size());
+        assertEquals("Patriots", teams.iterator().next().getName());
+
     }
 }

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/resources/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/resources/webapp/WEB-INF/beans.xml?rev=603998&r1=603997&r2=603998&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/resources/webapp/WEB-INF/beans.xml
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/resources/webapp/WEB-INF/beans.xml
Thu Dec 13 11:36:35 2007
@@ -89,5 +89,16 @@
       <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
     </jaxws:serviceBean>
    </jaxws:server>  
+   
+     
+  <jaxws:server address="/jaxwsAndAegisSports"
+    serviceClass="org.apache.cxf.systest.aegis.SportsService">
+    <jaxws:dataBinding>
+       <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+    </jaxws:dataBinding>
+    <jaxws:serviceBean>
+      <bean class="org.apache.cxf.systest.aegis.SportsServiceImpl" />
+    </jaxws:serviceBean>
+  </jaxws:server>
 </beans>
 <!-- END SNIPPET: beans -->



Mime
View raw message