camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [1/2] CAMEL-7316: change the name from ws to ahc-ws
Date Thu, 27 Mar 2014 21:21:40 GMT
Repository: camel
Updated Branches:
  refs/heads/master e135e2efc -> 0f6f2e32b


http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsEndpoint.java b/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsEndpoint.java
deleted file mode 100644
index a4988d4..0000000
--- a/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsEndpoint.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.ExecutionException;
-
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.AsyncHttpClientConfig;
-import com.ning.http.client.AsyncHttpProvider;
-import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider;
-import com.ning.http.client.websocket.WebSocket;
-import com.ning.http.client.websocket.WebSocketByteListener;
-import com.ning.http.client.websocket.WebSocketTextListener;
-import com.ning.http.client.websocket.WebSocketUpgradeHandler;
-
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.component.ahc.AhcEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class WsEndpoint extends AhcEndpoint {
-    private static final transient Logger LOG = LoggerFactory.getLogger(WsEndpoint.class);
-
-    // for using websocket streaming/fragments
-    private static final boolean GRIZZLY_AVAILABLE = 
-        probeClass("com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider");
-    
-    private WebSocket websocket;
-    private Set<WsConsumer> consumers;
-    private boolean useStreaming;
-
-    private static boolean probeClass(String name) {
-        try {
-            Class.forName(name, true, WsEndpoint.class.getClassLoader());
-            return true;
-        } catch (Throwable t) {
-            return false;
-        }
-    }
-    
-    public WsEndpoint(String endpointUri, WsComponent component) {
-        super(endpointUri, component, null);
-        this.consumers = new HashSet<WsConsumer>();
-    }
-
-    @Override
-    public WsComponent getComponent() {
-        return (WsComponent) super.getComponent();
-    }
-
-    @Override
-    public Producer createProducer() throws Exception {
-        return new WsProducer(this);
-    }
-
-    @Override
-    public Consumer createConsumer(Processor processor) throws Exception {
-        return new WsConsumer(this, processor);
-    }
-
-    WebSocket getWebSocket() {
-        synchronized (this) {
-            if (websocket == null) {
-                try { 
-                    connect();
-                } catch (Exception e) {
-                    LOG.error("Failed to connect", e);
-                }
-            }
-        }
-        return websocket;
-    }
-
-    void setWebSocket(WebSocket websocket) {
-        this.websocket = websocket;
-    }
-
-    /**
-     * @return the useStreaming
-     */
-    public boolean isUseStreaming() {
-        return useStreaming;
-    }
-
-    /**
-     * @param useStreaming the useStreaming to set
-     */
-    public void setUseStreaming(boolean useStreaming) {
-        this.useStreaming = useStreaming;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.camel.component.ahc.AhcEndpoint#createClient(com.ning.http.client.AsyncHttpClientConfig)
-     */
-    @Override
-    protected AsyncHttpClient createClient(AsyncHttpClientConfig config) {
-        AsyncHttpClient client;
-        if (config == null) {
-            config = new AsyncHttpClientConfig.Builder().build();
-        }
-        AsyncHttpProvider ahp = getAsyncHttpProvider(config);
-        if (ahp == null) {
-            client = new AsyncHttpClient(config);
-        } else {
-            client = new AsyncHttpClient(ahp, config);
-        }
-        return client; 
-    }
-
-    public void connect() throws InterruptedException, ExecutionException, IOException {
-        websocket = getClient().prepareGet(getHttpUri().toASCIIString()).execute(
-            new WebSocketUpgradeHandler.Builder()
-                .addWebSocketListener(new WsListener()).build()).get();
-    }
-    
-    @Override
-    protected void doStop() throws Exception {
-        if (websocket != null && websocket.isOpen()) {
-            websocket.close();
-        }
-        super.doStop();
-    }
-
-    void connect(WsConsumer wsConsumer) {
-        consumers.add(wsConsumer);
-    }
-
-    void disconnect(WsConsumer wsConsumer) {
-        consumers.remove(wsConsumer);
-    }
-    
-    class WsListener implements WebSocketTextListener, WebSocketByteListener {
-        private ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
-        private StringBuffer textBuffer = new StringBuffer();
-        
-        @Override
-        public void onOpen(WebSocket websocket) {
-            LOG.info("websocket opened");
-        }
-
-        @Override
-        public void onClose(WebSocket websocket) {
-            LOG.info("websocket closed");
-        }
-
-        @Override
-        public void onError(Throwable t) {
-            LOG.error("websocket on error", t);
-        }
-
-        @Override
-        public void onMessage(byte[] message) {
-            LOG.info("received message --> {}", message);
-            for (WsConsumer consumer : consumers) {
-                consumer.sendMessage(message);
-            }
-        }
-
-        @Override
-        public void onFragment(byte[] fragment, boolean last) {
-            if (LOG.isInfoEnabled()) {
-                LOG.info("received fragment({}) --> {}", last, fragment);
-            }
-            // for now, construct a memory based stream. In future, we provide a fragmented stream that can
-            // be consumed before the final fragment is added.
-            synchronized (byteBuffer) {
-                try {
-                    byteBuffer.write(fragment);
-                } catch (IOException e) {
-                    //ignore
-                }
-                if (last) {
-                    //REVIST avoid using baos/bais that waste memory
-                    byte[] msg = byteBuffer.toByteArray();
-                    for (WsConsumer consumer : consumers) {
-                        consumer.sendMessage(new ByteArrayInputStream(msg));
-                    }
-                    byteBuffer.reset();
-                }
-            }
-        }
-
-
-        @Override
-        public void onMessage(String message) {
-            LOG.info("received message --> {}", message);
-            for (WsConsumer consumer : consumers) {
-                consumer.sendMessage(message);
-            }
-        }
-
-        @Override
-        public void onFragment(String fragment, boolean last) {
-            if (LOG.isInfoEnabled()) {
-                LOG.info("received fragment({}) --> {}", last, fragment);
-            }
-            // for now, construct a memory based stream. In future, we provide a fragmented stream that can
-            // be consumed before the final fragment is added.
-            synchronized (textBuffer) {
-                textBuffer.append(fragment);
-                if (last) {
-                    //REVIST avoid using sb/car that waste memory
-                    char[] msg = new char[textBuffer.length()];
-                    textBuffer.getChars(0, msg.length, msg, 0);
-                    for (WsConsumer consumer : consumers) {
-                        consumer.sendMessage(new CharArrayReader(msg));
-                    }
-                    textBuffer.setLength(0);
-                }
-            }
-        }
-        
-    }
-    
-    protected AsyncHttpProvider getAsyncHttpProvider(AsyncHttpClientConfig config) {
-        if (GRIZZLY_AVAILABLE) {
-            return new GrizzlyAsyncHttpProvider(config);
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsProducer.java b/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsProducer.java
deleted file mode 100644
index 42776c4..0000000
--- a/components/camel-ws/src/main/java/org/apache/camel/component/ws/WsProducer.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.impl.DefaultProducer;
-
-import com.ning.http.client.websocket.WebSocket;
-
-/**
- *
- */
-public class WsProducer extends DefaultProducer {
-    private static final int DEFAULT_STREAM_BUFFER_SIZE = 127;
-    
-    private int streamBufferSize = DEFAULT_STREAM_BUFFER_SIZE;
-
-    public WsProducer(WsEndpoint endpoint) {
-        super(endpoint);
-    }
-
-    @Override
-    public WsEndpoint getEndpoint() {
-        return (WsEndpoint) super.getEndpoint();
-    }
-
-    @Override
-    public void process(Exchange exchange) throws Exception {
-        Message in = exchange.getIn();
-        Object message = in.getBody();
-        log.debug("Sending out {}", message);
-        if (message != null) {
-            if (message instanceof String) {
-                sendMessage(getWebSocket(), (String)message, ((WsEndpoint)getEndpoint()).isUseStreaming());
-            } else if (message instanceof byte[]) {
-                sendMessage(getWebSocket(), (byte[])message, ((WsEndpoint)getEndpoint()).isUseStreaming());
-            } else if (message instanceof InputStream) {
-                sendStreamMessage(getWebSocket(), (InputStream)message);
-            } else {
-                //TODO provide other binding option, for now use the converted string
-                getWebSocket().sendTextMessage(in.getMandatoryBody(String.class));
-            }
-        }
-    }
-    
-    private void sendMessage(WebSocket webSocket, String msg, boolean streaming) {
-        if (streaming) {
-            int p = 0;
-            while (p < msg.length()) {
-                if (msg.length() - p < streamBufferSize) {
-                    webSocket.streamText(msg.substring(p), true);
-                    p = msg.length();
-                } else {
-                    webSocket.streamText(msg.substring(p, streamBufferSize), false);
-                    p += streamBufferSize;
-                }
-            }
-        } else {
-            webSocket.sendTextMessage(msg);
-        }
-    }
-    
-    private void sendMessage(WebSocket webSocket, byte[] msg, boolean streaming) {
-        if (streaming) {
-            int p = 0;
-            byte[] writebuf = new byte[streamBufferSize];
-            while (p < msg.length) {
-                if (msg.length - p < streamBufferSize) {
-                    int rest = msg.length - p;
-                    // bug in grizzly? we need to create a byte array with the exact length
-                    //webSocket.stream(msg, p, rest, true);
-                    System.arraycopy(msg, p, writebuf, 0, rest);
-                    byte[] tmpbuf = new byte[rest];
-                    System.arraycopy(writebuf, 0, tmpbuf, 0, rest);
-                    webSocket.stream(tmpbuf, 0, rest, true);
-                    // ends
-                    p = msg.length;
-                } else {
-                    // bug in grizzly? we need to create a byte array with the exact length
-                    //webSocket.stream(msg, p, streamBufferSize, false);
-                    System.arraycopy(msg, p, writebuf, 0, streamBufferSize);
-                    webSocket.stream(writebuf, 0, streamBufferSize, false);
-                    // ends
-                    p += streamBufferSize;
-                }
-            }
-        } else {
-            webSocket.sendMessage(msg);
-        }
-    }
-
-    private void sendStreamMessage(WebSocket webSocket, InputStream in) throws IOException {
-        byte[] readbuf = new byte[streamBufferSize];
-        byte[] writebuf = new byte[streamBufferSize];
-        int rn = 0;
-        int wn = 0;
-        try {
-            while ((rn = in.read(readbuf, 0, readbuf.length)) != -1) {
-                if (wn > 0) {
-                    webSocket.stream(writebuf, 0, writebuf.length, false);
-                }
-                System.arraycopy(readbuf, 0, writebuf, 0, rn);
-                wn = rn;
-            }
-            // a bug in grizzly? we need to create a byte array with the exact length
-            if (wn < writebuf.length) {
-                byte[] tmpbuf = writebuf;
-                writebuf = new byte[wn];
-                System.arraycopy(tmpbuf, 0, writebuf, 0, wn);
-            } // ends
-            webSocket.stream(writebuf, 0, wn, true);
-        } finally {
-            in.close();
-        }
-    }
-    
-    private WebSocket getWebSocket() {
-        return ((WsEndpoint)getEndpoint()).getWebSocket();
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/resources/META-INF/LICENSE.txt b/components/camel-ws/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/components/camel-ws/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/resources/META-INF/NOTICE.txt b/components/camel-ws/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/components/camel-ws/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-   =========================================================================
-   ==  NOTICE file corresponding to the section 4 d of                    ==
-   ==  the Apache License, Version 2.0,                                   ==
-   ==  in this case for the Apache Camel distribution.                    ==
-   =========================================================================
-
-   This product includes software developed by
-   The Apache Software Foundation (http://www.apache.org/).
-
-   Please read the different LICENSE files present in the licenses directory of
-   this distribution.

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/ws
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/ws b/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/ws
deleted file mode 100644
index a6c78cb..0000000
--- a/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/ws
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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.
-#
-
-class=org.apache.camel.component.ws.WsComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/wss
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/wss b/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/wss
deleted file mode 100644
index a6c78cb..0000000
--- a/components/camel-ws/src/main/resources/META-INF/services/org/apache/camel/component/wss
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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.
-#
-
-class=org.apache.camel.component.ws.WsComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/TestServlet.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/TestServlet.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/TestServlet.java
deleted file mode 100644
index 1b7bb4d..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/TestServlet.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.apache.camel.component.ws;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.eclipse.jetty.websocket.WebSocket;
-import org.eclipse.jetty.websocket.WebSocketServlet;
-
-public class TestServlet extends WebSocketServlet {
-    private static final byte OPCODE_CONTINUATION = 0x00;
-    private static final byte OPCODE_TEXT = 0x01;
-    private static final byte OPCODE_BINARY = 0x02;
-    private static final byte FLAGS_FINAL = 0x08;
-    
-    private static final long serialVersionUID = 1L;
-    
-    private List<Object> messages;
-    
-    public TestServlet(List<Object> messages) {
-        this.messages = messages;
-    }
-
-    @Override
-    public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) {
-        return new TestWsSocket();
-    }
-
-    private class TestWsSocket implements WebSocket.OnTextMessage, WebSocket.OnBinaryMessage,
-        WebSocket.OnFrame {
-        protected Connection con;
-        protected ByteArrayOutputStream frameBuffer = new ByteArrayOutputStream();
-        
-        @Override
-        public void onOpen(Connection connection) {
-            con = connection;
-        }
-
-        @Override
-        public void onClose(int i, String s) {
-        }
-
-        @Override
-        public void onMessage(String data) {
-            try {
-                messages.add(data);
-                con.sendMessage(data);
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-
-        @Override
-        public void onMessage(byte[] data, int offset, int length) {
-            try {
-                if (length < data.length) {
-                    byte[] odata = data;
-                    data = new byte[length];
-                    System.arraycopy(odata, offset, data, 0, length);
-                    offset = 0;
-                }
-                messages.add(data);
-                con.sendMessage(data, offset, length);
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        public void onMessage(byte[] data, int offset, int length, boolean last) {
-            frameBuffer.write(data, offset, length);
-            if (last) {
-                data = frameBuffer.toByteArray();
-                frameBuffer.reset();
-                messages.add(data);
-                try {
-                    con.sendMessage(data, 0, data.length);
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        
-        @Override
-        public boolean onFrame(byte flags, byte opcode, byte[] data, int offset, int length) {
-            if (OPCODE_TEXT == opcode || OPCODE_BINARY == opcode) {
-                if (0 != (FLAGS_FINAL & flags)) {
-                    // a non-framed text or binary
-                    return false;
-                }
-                onMessage(data, offset, length, false);
-                return true;
-            } else if (OPCODE_CONTINUATION == opcode) {
-                boolean f = 0 != (FLAGS_FINAL & flags);
-                onMessage(data, offset, length, f);
-                return !f;
-            }
-            return false;
-        }
-
-        @Override
-        public void onHandshake(FrameConnection connection) {
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerConsumerTest.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerConsumerTest.java
deleted file mode 100644
index 2a5fb1f..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerConsumerTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 
- */
-package org.apache.camel.component.ws;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.junit.Test;
-
-/**
- *
- */
-public class WsProducerConsumerTest extends CamelTestSupport {
-    protected static final String TEST_MESSAGE = "Hello World!";
-
-    protected Server server;
-    protected int PORT = AvailablePortFinder.getNextAvailable();
-    protected List<Object> messages;
-    
-    public void startTestServer() throws Exception {
-        // start a simple websocket echo service
-        server = new Server();
-        Connector connector = new SelectChannelConnector();
-        connector.setHost("localhost");
-        connector.setPort(PORT);
-        server.addConnector(connector);
-        
-        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
-        context.setContextPath("/");
-        server.setHandler(context);
- 
-        messages = new ArrayList<Object>();
-        ServletHolder servletHolder = new ServletHolder(new TestServlet(messages));
-        context.addServlet(servletHolder, "/*");
-        
-        server.start();
-        System.out.println("started");
-        assertTrue(server.isStarted());
-        
-    }
-    
-    public void stopTestServer() throws Exception {
-        server.stop();
-        server.destroy();
-    }
-
-    @Override
-    public void setUp() throws Exception {
-        startTestServer();
-        super.setUp();
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        stopTestServer();
-    }
-
-    @Test
-    public void testTwoRoutes() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedBodiesReceived(TEST_MESSAGE);
-
-        template.sendBody("direct:input", TEST_MESSAGE);
-
-        mock.assertIsSatisfied();
-    }
-
-    
-    @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
-        RouteBuilder[] rbs = new RouteBuilder[2];
-        rbs[0] = new RouteBuilder() {
-            public void configure() {
-                from("direct:input")
-                    .to("ws://localhost:" + PORT);
-            }
-        };
-        rbs[1] = new RouteBuilder() {
-            public void configure() {
-                from("ws://localhost:" + PORT)
-                    .to("mock:result");
-            }
-        };
-        return rbs;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTest.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTest.java
deleted file mode 100644
index 8bea1e1..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-
-/**
- * @version 
- */
-public class WsProducerTest extends WsProducerTestBase {
-    
-    @Override
-    protected void setUpComponent() throws Exception {
-    }
-
-    @Override
-    protected Connector getConnector() throws Exception {
-        return new SelectChannelConnector();
-    }
-    
-    @Override
-    protected String getTargetURL() {
-        return "ws://localhost:" + PORT;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTestBase.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTestBase.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTestBase.java
deleted file mode 100644
index 4a19f63..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerTestBase.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.test.AvailablePortFinder;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- *
- */
-public abstract class WsProducerTestBase extends Assert {
-    
-    protected static final String TEST_MESSAGE = "Hello World!";
-    
-    protected CamelContext camelContext;
-    protected ProducerTemplate template;
-    protected Server server;
-    protected int PORT = AvailablePortFinder.getNextAvailable();
-    protected List<Object> messages;
-    
-    public void startTestServer() throws Exception {
-        // start a simple websocket echo service
-        server = new Server();
-        Connector connector = getConnector();
-        connector.setHost("localhost");
-        connector.setPort(PORT);
-        server.addConnector(connector);
-        
-        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
-        context.setContextPath("/");
-        server.setHandler(context);
- 
-        messages = new ArrayList<Object>();
-        server.setHandler(context);
-        ServletHolder servletHolder = new ServletHolder(new TestServlet(messages));
-        context.addServlet(servletHolder, "/*");
-        
-        server.start();
-        assertTrue(server.isStarted());
-        
-    }
-    
-    public void stopTestServer() throws Exception {
-        server.stop();
-        server.destroy();
-    }
-    
-    @Before
-    public void setUp() throws Exception {
-        startTestServer();
-        
-        camelContext = new DefaultCamelContext();
-        camelContext.start();
-        
-        setUpComponent();
-        template = camelContext.createProducerTemplate();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        template.stop();
-        camelContext.stop();
-        
-        stopTestServer();
-    }
-
-    protected abstract void setUpComponent() throws Exception;
-
-    protected abstract Connector getConnector() throws Exception;
-
-    protected abstract String getTargetURL();
-    
-    protected String getTextTestMessage() {
-        return TEST_MESSAGE;
-    }
-
-    protected byte[] getByteTestMessage() throws UnsupportedEncodingException {
-        return TEST_MESSAGE.getBytes("utf-8");
-    }
-    
-    @Test
-    public void testWriteToWebsocket() throws Exception {
-        String testMessage = getTextTestMessage();
-        testWriteToWebsocket(testMessage);
-        assertEquals(1, messages.size());
-        verifyMessage(testMessage, messages.get(0));
-    }
-
-    @Test
-    public void testWriteBytesToWebsocket() throws Exception {
-        byte[] testMessageBytes = getByteTestMessage();
-        testWriteToWebsocket(testMessageBytes);
-        assertEquals(1, messages.size());
-        verifyMessage(testMessageBytes, messages.get(0));
-    }
-
-    @Test
-    public void testWriteStreamToWebsocket() throws Exception {
-        byte[] testMessageBytes = createLongByteTestMessage();
-        testWriteToWebsocket(new ByteArrayInputStream(testMessageBytes)); 
-        assertEquals(1, messages.size());
-        verifyMessage(testMessageBytes, messages.get(0));
-    }
-    
-    private void testWriteToWebsocket(Object message) throws Exception {
-        Exchange exchange = sendMessage(getTargetURL(), message);
-        assertNull(exchange.getException());
-        
-        long towait = 5000;
-        while (towait > 0) {
-            if (messages.size() == 1) {
-                break;
-            }
-            towait -= 500;
-            Thread.sleep(500);
-        }
-    }
-
-    private Exchange sendMessage(String endpointUri, final Object msg) {
-        Exchange exchange = template.request(endpointUri, new Processor() {
-            public void process(final Exchange exchange) {
-                exchange.getIn().setBody(msg);
-            }
-        });
-        return exchange;
-
-    }
-
-    private void verifyMessage(Object original, Object result) {
-        if (original instanceof String && result instanceof String) {
-            assertEquals(original, result);
-        } else if (original instanceof byte[] && result instanceof byte[]) {
-            // use string-equals as our bytes are string'able
-            assertEquals(new String((byte[])original), new String((byte[])result));
-        } else if (original instanceof InputStream) {
-            assertTrue(result instanceof byte[] || result instanceof InputStream);
-            if (result instanceof byte[]) {
-                result = new ByteArrayInputStream((byte[])result);
-            }
-            try {
-                int oc = 0;
-                int or = 0;
-                while (oc != -1) {
-                    oc = ((InputStream)original).read();
-                    or = ((InputStream)result).read();
-                    assertEquals(oc, or);
-                }
-                assertEquals(-1, or);
-            } catch (Exception e) {
-                fail("unable to verify data: " + e);
-            }
-        } else {
-            fail("unexpected message type for input " + original + ": " + result);
-        }
-    }
-
-    protected byte[] createLongByteTestMessage() {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        byte[] bs = TEST_MESSAGE.getBytes();
-        try {
-            for (int i = 1; i <= 100; i++) {
-                baos.write(Integer.toString(i).getBytes());
-                baos.write(0x20);
-                baos.write(bs);
-                baos.write(';');
-            }
-        } catch (IOException e) {
-            // ignore
-        }
-        return baos.toByteArray();
-    }
-
-    protected String createLongTextTestMessage() throws Exception {
-        StringBuilder sb = new StringBuilder();
-        for (int i = 1; i <= 100; i++) {
-            sb.append(Integer.toString(i));
-            sb.append(' ');
-            sb.append(TEST_MESSAGE);
-            sb.append(';');
-        }
-        return sb.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerUsingStreamingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerUsingStreamingTest.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerUsingStreamingTest.java
deleted file mode 100644
index 6148b4c..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WsProducerUsingStreamingTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-
-/**
- * @version 
- */
-public class WsProducerUsingStreamingTest extends WsProducerTestBase {
-    
-    @Override
-    protected void setUpComponent() throws Exception {
-    }
-
-    @Override
-    protected Connector getConnector() throws Exception {
-        return new SelectChannelConnector();
-    }
-    
-    @Override
-    protected String getTextTestMessage() {
-        return super.getTextTestMessage();
-    }
-
-    @Override
-    protected byte[] getByteTestMessage() throws UnsupportedEncodingException {
-        return createLongByteTestMessage();
-    }
-
-    @Override
-    protected String getTargetURL() {
-        return "ws://localhost:" + PORT + "?useStreaming=true";
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/java/org/apache/camel/component/ws/WssProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WssProducerTest.java b/components/camel-ws/src/test/java/org/apache/camel/component/ws/WssProducerTest.java
deleted file mode 100644
index 3b3acb7..0000000
--- a/components/camel-ws/src/test/java/org/apache/camel/component/ws/WssProducerTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.camel.component.ws;
-
-import org.apache.camel.util.jsse.ClientAuthentication;
-import org.apache.camel.util.jsse.KeyManagersParameters;
-import org.apache.camel.util.jsse.KeyStoreParameters;
-import org.apache.camel.util.jsse.SSLContextParameters;
-import org.apache.camel.util.jsse.SSLContextServerParameters;
-import org.apache.camel.util.jsse.TrustManagersParameters;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-
-/**
- */
-public class WssProducerTest extends WsProducerTestBase {
-    protected static final String PW = "changeit";
-    
-    @Override
-    protected Connector getConnector() throws Exception {
-        SslContextFactory sslContextFactory = new SslContextFactory();
-        sslContextFactory.setSslContext(defineSSLContextServerParameters().createSSLContext());
-        return new SslSelectChannelConnector(sslContextFactory);
-    }
-
-    @Override
-    protected String getTargetURL() {
-        return "wss://localhost:" + PORT;
-    }
-
-    @Override
-    protected void setUpComponent() throws Exception {
-        WsComponent wsComponent = (WsComponent) camelContext.getComponent("wss");
-        wsComponent.setSslContextParameters(defineSSLContextClientParameters());
-    }
-
-    private static SSLContextParameters defineSSLContextServerParameters() {
-
-        KeyStoreParameters ksp = new KeyStoreParameters();
-        ksp.setResource("jsse/localhost.ks");
-        ksp.setPassword(PW);
-
-        KeyManagersParameters kmp = new KeyManagersParameters();
-        kmp.setKeyPassword(PW);
-        kmp.setKeyStore(ksp);
-
-        TrustManagersParameters tmp = new TrustManagersParameters();
-        tmp.setKeyStore(ksp);
-
-        // NOTE: Needed since the client uses a loose trust configuration when no ssl context
-        // is provided.  We turn on WANT client-auth to prefer using authentication
-        SSLContextServerParameters scsp = new SSLContextServerParameters();
-        scsp.setClientAuthentication(ClientAuthentication.WANT.name());
-
-        SSLContextParameters sslContextParameters = new SSLContextParameters();
-        sslContextParameters.setKeyManagers(kmp);
-        sslContextParameters.setTrustManagers(tmp);
-        sslContextParameters.setServerParameters(scsp);
-
-        return sslContextParameters;
-    }
-
-    private static SSLContextParameters defineSSLContextClientParameters() {
-        KeyStoreParameters ksp = new KeyStoreParameters();
-        ksp.setResource("jsse/localhost.ks");
-        ksp.setPassword(PW);
-
-        TrustManagersParameters tmp = new TrustManagersParameters();
-        tmp.setKeyStore(ksp);
-
-        SSLContextParameters sslContextParameters = new SSLContextParameters();
-        sslContextParameters.setTrustManagers(tmp);
-
-        return sslContextParameters;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/resources/jsse/localhost.ks
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/resources/jsse/localhost.ks b/components/camel-ws/src/test/resources/jsse/localhost.ks
deleted file mode 100644
index f285418..0000000
Binary files a/components/camel-ws/src/test/resources/jsse/localhost.ks and /dev/null differ

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/camel-ws/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-ws/src/test/resources/log4j.properties b/components/camel-ws/src/test/resources/log4j.properties
deleted file mode 100644
index 89fc1bd..0000000
--- a/components/camel-ws/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-## ------------------------------------------------------------------------
-## 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.
-## ------------------------------------------------------------------------
-
-#
-# The logging properties used for testing.
-#
-log4j.rootLogger=INFO, file
-
-# uncomment the following to enable camel debugging
-#log4j.logger.org.apache.camel.component.ahc=TRACE
-#log4j.logger.org.apache.camel.util.jsse=DEBUG
-#log4j.logger.com.ning=TRACE
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-# MDC
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{camel.breadcrumbId} - %-10.10X{camelexchangeId} - %-10.10X{camel.correlationId} - %-10.10X{camel.routeId} - %m%n
-
-# File appender
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.file=target/camel-ahc-test.log
-log4j.appender.file.append=true
-log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-# MDC
-#log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{camel.breadcrumbId} - %-10.10X{camel.exchangeId} - %-10.10X{camel.correlationId} - %-10.10X{camel.routeId} - %m%n
-

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 6e619fc..dc0ec04 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -55,6 +55,7 @@
 
     <!-- regular modules in alphabetic order -->
     <module>camel-ahc</module>
+    <module>camel-ahc-ws</module>
     <module>camel-amqp</module>
     <module>camel-apns</module>
     <module>camel-atom</module>
@@ -187,7 +188,6 @@
     <module>camel-vertx</module>
     <module>camel-weather</module>
     <module>camel-websocket</module>
-    <module>camel-ws</module>
     <module>camel-xmlbeans</module>
     <module>camel-xmljson</module>
     <module>camel-xmlrpc</module>

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index a8cf7c5..0638e61 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -520,6 +520,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-ahc-ws</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-amqp</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -1271,11 +1276,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
-        <artifactId>camel-ws</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
         <artifactId>camel-xmlbeans</artifactId>
         <version>${project.version}</version>
       </dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/0f6f2e32/platforms/karaf/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 172d925..e3ae785 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -59,6 +59,11 @@
     <bundle dependency='true'>mvn:io.netty/netty/${netty3-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-ahc/${project.version}</bundle>
   </feature>
+  <feature name='camel-ahc-ws' version='${project.version}' resolver='(obr)' start-level='50'>
+    <feature version='${project.version}'>camel-core</feature>
+    <feature version='${project.version}'>camel-ahc</feature>
+    <bundle>mvn:org.apache.camel/camel-ahc-ws/${project.version}</bundle>
+  </feature>
   <feature name='camel-amqp' version='${project.version}' resolver='(obr)' start-level='50'>
     <bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle>
     <bundle dependency='true'>mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
@@ -1187,11 +1192,6 @@
     <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-servlet_3.0_spec/${geronimo-servlet-spec-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-websocket/${project.version}</bundle>
   </feature>
-  <feature name='camel-ws' version='${project.version}' resolver='(obr)' start-level='50'>
-    <feature version='${project.version}'>camel-core</feature>
-    <feature version='${project.version}'>camel-ahc</feature>
-    <bundle>mvn:org.apache.camel/camel-ws/${project.version}</bundle>
-  </feature>
   <feature name='camel-xmlbeans' version='${project.version}' resolver='(obr)' start-level='50'>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/${ant-bundle-version}</bundle>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlbeans/${xmlbeans-bundle-version}</bundle>


Mime
View raw message