You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2011/05/27 09:12:14 UTC

svn commit: r1128178 - in /servicemix/components/trunk/bindings/servicemix-cxf-bc/src: main/java/org/apache/servicemix/cxfbc/ test/java/org/apache/servicemix/cxfbc/ test/java/org/apache/servicemix/cxfbc/ws/security/ test/resources/org/apache/servicemix...

Author: ffang
Date: Fri May 27 07:12:14 2011
New Revision: 1128178

URL: http://svn.apache.org/viewvc?rev=1128178&view=rev
Log:
[SMXCOMP-878]ensure cxf bc consumer endpoint can publish wsdl

Modified:
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1128178&r1=1128177&r2=1128178&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Fri May 27 07:12:14 2011
@@ -65,6 +65,7 @@ import org.apache.cxf.endpoint.EndpointI
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.frontend.WSDLGetInterceptor;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.interceptor.AttachmentInInterceptor;
 import org.apache.cxf.interceptor.AttachmentOutInterceptor;
@@ -474,6 +475,7 @@ public class CxfBcConsumer extends Consu
             cxfService.getInInterceptors().add(new MustUnderstandInterceptor());
             cxfService.getInInterceptors().add(new AttachmentInInterceptor());
             cxfService.getInInterceptors().add(new StaxInInterceptor());
+            cxfService.getInInterceptors().add(WSDLGetInterceptor.INSTANCE);
             cxfService.getInInterceptors().add(new OneWayProcessorInterceptor());
             cxfService.getInInterceptors().add(
                     new ReadHeadersInterceptor(getBus()));

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java?rev=1128178&r1=1128177&r2=1128178&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java Fri May 27 07:12:14 2011
@@ -111,7 +111,7 @@ public class CxfBCSESystemTest extends C
     
     private void calculatorTestBase() throws Exception {
 
-        URL wsdl = getClass().getResource("/wsdl/calculator.wsdl");
+        URL wsdl = new URL("http://localhost:19000/CalculatorService/SoapPort?wsdl");
         assertNotNull(wsdl);
         CalculatorService service = new CalculatorService(wsdl, new QName(
                 "http://apache.org/cxf/calculator", "CalculatorService"));

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java?rev=1128178&r1=1128177&r2=1128178&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java Fri May 27 07:12:14 2011
@@ -18,6 +18,8 @@ package org.apache.servicemix.cxfbc.ws.s
 
 
 
+import java.net.URL;
+
 import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.Bus;
@@ -32,19 +34,6 @@ import org.springframework.context.suppo
 
 public class CxfBcHttpsConsumerTest extends CxfBcSpringTestSupport {
     
-    private static final java.net.URL WSDL_LOC;
-    static {
-        java.net.URL tmp = null;
-        try {
-            tmp = CxfBCSecurityTest.class.getClassLoader().getResource(
-                "org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl"
-            );
-        } catch (final Exception e) {
-            e.printStackTrace();
-        }
-        WSDL_LOC = tmp;
-    }
-    
     public void testHttps() throws Exception {
         
         Bus bus = new SpringBusFactory().createBus(
@@ -56,7 +45,8 @@ public class CxfBcHttpsConsumerTest exte
         LoggingOutInterceptor out = new LoggingOutInterceptor();
         bus.getOutInterceptors().add(out);
         bus.getOutFaultInterceptors().add(out);
-        final javax.xml.ws.Service svc = javax.xml.ws.Service.create(WSDL_LOC,
+        final javax.xml.ws.Service svc = javax.xml.ws.Service.create(
+                new URL("https://localhost:9001/SoapContext/SoapPort?wsdl"),
                 new javax.xml.namespace.QName(
                         "http://apache.org/hello_world_soap_http",
                         "SOAPServiceWSSecurity"));

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml?rev=1128178&r1=1128177&r2=1128178&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml Fri May 27 07:12:14 2011
@@ -35,7 +35,7 @@
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-  <http:conduit name="{http://apache.org/hello_world_soap_http}TimestampSignEncrypt.http-conduit">
+  <http:conduit name="https://localhost:9001/.*">
     <http:tlsClientParameters disableCNCheck="true">
       <sec:trustManagers>
           <sec:keyStore type="JKS" password="password"