servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r678616 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/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/...
Date Tue, 22 Jul 2008 01:58:55 GMT
Author: ffang
Date: Mon Jul 21 18:58:54 2008
New Revision: 678616

URL: http://svn.apache.org/viewvc?rev=678616&view=rev
Log:
[SM-1471]cxf bc provider should handle response message with security soap header correctly

Added:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
  (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
  (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
  (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
  (with props)
Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java?rev=678616&r1=678615&r2=678616&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
Mon Jul 21 18:58:54 2008
@@ -31,9 +31,12 @@
 import javax.xml.transform.Source;
 
 import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor;
+import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.interceptor.AttachmentInInterceptor;
 import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
@@ -44,9 +47,9 @@
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.MessageObserver;
-import org.apache.servicemix.common.JbiConstants;
+import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor;
-import org.apache.servicemix.cxfbc.interceptors.RetrievePayLoadInterceptor;
+
 
 public class CxfBcProviderMessageObserver implements MessageObserver {
     ByteArrayOutputStream response = new ByteArrayOutputStream();
@@ -121,8 +124,9 @@
             PhaseManager pm = providerEndpoint.getBus().getExtension(
                     PhaseManager.class);
             List<Interceptor> inList = new ArrayList<Interceptor>();
-            
-            inList.add(new RetrievePayLoadInterceptor());
+            inList.add(new ReadHeadersInterceptor(this.providerEndpoint.getBus()));
+            inList.add(new MustUnderstandInterceptor());
+            inList.add(new StaxInInterceptor());
             inList.add(new JbiInWsdl1Interceptor(this.providerEndpoint.isUseJBIWrapper()));
             if (providerEndpoint.isMtomEnabled()) {
                 inList.add(new AttachmentInInterceptor());

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java?rev=678616&r1=678615&r2=678616&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
Mon Jul 21 18:58:54 2008
@@ -69,7 +69,7 @@
                 header.setId("345");
                 ret = ret + hello.hello(req, header).getText();
             
-            } else if ("https test".equals(me)) {
+            } else if ("https test".equals(me) || "provider security test".equals(me)) {
                 ret = ret + securityGreeter.greetMe("ffang");
             } else if ("concurrency test".equals(me)) {
                 MultiClientThread[] clients = new MultiClientThread[10];

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java?rev=678616&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
(added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
Mon Jul 21 18:58:54 2008
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.cxfbc.ws.security;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.testutil.common.ServerLauncher;
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.cxfse.CxfSeComponent;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class CxfBcProviderHttpsTest extends SpringTestSupport {
+    
+    private DefaultServiceMixClient client;
+    private InOut io;
+    private CxfSeComponent component;
+    private ServerLauncher sl;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        
+        component = new CxfSeComponent();
+        jbi.activateComponent(component, "CxfSeComponent");
+        //Deploy proxy SU
+        component.getServiceUnitManager().deploy("proxy", getServiceUnitPath("provider"));
+        component.getServiceUnitManager().init("proxy", getServiceUnitPath("provider"));
+        component.getServiceUnitManager().start("proxy");
+        assertTrue(
+            "Server failed to launch",
+            // run the server in another process
+            // set this to false to fork
+            launchServer(HttpsServer.class, false));
+    }
+    
+    protected void tearDown() throws Exception {
+        component.getServiceUnitManager().stop("proxy");
+        component.getServiceUnitManager().shutDown("proxy");
+        component.getServiceUnitManager().undeploy("proxy", getServiceUnitPath("provider"));
+        try {
+            sl.stopServer();
+        } catch (IOException ex) {
+            ex.printStackTrace();
+            fail("failed to stop server " + sl.getClass());
+        } 
+    }
+    
+    public boolean launchServer(Class<?> clz, boolean inProcess) {
+        boolean ok = false;
+        try { 
+            sl = new ServerLauncher(clz.getName(), inProcess);
+            ok = sl.launchServer();            
+            assertTrue("server failed to launch", ok);
+            
+        } catch (IOException ex) {
+            ex.printStackTrace();
+            fail("failed to launch server " + clz);
+        }
+        
+        return ok;
+    }
+    
+    public void testProviderWithHttps() throws Exception {
+
+        client = new DefaultServiceMixClient(jbi);
+        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"));
+        //send message to proxy
+        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>"
+              + "https test"
+              + "</requestType></greetMe>"
+              + "</part> "
+              + "</message>"));
+        client.sendSync(io);
+        assertTrue(new SourceTransformer().contentToString(
+                io.getOutMessage()).indexOf("Hello https test Hello ffang") >= 0);
+
+    }
+
+    @Override
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/cxfbc/ws/security/provider.xml");
+    }
+
+    protected String getServiceUnitPath(String name) {
+        URL url = getClass().getClassLoader().getResource("org/apache/servicemix/cxfbc/ws/security/"
+ name + "/xbean.xml");
+        File path = new File(url.getFile());
+        path = path.getParentFile();
+        return path.getAbsolutePath();
+    }
+}

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java?rev=678616&r1=678615&r2=678616&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
Mon Jul 21 18:58:54 2008
@@ -52,7 +52,7 @@
             "Server failed to launch",
             // run the server in another process
             // set this to false to fork
-            launchServer(HttpsServer.class, false));
+            launchServer(SecurityServer.class, false));
     }
     
     protected void tearDown() throws Exception {
@@ -94,19 +94,19 @@
                 "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
               + "<part> "
               + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
-              + "https test"
+              + "provider security test"
               + "</requestType></greetMe>"
               + "</part> "
               + "</message>"));
         client.sendSync(io);
         assertTrue(new SourceTransformer().contentToString(
-                io.getOutMessage()).indexOf("Hello https test Hello ffang") >= 0);
+                io.getOutMessage()).indexOf("provider security test Hello ffang") >= 0);
 
     }
 
     @Override
     protected AbstractXmlApplicationContext createBeanFactory() {
-        return new ClassPathXmlApplicationContext("org/apache/servicemix/cxfbc/ws/security/provider.xml");
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/cxfbc/ws/security/security_provider.xml");
     }
 
     protected String getServiceUnitPath(String name) {

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java?rev=678616&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
(added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
Mon Jul 21 18:58:54 2008
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.cxfbc.ws.security;
+
+import java.util.logging.Logger;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class SecurityServer extends AbstractBusTestServerBase {
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(HttpsServer.class);
+    
+    protected void run()  {
+        SpringBusFactory factory = new SpringBusFactory();
+        Bus bus = factory.createBus(
+            "org/apache/servicemix/cxfbc/ws/security/server.xml"
+        );
+        BusFactory.setDefaultBus(bus);
+        Object implementor = new GreeterImpl();
+        String address = "http://localhost:9001/SoapContext/SoapPort";
+        Endpoint.publish(address, implementor);
+    }
+        
+    public static void main(String[] args) {
+        try { 
+            SecurityServer s = new SecurityServer(); 
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally { 
+            LOG.info("done!");
+        }
+    }
+}

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/SecurityServer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml?rev=678616&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
(added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
Mon Jul 21 18:58:54 2008
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  
+-->
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+       xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+       xmlns:test="urn:test"
+       xmlns:greeter="http://apache.org/hello_world_soap_http">
+  
+  <sm:container id="jbi" embedded="true">
+    
+    <sm:endpoints>
+      
+      <cxfbc:provider wsdl="org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl"
+                      locationURI="http://localhost:9001/SoapContext/SoapPort"
+                      endpoint="TimestampSignEncrypt"
+                      service="greeter:SOAPServiceWSSecurity"
+                      interfaceName="greeter:Greeter"
+                      >
+        <cxfbc:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+          <ref bean="TimestampSignEncrypt_Response"/>
+            <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+        </cxfbc:inInterceptors>
+        <cxfbc:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+          <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+            <ref bean="TimestampSignEncrypt_Request"/>
+        </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:provider>
+
+    <cxfbc:provider wsdl="/wsdl/hello_world.wsdl"
+                      locationURI="http://localhost:9002/providertest_oneway"
+                      endpoint="SoapPort"
+                      service="greeter:SOAPService"
+                      interfaceName="greeter:Greeter"
+                      >
+        <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:provider>
+    </sm:endpoints>
+    
+  </sm:container>
+  
+  <!-- -->
+    <!-- This bean is an Out interceptor which will add a Timestamp, -->
+    <!-- sign the Timstamp and Body, and then encrypt the Timestamp -->
+    <!-- and Body.  It uses 3DES as the symmetric key algorithm. -->
+    <!-- -->
+    <bean
+        class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
+        id="TimestampSignEncrypt_Request">
+        <constructor-arg>
+            <map>
+                <entry key="action" value="Timestamp Signature Encrypt"/>
+                <!-- <entry key="action" value="Timestamp Signature"/> -->
+                <entry key="user" value="alice"/>
+                <entry key="signaturePropFile" value="org/apache/servicemix/cxfbc/ws/security/alice.properties"/>
+                <entry key="encryptionPropFile" value="org/apache/servicemix/cxfbc/ws/security/bob.properties"/>
+                <entry key="encryptionUser" value="Bob"/>
+                <entry key="signatureKeyIdentifier" value="DirectReference"/>
+                <entry key="passwordCallbackClass" value="org.apache.servicemix.cxfbc.ws.security.KeystorePasswordCallback"/>
+                <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+                <!-- -->
+                <!-- Recommendation: signatures should be encrypted -->
+                <!-- -->
+                <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+                <!-- <entry key="encryptionKeyTransportAlgorithm" value="RSA15"/>
-->
+                <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
+            </map>
+        </constructor-arg>
+    </bean>
+
+    <!-- -->
+    <!-- This bean is an In interceptor which validated a signed, -->
+    <!-- encrypted resposne, and timestamped. -->
+    <!-- -->
+    <!-- -->
+    <bean
+        class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"
+        id="TimestampSignEncrypt_Response">
+        <constructor-arg>
+            <map>
+                <entry key="action" value="Timestamp Signature Encrypt"/>
+                <entry key="signaturePropFile" value="org/apache/servicemix/cxfbc/ws/security/bob.properties"/>
+                <entry key="decryptionPropFile" value="org/apache/servicemix/cxfbc/ws/security/alice.properties"/>
+                <entry key="passwordCallbackClass" value="org.apache.servicemix.cxfbc.ws.security.KeystorePasswordCallback"/>
+            </map>
+        </constructor-arg>
+    </bean>
+</beans>

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/security_provider.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml?rev=678616&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
(added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
Mon Jul 21 18:58:54 2008
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans 
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://apache.org/hello_world_soap_http"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://cxf.apache.org/core                                      http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans                     http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     http://cxf.apache.org/schemas/jaxws.xsd
+    ">
+    
+    <!-- -->
+    <!-- Enable logging at all endpoints -->
+    <!-- -->
+    <cxf:bus>
+        <cxf:features>
+            <bean class="org.apache.cxf.feature.LoggingFeature"/>
+        </cxf:features>
+    </cxf:bus>
+
+    <jaxws:endpoint 
+        id="TimestampSignEncryptEndpoint"
+        implementor="org.apache.servicemix.cxfbc.ws.security.GreeterImpl"
+        address="http://localhost:9001/SoapContext/SoapPort"
+        serviceName="test:SOAPServiceWSSecurity"
+        endpointName="test:TimestampSignEncrypt"
+        >
+        <jaxws:outInterceptors>
+            <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+            <ref bean="TimestampSignEncrypt_Response"/>
+        </jaxws:outInterceptors>
+        <jaxws:inInterceptors>
+            <ref bean="TimestampSignEncrypt_Request"/>
+            <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+        </jaxws:inInterceptors>
+    </jaxws:endpoint>
+    <!-- -->
+    <!-- -->
+    <!-- -->
+    <bean
+        class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
+        id="TimestampSignEncrypt_Response">
+        <constructor-arg>
+            <map>
+                <entry key="action" value="Timestamp Signature Encrypt"/>
+                <entry key="user" value="bob"/>
+                <entry key="signaturePropFile" value="org/apache/servicemix/cxfbc/ws/security/bob.properties"/>
+                <entry key="encryptionPropFile" value="org/apache/servicemix/cxfbc/ws/security/alice.properties"/>
+                <entry key="encryptionUser" value="Alice"/>
+                <entry key="signatureKeyIdentifier" value="DirectReference"/>
+                <entry key="passwordCallbackClass" value="org.apache.servicemix.cxfbc.ws.security.KeystorePasswordCallback"/>
+                <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+                <!-- -->
+                <!-- Recommendation: signatures should be encrypted -->
+                <!-- -->
+                <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+                <!-- <entry key="encryptionKeyTransportAlgorithm" value="RSA15"/>
-->
+                <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
+            </map>
+        </constructor-arg>
+    </bean>
+    <bean
+        class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"
+        id="TimestampSignEncrypt_Request">
+        <constructor-arg>
+            <map>
+                <!-- Use this action order for local clients -->
+                <entry key="action" value="Timestamp Signature Encrypt"/>
+                <!-- Use this action spec for WCF clients
+                <entry key="action" value="Signature Encrypt Timestamp"/>
+                -->
+                <entry key="signaturePropFile" value="org/apache/servicemix/cxfbc/ws/security/alice.properties"/>
+                <entry key="decryptionPropFile" value="org/apache/servicemix/cxfbc/ws/security/bob.properties"/>
+                <entry key="passwordCallbackClass" value="org.apache.servicemix.cxfbc.ws.security.KeystorePasswordCallback"/>
+            </map>
+        </constructor-arg>
+    </bean>
+    
+</beans>

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message