cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r591196 - in /incubator/cxf/branches/2.0.x-fixes: ./ integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/ rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ rt/ws...
Date Fri, 02 Nov 2007 02:32:24 GMT
Author: dkulp
Date: Thu Nov  1 19:32:23 2007
New Revision: 591196

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

........
  r590916 | ningjiang | 2007-11-01 03:02:31 -0400 (Thu, 01 Nov 2007) | 1 line
  
  Added some tests on the WSAFeature, also added AbstractWSDLBasedEndpointFactory missing
merges
........

Added:
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/spring.xml
      - copied unchanged from r590916, incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/spring.xml
Removed:
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/server.xml
Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureTest.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureXmlTest.java

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

Modified: incubator/cxf/branches/2.0.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java?rev=591196&r1=591195&r2=591196&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
Thu Nov  1 19:32:23 2007
@@ -90,7 +90,8 @@
 
         Class[] types = {ProxyInvocationHandler.class, 
                          ObjectMethodInvocationHandler.class,
-                         InvokingInvocationHandler.class};
+                         InvokingInvocationHandler.class,
+                         SecurityTestHandler.class};
 
         for (int i = 0; i < types.length; i++) {
             assertTrue("handler chain must contain type: " + types[i], allHandlerTypes.contains(types[i]));

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml?rev=591196&r1=591195&r2=591196&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
Thu Nov  1 19:32:23 2007
@@ -66,6 +66,7 @@
   <jaxws:client id="wsdlLocation" 
     serviceClass="org.apache.hello_world_soap_http.Greeter"
     serviceName="s:SOAPService"
+    endpointName="s:SoapPort"
     xmlns:s="http://apache.org/hello_world_soap_http"
     address="http://localhost:8080/simpleWithAddress"
     wsdlLocation="wsdl/hello_world.wsdl"/>

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?rev=591196&r1=591195&r2=591196&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Thu Nov  1 19:32:23 2007
@@ -220,6 +220,7 @@
 
     public void setBus(Bus bus) {
         this.bus = bus;
+        clientFactoryBean.setBus(bus);
     }
 
     public Map<String, Object> getProperties() {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureTest.java?rev=591196&r1=591195&r2=591196&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureTest.java
Thu Nov  1 19:32:23 2007
@@ -18,14 +18,20 @@
  */
 package org.apache.cxf.ws.addressing.spring;
 
+import java.util.List;
+
+import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.test.AbstractCXFTest;
 import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.addressing.WSAddressingFeature;
 import org.apache.cxf.ws.addressing.soap.MAPCodec;
+import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.junit.Test;
 
@@ -42,10 +48,26 @@
         Server server = sf.create();
         
         Endpoint endpoint = server.getEndpoint();
+        checkAddressInterceptors(endpoint.getInInterceptors());        
+        
+    }
+    
+    @Test
+    public void testClientProxyFactory() {
+        JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean(); 
+        cf.setAddress("http://localhost/test");
+        cf.getFeatures().add(new WSAddressingFeature());
+        cf.setServiceClass(Greeter.class);
+        Greeter greeter = (Greeter) cf.create();
+        Client client = ClientProxy.getClient(greeter);
+        checkAddressInterceptors(client.getInInterceptors());
+    }
+    
+    private void checkAddressInterceptors(List<Interceptor> interceptors) {
         boolean hasAg = false;
         boolean hasCodec = false;
         
-        for (Interceptor i : endpoint.getInInterceptors()) {
+        for (Interceptor i : interceptors) {
             if (i instanceof MAPAggregator) {
                 hasAg = true;
             } else if (i instanceof MAPCodec) {
@@ -55,4 +77,5 @@
         assertTrue(hasAg);
         assertTrue(hasCodec);
     }
+    
 }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureXmlTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureXmlTest.java?rev=591196&r1=591195&r2=591196&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureXmlTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/spring/WSAFeatureXmlTest.java
Thu Nov  1 19:32:23 2007
@@ -18,17 +18,23 @@
  */
 package org.apache.cxf.ws.addressing.spring;
 
+import java.util.List;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.test.AbstractCXFTest;
 import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.addressing.soap.MAPCodec;
+import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.junit.Test;
 
@@ -36,27 +42,46 @@
     
     @Override
     protected Bus createBus() throws BusException {
-        return new SpringBusFactory().createBus("/org/apache/cxf/ws/addressing/spring/server.xml");
+        return new SpringBusFactory().createBus("/org/apache/cxf/ws/addressing/spring/spring.xml");
     }
 
     @Test
     public void testServerFactory() {
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
+     
+        assert bus != null;
         sf.setServiceBean(new GreeterImpl());
         sf.setAddress("http://localhost/test");
         sf.setStart(false);
-        sf.setBus(getBus());
         
         Configurer c = getBus().getExtension(Configurer.class);
-        c.configureBean("test", sf);
+        c.configureBean("server", sf);
         
         Server server = sf.create();
         
         Endpoint endpoint = server.getEndpoint();
+        checkAddressInterceptors(endpoint.getInInterceptors());
+    }
+    
+    @Test
+    public void testClientProxyFactory() {
+      
+        JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean(); 
+        cf.setAddress("http://localhost/test");        
+        cf.setServiceClass(Greeter.class);
+        cf.setBus(getBus());
+        Configurer c = getBus().getExtension(Configurer.class);
+        c.configureBean("client.proxyFactory", cf);
+        Greeter greeter = (Greeter) cf.create();
+        Client client = ClientProxy.getClient(greeter);        
+        checkAddressInterceptors(client.getInInterceptors());
+    }
+    
+    private void checkAddressInterceptors(List<Interceptor> interceptors) {
         boolean hasAg = false;
         boolean hasCodec = false;
         
-        for (Interceptor i : endpoint.getInInterceptors()) {
+        for (Interceptor i : interceptors) {
             if (i instanceof MAPAggregator) {
                 hasAg = true;
             } else if (i instanceof MAPCodec) {



Mime
View raw message