servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r608750 [1/3] - in /servicemix/smx4/features/trunk/camel/servicemix-camel: ./ src/test/java/org/apache/servicemix/camel/ src/test/java/org/apache/servicemix/camel/ws/ src/test/java/org/apache/servicemix/camel/ws/addressing/ src/test/java/or...
Date Fri, 04 Jan 2008 05:49:13 GMT
Author: ffang
Date: Thu Jan  3 21:48:54 2008
New Revision: 608750

URL: http://svn.apache.org/viewvc?rev=608750&view=rev
Log:
[SM-1128] verify we can support cxf ws-* based on camel cxf transport. camel cxf transport just use cxf transport api and can use camel supporting protocol as underlying protocol, for example we can use jetty which is supported by camel, instead of http transport from cxf. So far test for ws-security and ws-policy is done, test for ws-addressing and ws-rm is still in progress, seems we need complete back channel of camel cxf transport in apache camel project. 
Notes: to run the test, need patch for CAMEL-275 get applied

Added:
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/message-loss-server.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/message-loss.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/no-offer.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/pmd-eclipse.log
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/rminterceptors.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/seqlength1.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/seqlength10.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/sequence.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/server.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/suppressed.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/terminate-on-shutdown.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/twoway-endpoint-specific.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.properties   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.properties   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/client.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world.wsdl   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world_base.wsdl   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml   (with props)
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml.bak
Modified:
    servicemix/smx4/features/trunk/camel/servicemix-camel/pom.xml
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/AttachmentTest.java
    servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ExceptionHandleTest.java

Modified: servicemix/smx4/features/trunk/camel/servicemix-camel/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/pom.xml?rev=608750&r1=608749&r2=608750&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/pom.xml (original)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/pom.xml Thu Jan  3 21:48:54 2008
@@ -62,6 +62,11 @@
             <artifactId>camel-cxf</artifactId>
             <version>${camel.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-jetty</artifactId>
+            <version>${camel.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.camel</groupId>
@@ -81,27 +86,30 @@
             <version>${junit.version}</version>
             <scope>test</scope>
         </dependency>
-        <!--dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.jaxb-impl-${jaxb.impl.version}</artifactId>
-            <version>${pom.version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.jaxb-api-${jaxb.api.version}</artifactId>
-            <version>${pom.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.cxf</artifactId>
-            <version>${cxf.version}-${pom.version}</version>
-        </dependency-->
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-testutils</artifactId>
             <version>${cxf.version}</version>
-            <!--scope>test</scope-->
+        </dependency>
+        <dependency>
+          <groupId>org.apache.cxf</groupId>
+          <artifactId>cxf-rt-ws-policy</artifactId>
+          <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.cxf</groupId>
+          <artifactId>cxf-rt-ws-addr</artifactId>
+          <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.cxf</groupId>
+          <artifactId>cxf-rt-ws-rm</artifactId>
+          <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.cxf</groupId>
+          <artifactId>cxf-rt-ws-security</artifactId>
+          <version>${cxf.version}</version>
         </dependency>
     </dependencies>
 
@@ -116,6 +124,27 @@
                         <Export-Package>${pom.artifactId}</Export-Package>
                         <DynamicImport-Package>*</DynamicImport-Package>
                     </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <forkMode>pertest</forkMode>
+                    <systemProperties>
+                        <property>
+                            <name>javax.xml.parsers.DocumentBuilderFactory</name>
+                            <value>com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</value>
+                        </property>
+                        <property>
+                            <name>javax.xml.datatype.DatatypeFactory</name>
+                            <value>com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl</value>
+                        </property>
+                        <property>
+                            <name>javax.xml.parsers.SAXParserFactory</name>
+                            <value>com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</value>
+                        </property>
+                    </systemProperties>
                 </configuration>
             </plugin>
          </plugins>

Modified: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/AttachmentTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/AttachmentTest.java?rev=608750&r1=608749&r2=608750&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/AttachmentTest.java (original)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/AttachmentTest.java Thu Jan  3 21:48:54 2008
@@ -117,7 +117,7 @@
     public void testAttachment() throws Exception {  
     	TestMtom mtomPort = createPort(MTOM_SERVICE, MTOM_PORT, TestMtom.class,
                 true);
-        try {
+    	try {
             
             Holder<DataHandler> param = new Holder<DataHandler>();
             

Modified: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ExceptionHandleTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ExceptionHandleTest.java?rev=608750&r1=608749&r2=608750&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ExceptionHandleTest.java (original)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ExceptionHandleTest.java Thu Jan  3 21:48:54 2008
@@ -25,12 +25,17 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.transport.CamelTransportFactory;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.hello_world_soap_http.BadRecordLitFault;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
@@ -41,7 +46,7 @@
 
 
 public class ExceptionHandleTest extends ContextTestSupport {
-	protected static final String ROUTER_ADDRESS = "http://localhost:9000/SoapContext/SoapPort";
+	protected static final String ROUTER_ADDRESS = "camel://jetty:http://localhost:9000/SoapContext/SoapPort";
     protected static final String SERVICE_ADDRESS = "local://smx/hello_world";
     protected static final String SERVICE_CLASS = "serviceClass=org.apache.hello_world_soap_http.Greeter";
     private static final String WSDL_LOCATION = "wsdlURL=/wsdl/hello_world.wsdl";
@@ -93,7 +98,10 @@
     
     protected CamelContext createCamelContext() throws Exception {
     	camelContext = new DefaultCamelContext();
-    	
+    	Bus bus = BusFactory.getDefaultBus();
+    	CamelTransportFactory camelTransportFactory = (CamelTransportFactory) bus.getExtension(ConduitInitiatorManager.class)
+        	.getConduitInitiator(CamelTransportFactory.TRANSPORT_ID);
+    	camelTransportFactory.setCamelContext(camelContext);
     	smxComponent = new ServiceMixComponent();
     	nmr = new ServiceMix();
     	((ServiceMix)nmr).init();
@@ -130,9 +138,9 @@
             BindingProvider bp = (BindingProvider)greeter;
             Map<String, Object> responseContext = bp.getResponseContext();
             String contentType = (String) responseContext.get(Message.CONTENT_TYPE);
-            assertEquals("text/xml; charset=utf-8", contentType);
+            assertEquals("text/xml", contentType);
             Integer responseCode = (Integer) responseContext.get(Message.RESPONSE_CODE);
-            assertEquals(500, responseCode.intValue());                
+            assertEquals(200, responseCode.intValue());                
             assertNotNull(brlf.getFaultInfo());
             assertEquals("BadRecordLitFault", brlf.getFaultInfo());
         }
@@ -149,5 +157,12 @@
         ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
         ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
         greeter.greetMeOneWay("test oneway");
+    }
+    
+    public void testGetTransportFactoryFromBus() throws Exception {
+    	Bus bus = BusFactory.getDefaultBus();
+    	
+    	assertNotNull(bus.getExtension(ConduitInitiatorManager.class)
+        	.getConduitInitiator(CamelTransportFactory.TRANSPORT_ID));
     }
 }

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,25 @@
+/*
+ * 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.camel.ws.addressing;
+
+import org.apache.camel.ContextTestSupport;
+
+public class WSAddressingTest extends ContextTestSupport {
+   public void testAddressing() throws Exception {
+       //ws-addressing is in progress
+   }	
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/addressing/WSAddressingTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.camel.ws.policy;
+
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transports.http.configuration.ConnectionType;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+
+public final class ConnectionHelper {
+    private ConnectionHelper() {
+    }
+
+    public static void setKeepAliveConnection(Object proxy, boolean keepAlive) {
+        Client client = ClientProxy.getClient(proxy);
+        HTTPConduit hc = (HTTPConduit) client.getConduit();
+        HTTPClientPolicy cp = hc.getClient();
+        cp.setConnection(keepAlive ? ConnectionType.KEEP_ALIVE
+                : ConnectionType.CLOSE);
+    }
+
+    public static boolean isKeepAliveConnection(Object proxy) {
+        Client client = ClientProxy.getClient(proxy);
+        HTTPConduit hc = (HTTPConduit) client.getConduit();
+        HTTPClientPolicy cp = hc.getClient();
+        return cp.getConnection() == ConnectionType.KEEP_ALIVE;
+    }
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/ConnectionHelper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,29 @@
+/*
+ * 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.camel.ws.policy;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+
+@WebService(serviceName = "BasicGreeterService", 
+        portName = "GreeterPort", 
+        endpointInterface = "org.apache.cxf.greeter_control.Greeter", 
+        targetNamespace = "http://cxf.apache.org/greeter_control")
+public class GreeterImpl extends AbstractGreeterImpl {
+	
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,167 @@
+/*
+ * 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.camel.ws.policy;
+
+import java.net.URL;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.transport.CamelTransportFactory;
+import org.apache.camel.spring.SpringCamelContext;
+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.endpoint.ClientImpl;
+import org.apache.cxf.endpoint.ServerImpl;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.greeter_control.BasicGreeterService;
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.PingMeFault;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.servicemix.camel.ServiceMixComponent;
+import org.apache.servicemix.nmr.api.NMR;
+import org.apache.servicemix.nmr.core.ServiceMix;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class WSPolicyTest extends ContextTestSupport {
+	
+	private static final Logger LOG = LogUtils.getL7dLogger(WSPolicyTest.class);
+    
+    protected static final String SERVICE_ADDRESS = "local://smx/hello_world";
+
+    
+    protected AbstractXmlApplicationContext applicationContext;
+
+    
+    private ServerImpl server;
+    private CamelContext camelContext;
+    private ServiceMixComponent smxComponent;
+    private NMR nmr;
+    private Bus bus;
+    
+    @Override
+    protected void setUp() throws Exception {
+    	applicationContext = createApplicationContext();
+        super.setUp();        
+        startService();
+
+    }
+    
+
+    
+    protected void startService() {
+    	Object implementor = new GreeterImpl();
+    	javax.xml.ws.Endpoint.publish(SERVICE_ADDRESS, implementor);
+ 
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	if (applicationContext != null) {
+            applicationContext.destroy();
+        }
+        if (server != null) {
+            server.stop();
+        }
+    }
+  
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+            	from("cxf:bean:routerEndpoint").to("smx:testEndpoint");
+            	from("smx:testEndpoint").to("cxf:bean:serviceEndpoint");       
+            }
+        };
+    }
+    
+    protected CamelContext createCamelContext() throws Exception {
+    	camelContext = SpringCamelContext.springCamelContext(applicationContext);
+    	SpringBusFactory bf = new SpringBusFactory();
+        bus = bf
+                .createBus("/org/apache/servicemix/camel/ws/policy/addr.xml");
+        BusFactory.setDefaultBus(bus);
+    	CamelTransportFactory camelTransportFactory = (CamelTransportFactory) bus.getExtension(ConduitInitiatorManager.class)
+        	.getConduitInitiator(CamelTransportFactory.TRANSPORT_ID);
+    	camelTransportFactory.setCamelContext(camelContext);
+    	smxComponent = new ServiceMixComponent();
+    	nmr = new ServiceMix();
+    	((ServiceMix)nmr).init();
+    	smxComponent.setNmr(nmr);
+    	camelContext.addComponent("smx", smxComponent);
+        return camelContext;
+    }
+    
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/camel/ws/policy/server.xml");
+    }
+    
+    public void testUsingAddressing() throws Exception {
+    	SpringBusFactory bf = new SpringBusFactory();
+    	bus = bf
+        	.createBus("/org/apache/servicemix/camel/ws/policy/addr.xml");
+        LoggingInInterceptor in = new LoggingInInterceptor();
+        bus.getInInterceptors().add(in);
+        bus.getInFaultInterceptors().add(in);
+        LoggingOutInterceptor out = new LoggingOutInterceptor();
+        bus.getOutInterceptors().add(out);
+        bus.getOutFaultInterceptors().add(out);
+        URL wsdl = getClass().getResource("/wsdl/greeter_control.wsdl");
+        QName serviceName = new QName("http://cxf.apache.org/greeter_control",
+                                      "BasicGreeterService");
+        BasicGreeterService gs = new BasicGreeterService(wsdl, serviceName);
+        final Greeter greeter = gs.getGreeterPort();
+        LOG.info("Created greeter client.");
+        if ("HP-UX".equals(System.getProperty("os.name"))) {
+            ConnectionHelper.setKeepAliveConnection(greeter, true);
+        }
+
+        //set timeout to 30 secs to avoid intermitly failed
+        ((ClientImpl)ClientProxy.getClient(greeter)).setSynchronousTimeout(30000);
+        
+        // oneway
+        greeter.greetMeOneWay("CXF");
+
+        // two-way
+
+        assertEquals("CXF", greeter.greetMe("cxf"));
+
+        // exception
+
+        try {
+            greeter.pingMe();
+        } catch (PingMeFault ex) {
+            fail("First invocation should have succeeded.");
+        }
+
+        try {
+            greeter.pingMe();
+            fail("Expected PingMeFault not thrown.");
+        } catch (PingMeFault ex) {
+            assertEquals(2, (int) ex.getFaultInfo().getMajor());
+            assertEquals(1, (int) ex.getFaultInfo().getMinor());
+        }
+    }
+	
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/policy/WSPolicyTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,142 @@
+/*
+ * 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.camel.ws.rm;
+
+import java.util.concurrent.Future;
+import java.util.logging.Logger;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.greeter_control.PingMeFault;
+import org.apache.cxf.greeter_control.types.FaultDetail;
+import org.apache.cxf.greeter_control.types.GreetMeResponse;
+import org.apache.cxf.greeter_control.types.PingMeResponse;
+import org.apache.cxf.greeter_control.types.SayHiResponse;
+@WebService(serviceName = "GreeterService",
+        portName = "GreeterPort",
+        endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+        targetNamespace = "http://cxf.apache.org/greeter_control")
+public class GreeterImpl {
+    private static final Logger LOG = LogUtils.getL7dLogger(GreeterImpl.class);
+    private long delay;
+    private String lastOnewayArg;
+    private boolean throwAlways;
+    private boolean useLastOnewayArg;
+    private int pingMeCount;
+     
+    public long getDelay() {
+        return delay;
+    }
+
+    public void setDelay(long d) {
+        delay = d;
+    }
+
+    public void resetLastOnewayArg() {
+        lastOnewayArg = null;
+    }
+
+    public void useLastOnewayArg(Boolean use) {
+        useLastOnewayArg = use;
+    }
+
+    public void setThrowAlways(boolean t) {
+        throwAlways = t;
+    }
+
+    public String greetMe(String arg0) {
+        LOG.info("Executing operation greetMe with parameter: " + arg0);
+        if ("twoway".equals(arg0)) {
+            useLastOnewayArg(true);
+            setDelay(5000);
+        }
+        /*if (delay > 0) {
+            try {
+                Thread.sleep(delay);
+            } catch (InterruptedException ex) {
+                // ignore
+            }
+        }*/
+        String result = null;
+        synchronized (this) {
+            result = useLastOnewayArg ? lastOnewayArg : arg0.toUpperCase();
+        }
+        LOG.fine("returning: " + result);
+        return "result";
+    }
+
+    public Future<?> greetMeAsync(String arg0, AsyncHandler<GreetMeResponse> arg1) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<GreetMeResponse> greetMeAsync(String arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void greetMeOneWay(String arg0) {
+        synchronized (this) {
+            lastOnewayArg = arg0;
+        }
+        LOG.info("Executing operation greetMeOneWay with parameter: " + arg0);
+    }
+
+    public void pingMe() throws PingMeFault {
+        pingMeCount++;
+        if ((pingMeCount % 2) == 0 || throwAlways) {
+            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
+            FaultDetail fd = new FaultDetail();
+            fd.setMajor((short)2);
+            fd.setMinor((short)1);
+            throw new PingMeFault("Pings succeed only every other time.", fd);
+        } else {
+            LOG.fine("Executing operation pingMe");        
+        }
+    }
+
+    public Response<PingMeResponse> pingMeAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String sayHi() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<SayHiResponse> sayHiAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}
+
+

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,38 @@
+/*
+ * 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.camel.ws.rm;
+
+import org.apache.cxf.greeter_control.Greeter;
+
+public class TwowayThread extends Thread {
+    
+    private String response;
+    private Greeter greeter;
+    public TwowayThread(Greeter gr) {
+        greeter = gr;
+    }
+    @Override
+    public void run() {
+        
+        response = greeter.greetMe("twoway");
+    }
+    
+    public String getResponse() {
+        return response;
+    }
+
+}
\ No newline at end of file

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/TwowayThread.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,158 @@
+/*
+ * 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.camel.ws.rm;
+
+import java.net.URL;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.transport.CamelTransportFactory;
+import org.apache.camel.spring.SpringCamelContext;
+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.endpoint.ServerImpl;
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.GreeterService;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.servicemix.camel.ServiceMixComponent;
+import org.apache.servicemix.camel.ws.policy.ConnectionHelper;
+import org.apache.servicemix.nmr.api.NMR;
+import org.apache.servicemix.nmr.core.ServiceMix;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+
+public class WSRMTest extends ContextTestSupport {
+	
+	private static final Logger LOG = LogUtils.getL7dLogger(WSRMTest.class);
+    
+    protected static final String SERVICE_ADDRESS = "local://smx/hello_world";
+
+    
+    protected AbstractXmlApplicationContext applicationContext;
+
+    
+    private ServerImpl server;
+    private CamelContext camelContext;
+    private ServiceMixComponent smxComponent;
+    private NMR nmr;
+    private Bus bus;
+    
+    @Override
+    protected void setUp() throws Exception {
+    	applicationContext = createApplicationContext();
+        super.setUp();        
+        startService();
+
+    }
+    
+
+    
+    protected void startService() {
+    	Object implementor = new GreeterImpl();
+    	javax.xml.ws.Endpoint.publish(SERVICE_ADDRESS, implementor);
+ 
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	if (applicationContext != null) {
+            applicationContext.destroy();
+        }
+        if (server != null) {
+            server.stop();
+        }
+    }
+  
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+            	from("cxf:bean:routerEndpoint").to("smx:testEndpoint");
+            	from("smx:testEndpoint").to("cxf:bean:serviceEndpoint");       
+            }
+        };
+    }
+    
+    protected CamelContext createCamelContext() throws Exception {
+    	camelContext = SpringCamelContext.springCamelContext(applicationContext);
+    	SpringBusFactory bf = new SpringBusFactory();
+        bus = bf.createBus();
+        BusFactory.setDefaultBus(bus);
+    	CamelTransportFactory camelTransportFactory = (CamelTransportFactory) bus.getExtension(ConduitInitiatorManager.class)
+        	.getConduitInitiator(CamelTransportFactory.TRANSPORT_ID);
+    	camelTransportFactory.setCamelContext(camelContext);
+    	smxComponent = new ServiceMixComponent();
+    	nmr = new ServiceMix();
+    	((ServiceMix)nmr).init();
+    	smxComponent.setNmr(nmr);
+    	camelContext.addComponent("smx", smxComponent);
+        return camelContext;
+    }
+    
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/camel/ws/rm/server.xml");
+    }
+    
+    //ws-rm is in progress
+    public void testDecoupled() throws Exception {
+    	/*SpringBusFactory bf = new SpringBusFactory();
+        bus = bf.createBus("/org/apache/servicemix/camel/ws/rm/decoupled.xml");
+    	BusFactory.setDefaultBus(bus);
+        LoggingInInterceptor in = new LoggingInInterceptor();
+        bus.getInInterceptors().add(in);
+        bus.getInFaultInterceptors().add(in);
+        LoggingOutInterceptor out = new LoggingOutInterceptor();
+        bus.getOutInterceptors().add(out);
+        bus.getOutFaultInterceptors().add(out);
+        QName serviceName = new QName("http://cxf.apache.org/greeter_control", "GreeterService");
+        URL wsdl = new ClassPathResource("/wsdl/greeter_control.wsdl").getURL();
+        GreeterService gs = new GreeterService(wsdl, serviceName);
+        final Greeter greeter = gs.getGreeterPort();
+        LOG.fine("Created greeter client.");
+       
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
+
+                
+        TwowayThread t = new TwowayThread(greeter);    
+        t.start();
+        
+        // allow for partial response to twoway request to arrive
+        
+        long wait = 3000;
+        while (wait > 0) {
+            long start = System.currentTimeMillis();
+            try {
+                Thread.sleep(wait);
+            } catch (InterruptedException ex) {
+                // ignore
+            }
+            wait -= System.currentTimeMillis() - start;
+        }
+
+        //greeter.greetMeOneWay("oneway");
+        t.join();
+        assertEquals("Unexpected response to twoway request", "oneway", t.getResponse());*/
+    }
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/rm/WSRMTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,34 @@
+/*
+ * 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.camel.ws.security;
+
+@javax.jws.WebService(
+	    serviceName = "SOAPServiceWSSecurity", 
+	    portName = "TimestampSignEncrypt", 
+	    endpointInterface = "org.apache.hello_world_soap_http.Greeter",
+	    targetNamespace = "http://apache.org/hello_world_soap_http",
+	    wsdlLocation = "org/apache/servicemix/camel/ws/security/hello_world.wsdl"
+	)
+	public class GreeterImpl 
+	    extends org.apache.hello_world_soap_http.GreeterImpl {
+
+	    public String greetMe(String me) {
+	        System.out.println("\n\n*** GreetMe called with: " + me + "***\n\n");
+	        return "Hello " + me;
+	    }
+	    
+	}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,62 @@
+/*
+ * 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.camel.ws.security;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+public class KeystorePasswordCallback implements CallbackHandler {
+    
+    private Map<String, String> passwords = 
+        new HashMap<String, String>();
+    
+    public KeystorePasswordCallback() {
+        passwords.put("alice", "password");
+        passwords.put("bob", "password");
+    }
+
+    /**
+     * It attempts to get the password from the private 
+     * alias/passwords map.
+     */
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+            String pass = passwords.get(pc.getIdentifer());
+            if (pass != null) {
+                pc.setPassword(pass);
+                return;
+            }
+        }
+    }
+    
+    /**
+     * Add an alias/password pair to the callback mechanism.
+     */
+    public void setAliasPassword(String alias, String password) {
+        passwords.put(alias, password);
+    }
+}
+

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/KeystorePasswordCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java Thu Jan  3 21:48:54 2008
@@ -0,0 +1,147 @@
+/*
+ * 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.camel.ws.security;
+
+import java.util.logging.Logger;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.transport.CamelTransportFactory;
+import org.apache.camel.spring.SpringCamelContext;
+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.endpoint.ServerImpl;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.servicemix.camel.ServiceMixComponent;
+import org.apache.servicemix.nmr.api.NMR;
+import org.apache.servicemix.nmr.core.ServiceMix;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class WSSecurityTest extends ContextTestSupport {
+	
+	private static final Logger LOG = LogUtils.getL7dLogger(WSSecurityTest.class);
+    
+    private static final java.net.URL WSDL_LOC;
+    static {
+        java.net.URL tmp = null;
+        try {
+            tmp = WSSecurityTest.class.getClassLoader().getResource(
+                "org/apache/servicemix/camel/ws/security/hello_world.wsdl"
+            );
+        } catch (final Exception e) {
+            e.printStackTrace();
+        }
+        WSDL_LOC = tmp;
+    }
+    
+
+    protected static final String SERVICE_ADDRESS = "local://smx/hello_world";
+
+    
+    protected AbstractXmlApplicationContext applicationContext;
+
+    
+    private ServerImpl server;
+    private CamelContext camelContext;
+    private ServiceMixComponent smxComponent;
+    private NMR nmr;
+    
+    @Override
+    protected void setUp() throws Exception {
+    	applicationContext = createApplicationContext();
+        super.setUp();        
+        startService();
+
+    }
+    
+
+    
+    protected void startService() {
+    	Object implementor = new GreeterImpl();
+    	javax.xml.ws.Endpoint.publish(SERVICE_ADDRESS, implementor);
+ 
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	if (applicationContext != null) {
+            applicationContext.destroy();
+        }
+        if (server != null) {
+            server.stop();
+        }
+    }
+  
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+            	from("cxf:bean:routerEndpoint").to("smx:testEndpoint");
+            	from("smx:testEndpoint").to("cxf:bean:serviceEndpoint");       
+            }
+        };
+    }
+    
+    protected CamelContext createCamelContext() throws Exception {
+    	camelContext = SpringCamelContext.springCamelContext(applicationContext);
+    	Bus bus = new SpringBusFactory().createBus(); 
+    	CamelTransportFactory camelTransportFactory = (CamelTransportFactory) bus.getExtension(ConduitInitiatorManager.class)
+        	.getConduitInitiator(CamelTransportFactory.TRANSPORT_ID);
+    	camelTransportFactory.setCamelContext(camelContext);
+    	smxComponent = new ServiceMixComponent();
+    	nmr = new ServiceMix();
+    	((ServiceMix)nmr).init();
+    	smxComponent.setNmr(nmr);
+    	camelContext.addComponent("smx", smxComponent);
+        return camelContext;
+    }
+    
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/camel/ws/security/server.xml");
+    }
+    
+    public void testTimestampSignEncrypt() {
+        LOG.info("test security");
+        Bus bus = new SpringBusFactory().createBus(
+                "org/apache/servicemix/camel/ws/security/client.xml"); 
+        BusFactory.setDefaultBus(bus);
+        LoggingInInterceptor in = new LoggingInInterceptor();
+        bus.getInInterceptors().add(in);
+        bus.getInFaultInterceptors().add(in);
+        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,
+                new javax.xml.namespace.QName(
+                        "http://apache.org/hello_world_soap_http",
+                        "SOAPServiceWSSecurity"));
+        final Greeter greeter = svc.getPort(new javax.xml.namespace.QName(
+                "http://apache.org/hello_world_soap_http",
+                "TimestampSignEncrypt"), Greeter.class);
+        String ret = greeter.sayHi();
+        assertEquals(ret, "Bonjour");
+        ret = greeter.greetMe("ffang");
+        assertEquals(ret, "Hello ffang");
+    }
+	
+}

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/java/org/apache/servicemix/camel/ws/security/WSSecurityTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,33 @@
+<?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.
+-->
+<attachments xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
+    <wsp:PolicyAttachment>
+        <wsp:AppliesTo>
+            <wsa:EndpointReference>
+                <wsa:Address>http://localhost:9020/SoapContext/GreeterPort</wsa:Address>
+            </wsa:EndpointReference>
+        </wsp:AppliesTo>
+        <wsp:Policy>
+            <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+                <wsp:Policy/>
+            </wsam:Addressing>
+        </wsp:Policy>
+    </wsp:PolicyAttachment>    
+</attachments>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr-external.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,41 @@
+<?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:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <http:conduit name="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit">
+      <http:client DecoupledEndpoint="http://localhost:9999/decoupled_endpoint"/>
+    </http:conduit>
+
+    <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.spring.InitializingPolicyEngine">
+        <property name="bus" ref="cxf"/>
+        <property name="enabled" value="true"/>
+    </bean>
+
+    <bean class="org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider">
+        <constructor-arg ref="cxf"/>
+        <property name="location" value="org/apache/servicemix/camel/ws/policy/addr-external.xml"/>
+    </bean>
+
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/addr.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,45 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://cxf.apache.org/greeter_control"
+    xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
+    xmlns:smx="http://servicemix.apache.org/camelEndpoint/"
+    xsi:schemaLocation="
+        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
+        http://activemq.apache.org/camel/schema/cxfEndpoint http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
+        http://servicemix.apache.org/camelEndpoint/ http://servicemix.apache.org/camelEndpoint/.xsd
+
+    ">
+
+    
+    <cxf:cxfEndpoint id="routerEndpoint" name="test:GreeterPort" address="camel://jetty:http://localhost:9020/SoapContext/GreeterPort"  serviceClass="org.apache.cxf.greeter_control.Greeter">
+        <cxf:features>
+            <bean class="org.apache.cxf.feature.LoggingFeature"/>
+        </cxf:features>
+    </cxf:cxfEndpoint>
+
+
+    <cxf:cxfEndpoint id="serviceEndpoint" address="local://smx/hello_world"
+      serviceClass="org.apache.cxf.greeter_control.Greeter"/>
+
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,69 @@
+<?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://cxf.apache.org/greeter_control">
+  
+  <sm:container id="jbi" embedded="true">
+    
+    <sm:endpoints>
+      <cxfse:endpoint>
+        <cxfse:pojo>
+          <bean class="org.apache.servicemix.cxfbc.ws.policy.GreeterImpl" />
+        </cxfse:pojo>
+        <cxfse:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inInterceptors>
+        <cxfse:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outInterceptors>
+        <cxfse:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inFaultInterceptors>
+        <cxfse:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outFaultInterceptors>
+      </cxfse:endpoint>
+      <cxfbc:consumer wsdl="/wsdl/greeter_control.wsdl"
+                      targetEndpoint="GreeterPort"
+                      targetService="greeter:BasicGreeterService"
+		      targetInterface="greeter:Greeter"
+                      busCfg="org/apache/servicemix/cxfbc/ws/policy/addr.xml"
+                      >
+        <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>
+    
+  </sm:container>
+  
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/policy/xbean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,45 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+	xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+	xsi:schemaLocation="
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<import resource="rminterceptors.xml" />
+
+	<wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">
+        <wsrm-policy:RMAssertion>
+			<wsrm-policy:BaseRetransmissionInterval Milliseconds="60000" />
+			<wsrm-policy:AcknowledgementInterval Milliseconds="10000" />
+		</wsrm-policy:RMAssertion>
+		<wsrm-mgr:deliveryAssurance>
+			<wsrm-mgr:AtMostOnce />
+		</wsrm-mgr:deliveryAssurance>
+		<wsrm-mgr:destinationPolicy>
+			<wsrm-mgr:acksPolicy intraMessageThreshold="0" />
+		</wsrm-mgr:destinationPolicy>
+	</wsrm-mgr:rmManager>
+
+
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/atmostonce.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,63 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+  
+    <http:conduit name="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit">
+      <http:client DecoupledEndpoint="http://localhost:9995/decoupled_endpoint"/>
+    </http:conduit>
+    
+    <bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator"/>
+    <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
+
+    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->
+
+    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
+        <property name="inInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+        <property name="inFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+        <property name="outInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+        <property name="outFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/decoupled.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,41 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xsi:schemaLocation="
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <import resource="rminterceptors.xml"/>
+    
+    <wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">
+    <wsrm-policy:RMAssertion>         
+          <wsrm-policy:BaseRetransmissionInterval Milliseconds="10000"/>           
+          <wsrm-policy:AcknowledgementInterval Milliseconds="2000"/>                                                        
+      </wsrm-policy:RMAssertion>
+      <wsrm-mgr:destinationPolicy>
+          <wsrm-mgr:acksPolicy intraMessageThreshold="0"/>                    
+      </wsrm-mgr:destinationPolicy>      
+    </wsrm-mgr:rmManager>
+    
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/deferred.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml?rev=608750&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml (added)
+++ servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml Thu Jan  3 21:48:54 2008
@@ -0,0 +1,38 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+	xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+	xsi:schemaLocation="
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<import resource="rminterceptors.xml" />
+
+	<wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">
+		<wsrm-policy:RMAssertion>
+			<wsrm-policy:InactivityTimeout Milliseconds="200" />
+		</wsrm-policy:RMAssertion>
+	</wsrm-mgr:rmManager>
+
+
+</beans>

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/inactivity-timeout.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message