servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r682639 - in /servicemix/smx3/branches/servicemix-3.2: ./ deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/i...
Date Tue, 05 Aug 2008 08:56:58 GMT
Author: ffang
Date: Tue Aug  5 01:56:58 2008
New Revision: 682639

URL: http://svn.apache.org/viewvc?rev=682639&view=rev
Log:
[SM-1498]update cxf version to 2.0.9-SNAPSHOT for smx3.2 branch to get lastest changes in
cxf

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/interceptors/CxfBcInterceptorTest.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/xbean.xml
    servicemix/smx3/branches/servicemix-3.2/pom.xml

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
Tue Aug  5 01:56:58 2008
@@ -51,8 +51,10 @@
     private DefaultServiceMixClient client;
     private InOut io;
     private CxfSeComponent component;
-    
-    
+    private JaxWsServerFactoryBean factory;
+    private Server server;
+    private Endpoint endpoint;
+    private ServiceInfo service;
     
     protected void setUp() throws Exception {
         super.setUp();
@@ -97,17 +99,17 @@
            
         
         //start external service
-        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
+        factory = new JaxWsServerFactoryBean();
         factory.setServiceClass(CalculatorPortType.class);
         factory.setServiceBean(new CalculatorImpl());
         String address = "http://localhost:9001/providertest";
         factory.setAddress(address);
         factory.setBindingId("http://schemas.xmlsoap.org/wsdl/soap12/");
-        Server server = factory.create();
-        Endpoint endpoint = server.getEndpoint();
+        server = factory.create();
+        endpoint = server.getEndpoint();
         endpoint.getInInterceptors().add(new LoggingInInterceptor());
         endpoint.getOutInterceptors().add(new LoggingOutInterceptor());
-        ServiceInfo service = endpoint.getEndpointInfo().getService();
+        service = endpoint.getEndpointInfo().getService();
         assertNotNull(service);
         client = new DefaultServiceMixClient(jbi);
         io = client.createInOutExchange();
@@ -124,10 +126,29 @@
               + "</part> "
               + "</message>"));
         client.sendSync(io);
+        client.done(io);
         assertTrue(new SourceTransformer().contentToString(
                 io.getOutMessage()).indexOf("Hello ffang 3") >= 0);
 
         //test exception handle
+        exceptionHandle();
+        
+        
+        //test onway
+        oneWay();
+        
+        
+        
+        //test soap header using helloworld
+        soapHeader();
+        
+        //test concurrency
+        concurrency();
+        // Shutdown CXF Service/Endpoint so that next test doesn't fail.
+        factory.getBus().shutdown(true);
+    }
+
+    private void concurrency() throws Exception {
         io = client.createInOutExchange();
         io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
         io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
@@ -136,16 +157,36 @@
                 "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
               + "<part> "
               + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
-              + "exception test"
+              + "concurrency test"
               + "</requestType></greetMe>"
               + "</part> "
               + "</message>"));
         client.sendSync(io);
+        client.done(io);
         assertTrue(new SourceTransformer().contentToString(
-                io.getOutMessage()).indexOf("Hello exception test Negative number cant be
added!") >= 0);
-        
-        
-        //test onway
+                io.getOutMessage()).indexOf("Hello concurrency test 0 2 4 6 8 10 12 14 16
18") >= 0);
+    }
+
+    private void soapHeader() throws Exception {
+        io = client.createInOutExchange();
+        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
+        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
+        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe"));
+        io.getInMessage().setContent(new StringSource(
+            "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+            + "<part> "
+            + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
+            + "header test"
+            + "</requestType></greetMe>"
+            + "</part> "
+            + "</message>"));
+        client.sendSync(io);
+        assertTrue(new SourceTransformer().contentToString(
+            io.getOutMessage()).indexOf("Hello header test 12345") >= 0);
+    }
+
+    private void oneWay() throws Exception {
+        String address;
         factory = new JaxWsServerFactoryBean();
         factory.setServiceClass(Greeter.class);
         factory.setServiceBean(new GreeterImpl());
@@ -171,6 +212,7 @@
               + "</part> "
               + "</message>"));
         client.sendSync(io);
+        client.done(io);
         assertTrue(new SourceTransformer().contentToString(
                 io.getOutMessage()).indexOf("Hello oneway test oneway") >= 0);
         
@@ -185,27 +227,9 @@
         endpoint.getOutInterceptors().add(new LoggingOutInterceptor());
         service = endpoint.getEndpointInfo().getService();
         assertNotNull(service);
-        
-        
-        
-        //test soap header using helloworld
-        io = client.createInOutExchange();
-        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
-        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
-        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe"));
-        io.getInMessage().setContent(new StringSource(
-            "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
-            + "<part> "
-            + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
-            + "header test"
-            + "</requestType></greetMe>"
-            + "</part> "
-            + "</message>"));
-        client.sendSync(io);
-        assertTrue(new SourceTransformer().contentToString(
-            io.getOutMessage()).indexOf("Hello header test 12345") >= 0);
-        
-        //test concurrency
+    }
+
+    private void exceptionHandle() throws Exception {
         io = client.createInOutExchange();
         io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
         io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
@@ -214,15 +238,14 @@
                 "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
               + "<part> "
               + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
-              + "concurrency test"
+              + "exception test"
               + "</requestType></greetMe>"
               + "</part> "
               + "</message>"));
         client.sendSync(io);
+        client.done(io);
         assertTrue(new SourceTransformer().contentToString(
-                io.getOutMessage()).indexOf("Hello concurrency test 0 2 4 6 8 10 12 14 16
18") >= 0);
-        // Shutdown CXF Service/Endpoint so that next test doesn't fail.
-        factory.getBus().shutdown(true);
+                io.getOutMessage()).indexOf("Hello exception test Negative number cant be
added!") >= 0);
     }
     
      

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/interceptors/CxfBcInterceptorTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/interceptors/CxfBcInterceptorTest.java?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/interceptors/CxfBcInterceptorTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/interceptors/CxfBcInterceptorTest.java
Tue Aug  5 01:56:58 2008
@@ -22,6 +22,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.servicemix.cxfbc.interceptors.types.quote.Quote;
 
 import org.apache.servicemix.tck.SpringTestSupport;
@@ -45,8 +47,9 @@
 
         javax.xml.ws.Holder<java.lang.String> retailTicker =  
             new javax.xml.ws.Holder<java.lang.String>("RetailerRPC");             
  
-        
+        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
         Quote quote = port.getStockQuote("FUSE", retailTicker);
+        
         Thread.sleep(1000);
         //Thread.sleep(10 * 60 * 1000); 
         

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
Tue Aug  5 01:56:58 2008
@@ -1008,7 +1008,7 @@
         // CreateSequence and five greetMe messages
         // full and partial responses to each
 
-        awaitMessages(6, 12, 7500);
+        awaitMessages(6, 12, 17500);
         MessageFlow mf = new MessageFlow(outRecorder.getOutboundMessages(), inRecorder.getInboundMessages());
 
         mf.verifyMessages(6, true);
@@ -1385,8 +1385,12 @@
     
     private void stopControl() {
         if (null != control) {  
-            assertTrue("Failed to stop greeter", control.stopGreeter(null));
-            controlBus.shutdown(true);
+            try {
+                assertTrue("Failed to stop greeter", control.stopGreeter(null));
+                controlBus.shutdown(true);
+            } catch (Exception e) {
+                //
+            }
         }
     }
     

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl
Tue Aug  5 01:56:58 2008
@@ -65,7 +65,7 @@
     <wsdl:operation name="getStockQuote">
       <soap:operation style="rpc"/>
       <wsdl:input name="getStockQuote">
-	      <soap:body use="literal" namespace="http://servicemix.:apache.org/cxfbc/interceptors"/>
+	      <soap:body use="literal" namespace="http://servicemix.apache.org/cxfbc/interceptors"/>
       </wsdl:input>
       <wsdl:output name="getStockQuoteResponse">
 	      <soap:body use="literal"  namespace="http://servicemix.apache.org/cxfbc/interceptors"/>

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/xbean.xml?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/xbean.xml
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/interceptors/xbean.xml
Tue Aug  5 01:56:58 2008
@@ -33,6 +33,18 @@
       <cxfbc:consumer wsdl="org/apache/servicemix/cxfbc/interceptors/quote.wsdl"
                       targetService="QuoteReporterRPC:StockQuoteReporterRPCService"
                       targetInterface="QuoteReporterRPC:QuoteReporterRPC">
+            <cxfbc:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inInterceptors>
+        <cxfbc:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outInterceptors>
+        <cxfbc:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inFaultInterceptors>
+        <cxfbc:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outFaultInterceptors>
       </cxfbc:consumer>
     </sm:endpoints>
     

Modified: servicemix/smx3/branches/servicemix-3.2/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/pom.xml?rev=682639&r1=682638&r2=682639&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/pom.xml (original)
+++ servicemix/smx3/branches/servicemix-3.2/pom.xml Tue Aug  5 01:56:58 2008
@@ -220,7 +220,7 @@
         <oro-version>2.0.8</oro-version>
         <sitemesh-version>2.2.1</sitemesh-version>
         <woden-version>1.0.0M6</woden-version>
-        <cxf-version>2.0.7</cxf-version>
+        <cxf-version>2.0.9-SNAPSHOT</cxf-version>
         <jaxb.version>2.0</jaxb.version>
         <jaxb.impl.version>2.0.1</jaxb.impl.version>
         <derby-version>10.2.2.0</derby-version>
@@ -1885,7 +1885,7 @@
             <dependency>
                 <groupId>org.apache.ws.security</groupId>
                 <artifactId>wss4j</artifactId>
-                <version>1.5.2</version>
+                <version>1.5.4</version>
             </dependency>
             <dependency>
                 <groupId>bouncycastle</groupId>



Mime
View raw message