cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/3] git commit: Remove the non-working soap-tcp stuff
Date Tue, 25 Mar 2014 14:45:50 GMT
Remove the non-working soap-tcp stuff


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a63b9462
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a63b9462
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a63b9462

Branch: refs/heads/master
Commit: a63b9462813f9faff355b7e6a8b53a52ab485c0d
Parents: abe5b35
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Mar 24 14:46:23 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Mar 24 14:46:23 2014 -0400

----------------------------------------------------------------------
 rt/bindings/soap/pom.xml                        |   6 -
 .../cxf/binding/soap/SoapTransportFactory.java  |  11 +-
 .../cxf/binding/soap/tcp/BackendTcpConduit.java |  85 ------
 .../cxf/binding/soap/tcp/ChannelIdParser.java   |  71 -----
 .../cxf/binding/soap/tcp/ChannelService.java    | 168 ------------
 .../cxf/binding/soap/tcp/DataCodingUtils.java   | 197 -------------
 .../cxf/binding/soap/tcp/SoapTcpChannel.java    |  74 -----
 .../binding/soap/tcp/SoapTcpCodecFactory.java   |  44 ---
 .../binding/soap/tcp/SoapTcpDestination.java    | 195 -------------
 .../binding/soap/tcp/SoapTcpMessageDecoder.java | 117 --------
 .../binding/soap/tcp/SoapTcpMessageEncoder.java |  46 ----
 .../binding/soap/tcp/SoapTcpOutputStream.java   | 273 -------------------
 .../binding/soap/tcp/SoapTcpProtocolConsts.java |  34 ---
 .../binding/soap/tcp/SoapTcpSessionState.java   |  42 ---
 .../cxf/binding/soap/tcp/SoapTcpUtils.java      | 222 ---------------
 .../apache/cxf/binding/soap/tcp/TCPConduit.java | 181 ------------
 .../binding/soap/tcp/frames/SoapTcpFrame.java   |  44 ---
 .../frames/SoapTcpFrameContentDescription.java  |  60 ----
 .../soap/tcp/frames/SoapTcpFrameHeader.java     |  82 ------
 .../binding/soap/tcp/frames/SoapTcpMessage.java | 193 -------------
 .../cxf/binding/soap/tcp/TCPConduitTest.java    | 159 -----------
 21 files changed, 1 insertion(+), 2303 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/pom.xml
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/pom.xml b/rt/bindings/soap/pom.xml
index b926383..777443b 100644
--- a/rt/bindings/soap/pom.xml
+++ b/rt/bindings/soap/pom.xml
@@ -97,11 +97,5 @@
             <artifactId>easymock</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.mina</groupId>
-            <artifactId>mina-core</artifactId>
-            <scope>provided</scope>
-            <optional>true</optional>
-        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
index 58278d3..a72d102 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
@@ -36,8 +36,6 @@ import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.binding.soap.jms.interceptor.SoapJMSConstants;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
-import org.apache.cxf.binding.soap.tcp.SoapTcpDestination;
-import org.apache.cxf.binding.soap.tcp.TCPConduit;
 import org.apache.cxf.binding.soap.wsdl.extensions.SoapAddress;
 import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.common.util.StringUtils;
@@ -77,7 +75,7 @@ public class SoapTransportFactory extends AbstractTransportFactory implements De
             "http://www.w3.org/2003/05/soap/bindings/HTTP/");
     public static final Set<String> DEFAULT_PREFIXES 
         = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
-            "soap.udp", "soap.tcp"
+            "soap.udp"
         )));
     
     public SoapTransportFactory() {
@@ -110,9 +108,6 @@ public class SoapTransportFactory extends AbstractTransportFactory implements De
 
     public Destination getDestination(EndpointInfo ei, Bus bus) throws IOException {
         String address = ei.getAddress();
-        if (!StringUtils.isEmpty(address) && address.startsWith("soap.tcp")) {
-            return new SoapTcpDestination(ei.getTarget(), ei);
-        }
         BindingInfo bi = ei.getBinding();
         String transId = ei.getTransportId();
         if (bi instanceof SoapBindingInfo) {
@@ -202,10 +197,6 @@ public class SoapTransportFactory extends AbstractTransportFactory implements De
 
     public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target, Bus bus) throws IOException {
         String address = target == null ? ei.getAddress() : target.getAddress().getValue();
-        if (!StringUtils.isEmpty(address) && address.startsWith("soap.tcp://")) {
-            //TODO - examine policies and stuff to look for the sun tcp policies
-            return new TCPConduit(ei);
-        }
         BindingInfo bi = ei.getBinding();
         String transId = ei.getTransportId();
         if (bi instanceof SoapBindingInfo) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/BackendTcpConduit.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/BackendTcpConduit.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/BackendTcpConduit.java
deleted file mode 100644
index 57c0daf..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/BackendTcpConduit.java
+++ /dev/null
@@ -1,85 +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.cxf.binding.soap.tcp;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.Configurable;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.transport.AbstractConduit;
-import org.apache.cxf.transport.Assertor;
-import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.session.IoSession;
-
-public class BackendTcpConduit extends AbstractConduit implements Configurable, Assertor {
-    private static final Logger LOG = LogUtils.getL7dLogger(TCPConduit.class);
-    private IoSession session;
-    
-    public BackendTcpConduit(IoSession session) {
-        super(null);
-        this.session = session;
-    }
-
-    @Override
-    protected Logger getLogger() {
-        return LOG;
-    }
-
-    public String getBeanName() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void assertMessage(Message message) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public boolean canAssert(QName type) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public void prepare(Message message) throws IOException {
-        message.setContent(OutputStream.class, new ByteArrayOutputStream(512));
-    }
-
-    @Override
-    public void close(Message msg) throws IOException {
-        ByteArrayOutputStream baos = (ByteArrayOutputStream)msg.getContent(OutputStream.class);
-        Exchange exchange = msg.getExchange();
-        SoapTcpChannel channel = exchange.getInMessage().getContent(SoapTcpChannel.class);
-        String message = new String(baos.toByteArray());
-        SoapTcpMessage soapTcpMessage = SoapTcpMessage.createSoapTcpMessage(message, channel.getChannelId());
-        IoBuffer buffer = IoBuffer.allocate(512);
-        buffer.setAutoExpand(true);
-        SoapTcpUtils.writeSoapTcpMessage(buffer.asOutputStream(), soapTcpMessage);
-        buffer.flip();
-        session.write(buffer);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelIdParser.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelIdParser.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelIdParser.java
deleted file mode 100644
index 4cb457e..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelIdParser.java
+++ /dev/null
@@ -1,71 +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.cxf.binding.soap.tcp;
-
-import java.io.InputStream;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import org.apache.cxf.staxutils.StaxUtils;
-
-public final class ChannelIdParser {
-    
-    private ChannelIdParser() {
-        
-    }
-    
-    /**
-     * Method for retrieving channel id from OpenChannelResponse message.
-     * 
-     * @param in a InputStream with message
-     * @return channel id value
-     */
-    public static int getChannelId(InputStream in) {
-        XMLStreamReader streamReader = StaxUtils.createXMLStreamReader(in, null);
-        
-        try {
-            while (streamReader.hasNext()) {
-                streamReader.next();
-                int eventType = streamReader.getEventType();
-                if (eventType == XMLStreamReader.START_ELEMENT
-                    && streamReader.getLocalName().equals("openChannelResponse")) {
-                    while (streamReader.hasNext()) {
-                        streamReader.next();
-                        eventType = streamReader.getEventType();
-                        if (eventType == XMLStreamReader.START_ELEMENT
-                            && streamReader.getLocalName().equals("channelId")) {
-                            return Integer.parseInt(streamReader.getElementText());
-                        }
-                    }
-                }
-            }
-        } catch (XMLStreamException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                StaxUtils.close(streamReader);
-            } catch (XMLStreamException e) {
-                e.printStackTrace();
-            }
-        }
-        
-        return 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelService.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelService.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelService.java
deleted file mode 100644
index 3a817d2..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/ChannelService.java
+++ /dev/null
@@ -1,168 +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.cxf.binding.soap.tcp;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.session.IoSession;
-
-public final class ChannelService {
-    private ChannelService() {
-        
-    }
-    
-    public static void service(IoSession session, SoapTcpMessage message) {
-        XMLStreamReader xmlReader = null;
-        try {
-            xmlReader
-                = StaxUtils.createXMLStreamReader(message.getContentAsStream(), "UTF-8");
-            while (xmlReader.hasNext()) {
-                xmlReader.next();
-                if (xmlReader.getEventType() == XMLStreamReader.START_ELEMENT) {
-                    if (xmlReader.getLocalName().equals("initiateSession")) {
-                        initiateSession(session);
-                    } else if (xmlReader.getLocalName().equals("openChannel")) {
-                        String targetWSURI = null;
-                        List<String> negotiatedMimeTypes = new ArrayList<String>();
-                        List<String> negotiatedParams = new ArrayList<String>();
-                        while (xmlReader.hasNext()) {
-                            xmlReader.next();
-                            if (xmlReader.getEventType() == XMLStreamReader.START_ELEMENT) {
-                                if (xmlReader.getLocalName().equals("targetWSURI")) {
-                                    targetWSURI = xmlReader.getElementText();
-                                } else if (xmlReader.getLocalName().equals("negotiatedMimeTypes")) {
-                                    negotiatedMimeTypes.add(xmlReader.getElementText());
-                                }  else if (xmlReader.getLocalName().equals("negotiatedParams")) {
-                                    negotiatedParams.add(xmlReader.getElementText());
-                                }
-                            }
-                        }
-                        openChannel(session, targetWSURI, negotiatedMimeTypes, negotiatedParams);
-                    } else  if (xmlReader.getLocalName().equals("closeChannel")) {
-                        int channelId = -1;
-                        while (xmlReader.hasNext()) {
-                            if (xmlReader.getEventType() == XMLStreamReader.START_ELEMENT
-                                && xmlReader.getLocalName().equals("channelId")) {
-                                channelId = Integer.parseInt(xmlReader.getElementText());
-                            }
-                        }
-                        closeChannel(session, channelId);
-                    }
-                    
-                }
-            }
-        } catch (XMLStreamException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                StaxUtils.close(xmlReader);
-            } catch (XMLStreamException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-    
-    private static void initiateSession(IoSession session) {
-        System.out.println("initiateSession service");
-        String response = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"
-            + "<s:Body><initiateSessionResponse xmlns=\"http://servicechannel.tcp.transport.ws.xml.sun.com/\""
-            + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/"
-            + "XMLSchema\"/></s:Body></s:Envelope>";
-        SoapTcpMessage soapTcpMessage = SoapTcpMessage.createSoapTcpMessage(response, 0);
-        IoBuffer buffer = IoBuffer.allocate(512);
-        buffer.setAutoExpand(true);
-        try {
-            SoapTcpUtils.writeSoapTcpMessage(buffer.asOutputStream(), soapTcpMessage);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        buffer.flip();
-        session.write(buffer);
-    }
-    
-    @SuppressWarnings("unchecked")
-    private static void openChannel(IoSession session, String targetWSURI, List<String> negotiatedMimeTypes,
-                                    List<String> negotiatedParams) {
-        System.out.println("openChannel service");
-        List<SoapTcpChannel> channels = (List<SoapTcpChannel>)session.getAttribute("channels");
-        int max = 0;
-        for (SoapTcpChannel channel : channels) {
-            if (channel.getChannelId() > max) {
-                max = channel.getChannelId();
-            }
-        }
-        channels.add(new SoapTcpChannel(max + 1, targetWSURI));
-        
-        String response = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body>"
-            + "<openChannelResponse xmlns=\"http://servicechannel.tcp.transport.ws.xml.sun.com/\""
-            + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org"
-            + "/2001/XMLSchema\"><channelId xmlns=\"\">"
-            + (max + 1)
-            + "</channelId><negotiatedMimeTypes xmlns=\"\">"
-            + "application/soap+xml</negotiatedMimeTypes><negotiatedParams xmlns=\"\">charset</negotia"
-            + "tedParams><negotiatedParams xmlns=\"\">SOAPAction</negotiatedParams><negotiatedParams xm"
-            + "lns=\"\">action</negotiatedParams></openChannelResponse></s:Body></s:Envelope>";
-        SoapTcpMessage soapTcpMessage = SoapTcpMessage.createSoapTcpMessage(response, 0);
-        IoBuffer buffer = IoBuffer.allocate(512);
-        buffer.setAutoExpand(true);
-        try {
-            SoapTcpUtils.writeSoapTcpMessage(buffer.asOutputStream(), soapTcpMessage);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        buffer.flip();
-        session.write(buffer);
-    }
-    
-    @SuppressWarnings("unchecked")
-    private static void closeChannel(IoSession session, int channelId) {
-        System.out.println("closeChannel service");
-        List<SoapTcpChannel> channels = (List<SoapTcpChannel>)session.getAttribute("channels");
-        for (SoapTcpChannel channel : channels) {
-            if (channel.getChannelId() == channelId) {
-                channels.remove(channel);
-                break;
-            }
-        }
-        
-        String response = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"
-            + "<s:Body><closeChannelResponse xmlns=\"http://servicechannel.tcp.transport.ws.xml.sun.com/\""
-            + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/"
-            + "XMLSchema\"/></s:Body></s:Envelope>";
-        SoapTcpMessage soapTcpMessage = SoapTcpMessage.createSoapTcpMessage(response, 0);
-        IoBuffer buffer = IoBuffer.allocate(512);
-        buffer.setAutoExpand(true);
-        try {
-            SoapTcpUtils.writeSoapTcpMessage(buffer.asOutputStream(), soapTcpMessage);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        buffer.flip();
-        session.write(buffer);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/DataCodingUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/DataCodingUtils.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/DataCodingUtils.java
deleted file mode 100644
index 4289646..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/DataCodingUtils.java
+++ /dev/null
@@ -1,197 +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.cxf.binding.soap.tcp;
-
-import java.io.*;
-
-/**
- * DataCodingUtils is a utility class for reading and writing integers in SOAP over TCP protocol.
- */
-public final class DataCodingUtils {
-
-    private DataCodingUtils() {
-
-    }
-
-    /**
-     * Method for reading INTEGER4 values from InputStream
-     * 
-     * @param inputStream a source stream
-     * @param array a buffer for read data
-     * @param count a number of integers to be read
-     * @throws IOException
-     */
-    public static void readInts4(final InputStream inputStream, final int[] array,
-                                 final int count) throws IOException {
-        int value = 0;
-        int octet = 0;
-        int readInts = 0;
-        int shVal = 0;
-        int neeble = 0;
-        int neebleNum = 0;
-
-        for (; readInts < count; neebleNum++) {
-            if (neebleNum % 2 == 0) {
-                octet = inputStream.read();
-                if (octet == -1) {
-                    throw new EOFException();
-                }
-                neeble = octet >> 4;
-            } else {
-                neeble = octet & 0xF;
-            }
-
-            value |= (neeble & 7) << shVal;
-            if ((neeble & 8) == 0) {
-                array[readInts++] = value;
-                shVal = 0;
-                value = 0;
-            } else {
-                shVal += 3;
-            }
-        }
-    }
-
-    /**
-     * Method for reading single INTEGER8 value
-     * 
-     * @param inputStream a source stream
-     * @return read integer
-     * @throws IOException
-     */
-    public static int readInt8(final InputStream inputStream) throws IOException {
-        int value = 0;
-        int shVal = 0;
-        for (int octet = 0x80; (octet & 0x80) != 0; shVal += 7) {
-            octet = inputStream.read();
-            if (octet == -1) {
-                throw new EOFException();
-            }
-
-            value |= (octet & 0x7F) << shVal;
-        }
-
-        return value;
-    }
-
-    /**
-     * Method for writing single INTEGER4 value into OutputStream
-     * 
-     * @param outputStream a target stream
-     * @param intValue value that will be written
-     * @throws IOException
-     */
-    public static void writeInt8(final OutputStream outputStream, final int intValue) throws IOException {
-        int octet;
-        int value = intValue;
-        do {
-            octet = value & 0x7F;
-            value >>>= 7;
-
-            if (value != 0) {
-                octet |= 0x80;
-            }
-
-            outputStream.write(octet);
-        } while(value != 0);
-    }
-
-    /**
-     * Method for writing variable number of integer values as INTEGER4 values
-     * 
-     * @param outputStream a target stream
-     * @param values a variable length list of integer values that will be written
-     * @throws IOException
-     */
-    public static void writeInts4(final OutputStream outputStream, final int ... values) throws IOException {
-        writeInts4(outputStream, values, 0, values.length);
-    }
-
-    /**
-     * Method for writing integers as INTEGER4 values
-     * 
-     * @param outputStream a target stream
-     * @param array values that will be written
-     * @param offset an offset in array from method starts writing
-     * @param count a number of integers to be written
-     * @throws IOException
-     */
-    public static void writeInts4(final OutputStream outputStream, final int[] array,
-                                  final int offset, final int count) throws IOException {
-        int shiftValue = 0;
-        for (int i = 0; i < count - 1; i++) {
-            final int value = array[offset + i];
-            shiftValue = writeInt4(outputStream, value, shiftValue, false);
-        }
-
-        if (count > 0) {
-            writeInt4(outputStream, array[offset + count - 1], shiftValue, true);
-        }
-    }
-
-    private static int writeInt4(final OutputStream outputStream, final int intValue,
-                                final int highValue, final boolean flush) throws IOException {
-        int nibbleL;
-        int nibbleH;
-        int value = intValue;
-        int hValue = highValue;
-
-        if (hValue > 0) {
-            hValue &= 0x70; // clear highest bit
-            nibbleL = value & 7;
-            value >>>= 3;
-            if (value != 0) {
-                nibbleL |= 8;
-            }
-
-            outputStream.write(hValue | nibbleL);
-
-            if (value == 0) {
-                return 0;
-            }
-        }
-
-        do {
-            // shift nibbleH to high byte's bits
-            nibbleH = (value & 7) << 4;
-            value >>>= 3;
-
-            if (value != 0) {
-                nibbleH |= 0x80;
-                nibbleL = value & 7;
-                value >>>= 3;
-                if (value != 0) {
-                    nibbleL |= 8;
-                }
-            } else {
-                if (!flush) {
-                    return nibbleH | 0x80;
-                }
-
-                nibbleL = 0;
-            }
-
-            outputStream.write(nibbleH | nibbleL);
-        } while(value != 0);
-
-        return 0;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpChannel.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpChannel.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpChannel.java
deleted file mode 100644
index bdb1bba..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpChannel.java
+++ /dev/null
@@ -1,74 +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.cxf.binding.soap.tcp;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrame;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameHeader;
-
-public class SoapTcpChannel {
-    private int channelId;
-    private String wsURI;
-    private List<SoapTcpFrame> frames;
-    
-    public SoapTcpChannel(int channelId, String wsURI) {
-        this.channelId = channelId;
-        this.wsURI = wsURI;
-        frames = new ArrayList<SoapTcpFrame>();
-    }
-    
-    public boolean addFrame(SoapTcpFrame frame) {
-        if (frame != null && frame.getChannelId() == channelId) {
-            if (frame.getHeader().getFrameType() == SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE) {
-                frames.clear();
-            }
-            frames.add(frame);
-            return true;
-        }
-        return false;
-    }
-    
-    public List<SoapTcpFrame> getFrames() {
-        return frames;
-    }
-    
-    public void clearFrameBuffer() {
-        frames.clear();
-    }
-
-
-    public int getChannelId() {
-        return channelId;
-    }
-
-    public void setChannelId(int channelId) {
-        this.channelId = channelId;
-    }
-
-    public String getWsURI() {
-        return wsURI;
-    }
-
-    public void setWsURI(String wsURI) {
-        this.wsURI = wsURI;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpCodecFactory.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpCodecFactory.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpCodecFactory.java
deleted file mode 100644
index 14c24d1..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpCodecFactory.java
+++ /dev/null
@@ -1,44 +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.cxf.binding.soap.tcp;
-
-import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFactory;
-import org.apache.mina.filter.codec.ProtocolDecoder;
-import org.apache.mina.filter.codec.ProtocolEncoder;
-
-public class SoapTcpCodecFactory implements ProtocolCodecFactory {
-    private SoapTcpMessageEncoder encoder;
-    private SoapTcpMessageDecoder decoder;
-    
-    public SoapTcpCodecFactory() {
-        encoder = new SoapTcpMessageEncoder();
-        decoder = new SoapTcpMessageDecoder();
-    }
-    
-    public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
-        return decoder;
-    }
-
-    public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
-        return encoder;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpDestination.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpDestination.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpDestination.java
deleted file mode 100644
index 380ba39..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpDestination.java
+++ /dev/null
@@ -1,195 +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.cxf.binding.soap.tcp;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.AbstractDestination;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.service.IoAcceptor;
-import org.apache.mina.core.service.IoHandler;
-import org.apache.mina.core.session.IdleStatus;
-import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
-import org.apache.mina.filter.logging.LoggingFilter;
-import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
-
-public final class SoapTcpDestination extends AbstractDestination implements IoHandler {
-    private static final String MAGIC_IDENTIFIER = "vnd.sun.ws.tcp";
-    private static final Logger LOG = LogUtils.getL7dLogger(SoapTcpDestination.class);
-    
-    public SoapTcpDestination(EndpointReferenceType ref, EndpointInfo ei) throws IOException {
-        this(null, ref, ei);
-    }
-    
-    public SoapTcpDestination(Bus b, EndpointReferenceType ref, EndpointInfo ei) throws IOException {
-        super(b, ref, ei);
-        
-        String address = ref.getAddress().getValue();
-        if (address.contains("soap.tcp://")) {
-            //String endPointAddress = address;
-            int beginIndex = address.indexOf("://");
-            int endIndex = address.indexOf(":", beginIndex + 1);
-            //String hostName = address.substring(beginIndex + 3, endIndex);
-            beginIndex = endIndex;
-            endIndex = address.indexOf("/", beginIndex);
-            int port = Integer.parseInt(address.substring(beginIndex + 1, endIndex));
-            //System.out.println("hostName: " + hostName);
-            //System.out.println("port: " + port);
-            
-            IoAcceptor acceptor = new NioSocketAcceptor();
-            acceptor.getFilterChain().addLast("logger", new LoggingFilter());
-            //acceptor.getFilterChain().addLast("LowLevelProtocol", new SoapTcpIoFilter());
-            acceptor.getFilterChain().addLast("HighLevelProtocol",
-                                              new ProtocolCodecFilter(new SoapTcpCodecFactory()));
-            acceptor.setDefaultLocalAddress(new InetSocketAddress(port));
-            acceptor.setHandler(this);
-            acceptor.bind();
-            System.out.println("server is listenig at port " + port);
-        }
-    }
-    
-    @Override
-    protected Conduit getInbuiltBackChannel(Message inMessage) {
-        return inMessage.getExchange().getConduit(inMessage);
-    }
-
-    @Override
-    protected Logger getLogger() {
-        return LOG;
-    }
-
-    public void exceptionCaught(IoSession session, Throwable cause) throws Exception {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public void messageReceived(IoSession session, Object message) throws Exception {
-        if (message instanceof SoapTcpMessage) {
-            BackendTcpConduit conduit = (BackendTcpConduit)session.getAttribute("conduit");
-            if (conduit == null) {
-                conduit = new BackendTcpConduit(session);
-                session.setAttribute("conduit", conduit);
-            }
-            
-            if (((SoapTcpMessage)message).getChannelId() == 0) {
-                ChannelService.service(session, (SoapTcpMessage)message);
-            } else {
-                Message msg = new MessageImpl();
-                Exchange exchange = new ExchangeImpl();
-                exchange.setConduit(conduit);
-                exchange.setDestination(this);
-                msg.setExchange(exchange);
-                msg.setContent(InputStream.class, ((SoapTcpMessage)message).getContentAsStream());
-                msg.setContent(SoapTcpChannel.class, getChannel(session, (SoapTcpMessage)message));
-                msg.setContent(IoSession.class, session);
-                incomingObserver.onMessage(msg);
-            }
-        } else if (message instanceof IoBuffer) {
-            SoapTcpSessionState sessionState = (SoapTcpSessionState)session.getAttribute("sessionState");
-            if (sessionState != null
-                && sessionState.getStateId() == SoapTcpSessionState.SOAP_TCP_SESSION_STATE_NEW) {
-                IoBuffer buffer = (IoBuffer) message;
-                InputStream inStream = buffer.asInputStream();
-                byte magicIdBuffer[] = new byte[MAGIC_IDENTIFIER.length()];
-                inStream.read(magicIdBuffer);
-                String magicId = new String(magicIdBuffer, "US-ASCII");
-                if (magicId.equals(MAGIC_IDENTIFIER)) {
-                    int version[] = new int[4];
-                    DataCodingUtils.readInts4(inStream, version, 4);
-                    if (version[0] == SoapTcpProtocolConsts.PROTOCOL_VERSION_MAJOR
-                        && version[1] == SoapTcpProtocolConsts.PROTOCOL_VERSION_MINOR
-                        && version[2] == SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MAJOR
-                        && version[3] == SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MINOR) {
-                        sessionState.setStateId(SoapTcpSessionState.SOAP_TCP_SESSION_STATE_AFTER_HANDSHAKE);
-                        IoBuffer response = IoBuffer.allocate(2);
-                        OutputStream out = response.asOutputStream();
-                        DataCodingUtils.writeInts4(out, SoapTcpProtocolConsts.PROTOCOL_VERSION_MAJOR,
-                                                   SoapTcpProtocolConsts.PROTOCOL_VERSION_MINOR,
-                                                   SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MAJOR,
-                                                   SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MINOR);
-                        out.close();
-                        response.flip();
-                        session.write(response);
-                    }
-                }
-            }
-        }
-    }
-
-    public void messageSent(IoSession session, Object message) throws Exception {
-        System.out.println("messageSent");
-        
-    }
-
-    public void sessionClosed(IoSession session) throws Exception {
-        System.out.println("sessionClosed");
-        
-    }
-
-    public void sessionCreated(IoSession session) throws Exception {
-        System.out.println("sessionCreated");
-        
-    }
-
-    public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
-        System.out.println("sessionIdle");
-        
-    }
-
-    public void sessionOpened(IoSession session) throws Exception {
-        System.out.println("sessionOpened");
-        session.setAttribute("sessionState", new SoapTcpSessionState());
-        List<SoapTcpChannel> channels = new ArrayList<SoapTcpChannel>();
-        SoapTcpChannel channel0 = new SoapTcpChannel(0, "");
-        channels.add(channel0);
-        session.setAttribute("channels", channels);
-        
-    }
-
-    @SuppressWarnings("unchecked")
-    private SoapTcpChannel getChannel(IoSession session, SoapTcpMessage message) {
-        List<SoapTcpChannel> channels = (List<SoapTcpChannel>)session.getAttribute("channels");
-        if (channels != null) {
-            for (SoapTcpChannel channel : channels) {
-                if (channel.getChannelId() == message.getChannelId()) {
-                    return channel;
-                }
-            }
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageDecoder.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageDecoder.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageDecoder.java
deleted file mode 100644
index 17c7fb6..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageDecoder.java
+++ /dev/null
@@ -1,117 +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.cxf.binding.soap.tcp;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrame;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameHeader;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolDecoderAdapter;
-import org.apache.mina.filter.codec.ProtocolDecoderOutput;
-
-public class SoapTcpMessageDecoder extends ProtocolDecoderAdapter { //CumulativeProtocolDecoder {
-
-    @SuppressWarnings("unchecked")
-    public void decode(IoSession session, IoBuffer buffer, ProtocolDecoderOutput out)
-        throws Exception {
-
-        byte[] tempBuffer = (byte[])session.getAttribute("tempBuffer");
-        Integer bufferPosition = (Integer)session.getAttribute("bufferPosition");
-        Integer bufferDataLength = (Integer)session.getAttribute("bufferDataLength");
-        if (tempBuffer == null) {
-            tempBuffer = new byte[SoapTcpOutputStream.CHUNK_SIZE];
-            bufferDataLength = buffer.limit();
-            for (bufferPosition = Integer.valueOf(0); bufferPosition < bufferDataLength; bufferPosition++) {
-                tempBuffer[bufferPosition] = buffer.get();
-            }
-            session.setAttribute("tempBuffer", tempBuffer);
-            session.setAttribute("bufferPosition", bufferPosition);
-            session.setAttribute("bufferDataLength", bufferDataLength);
-        } else {
-            bufferDataLength += buffer.limit();
-            for (; bufferPosition < bufferDataLength; bufferPosition++) {
-                tempBuffer[bufferPosition] = buffer.get();
-            }
-        }
-        
-        SoapTcpSessionState sessionState = (SoapTcpSessionState)session.getAttribute("sessionState");
-        if (sessionState != null
-            && sessionState.getStateId() == SoapTcpSessionState.SOAP_TCP_SESSION_STATE_NEW) {
-            if (bufferPosition == 16) {
-                out.write(IoBuffer.wrap(tempBuffer, 0, bufferPosition));
-                bufferPosition = 0;
-                bufferDataLength = 0;
-                session.setAttribute("bufferPosition", bufferPosition);
-                session.setAttribute("bufferDataLength", bufferDataLength);
-                return;
-            } else {
-                return;
-            }
-        }
-        
-        InputStream inStream = new ByteArrayInputStream(tempBuffer, 0, bufferDataLength);
-        try {
-            SoapTcpFrame frame = SoapTcpUtils.readMessageFrame(inStream);
-            List<SoapTcpChannel> channels = (List<SoapTcpChannel>)session.getAttribute("channels");
-            for (SoapTcpChannel channel : channels) {
-                if (channel.getChannelId() == frame.getChannelId()) {
-                    switch (frame.getHeader().getFrameType()) {
-                    case SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE:
-                    case SoapTcpFrameHeader.ERROR_MESSAGE:
-                    case SoapTcpFrameHeader.NULL_MESSAGE:
-                        SoapTcpMessage singleFrameMessage = SoapTcpMessage.createSoapTcpMessage(frame);
-                        out.write(singleFrameMessage);
-                        bufferPosition = 0;
-                        bufferDataLength = 0;
-                        break;
-                    case SoapTcpFrameHeader.MESSAGE_START_CHUNK:
-                    case SoapTcpFrameHeader.MESSAGE_CHUNK:
-                        channel.addFrame(frame);
-                        bufferPosition = 0;
-                        bufferDataLength = 0;
-                        break;
-                    case SoapTcpFrameHeader.MESSAGE_END_CHUNK:
-                        List<SoapTcpFrame> frames = channel.getFrames();
-                        SoapTcpMessage multiFrameMessage = SoapTcpMessage.createSoapTcpMessage(frames);
-                        multiFrameMessage.getFrames().add(frame);
-                        out.write(multiFrameMessage);
-                        bufferPosition = 0;
-                        bufferDataLength = 0;
-                        break;
-                    default:
-                        return;
-                    }
-                }
-            }
-        } catch (IOException ex) {
-            //
-        } finally {
-            session.setAttribute("bufferPosition", bufferPosition);
-            session.setAttribute("bufferDataLength", bufferDataLength);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageEncoder.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageEncoder.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageEncoder.java
deleted file mode 100644
index c7bc623..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpMessageEncoder.java
+++ /dev/null
@@ -1,46 +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.cxf.binding.soap.tcp;
-
-import java.io.OutputStream;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
-import org.apache.mina.filter.codec.ProtocolEncoderOutput;
-
-public class SoapTcpMessageEncoder extends ProtocolEncoderAdapter {
-
-    public void encode(IoSession session, Object obj, ProtocolEncoderOutput out) throws Exception {
-        if (obj instanceof SoapTcpMessage) {
-            
-            SoapTcpMessage msg = (SoapTcpMessage)obj;
-            IoBuffer buffer = IoBuffer.allocate(1024);
-            buffer.setAutoExpand(true);
-            OutputStream outStream = buffer.asOutputStream();
-            SoapTcpUtils.writeSoapTcpMessage(outStream, msg);
-            outStream.close();
-            out.write(buffer);
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpOutputStream.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpOutputStream.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpOutputStream.java
deleted file mode 100644
index f362d15..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpOutputStream.java
+++ /dev/null
@@ -1,273 +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.cxf.binding.soap.tcp;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cxf.binding.soap.Soap11;
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrame;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameContentDescription;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameHeader;
-import org.apache.cxf.io.AbstractThresholdOutputStream;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.transport.MessageObserver;
-
-/**
- * SoapTCPOutPutStream is OutputStream for sending message in SOAP/TCP protocol.
- * It sends single message in one or more SOAP/TCP frames.
- */
-public class SoapTcpOutputStream extends AbstractThresholdOutputStream {
-    public static final int CHUNK_SIZE = 4096;
-
-    private int channelId;
-    private OutputStream outStream;
-    private InputStream inStream;
-    private boolean messageSent;
-    private Message outMessage;
-    private int chunkSize;
-    
-    private MessageObserver incomingObserver;
-
-    public SoapTcpOutputStream(final InputStream inStream, final OutputStream outStream,
-                               final Message message, final String targetWsURI,
-                               final MessageObserver incomingObserver) {
-        this(inStream, outStream, message, targetWsURI, incomingObserver, CHUNK_SIZE);
-    }
-    
-    public SoapTcpOutputStream(final InputStream inStream, final OutputStream outStream,
-                               final Message message, final String targetWsURI,
-                               final MessageObserver incomingObserver, final int chunkSize) {
-        super(chunkSize);
-        this.messageSent = false;
-        this.inStream = inStream;
-        this.outStream = outStream;
-        this.outMessage = message;
-        this.wrappedStream = null;
-        this.chunkSize = chunkSize;
-        this.incomingObserver = incomingObserver;
-        
-        final List<String> mimeTypes = new ArrayList<String>();
-        
-        SoapMessage m = (SoapMessage)message;
-        
-        //mimeTypes.add("application/vnd.sun.stateful.fastinfoset");
-        mimeTypes.add(m.getVersion().getContentType());
-        //mimeTypes.add("multipart/related");
-        
-        
-        final List<String> supportedParams = new ArrayList<String>();
-        supportedParams.add("charset");
-        if (m.getVersion() == Soap11.getInstance()) {
-            supportedParams.add("SOAPAction");
-        } else {
-            supportedParams.add("action");
-        }
-        
-        try {
-            channelId = openChannel(targetWsURI, mimeTypes, supportedParams);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-    
-    private int openChannel(final String targetWsURI, final List<String> supportedMimeTypes,
-                            final List<String> supportedParams) throws IOException {
-        
-        String initialMessage = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"
-            + "<s:Body><openChannel xmlns=\"http://servicechannel.tcp.transport.ws.xml.sun.com/\""
-            + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-            + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">";
-        StringBuilder openChannelMsg = new StringBuilder(initialMessage);
-        openChannelMsg.append("<targetWSURI xmlns=\"\">" + targetWsURI + "</targetWSURI>");
-        
-        for (String mimeType : supportedMimeTypes) {
-            openChannelMsg.append("<negotiatedMimeTypes xmlns=\"\">" + mimeType + "</negotiatedMimeTypes>");
-        }
-        for (String param : supportedParams) {
-            openChannelMsg.append("<negotiatedParams xmlns=\"\">" + param + "</negotiatedParams>");
-        }
-
-        openChannelMsg.append("</openChannel></s:Body></s:Envelope>");
-        
-        SoapTcpFrameContentDescription contentDesc = new SoapTcpFrameContentDescription();
-        contentDesc.setContentId(0);
-        
-        final Map<Integer, String> parameters = new Hashtable<Integer, String>();
-        parameters.put(0, "utf-8");
-        
-        contentDesc.setParameters(parameters);
-        
-        final SoapTcpFrameHeader header =
-            new SoapTcpFrameHeader(SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE, contentDesc);
-        final SoapTcpFrame frame = new SoapTcpFrame();
-        frame.setHeader(header);
-        frame.setChannelId(0);
-        try {
-            frame.setPayload(openChannelMsg.toString().getBytes("UTF-8"));
-            SoapTcpUtils.writeMessageFrame(outStream, frame);
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        
-        final SoapTcpFrame response = SoapTcpUtils.readMessageFrame(inStream);
-        if (!SoapTcpUtils.checkSingleFrameResponse(response, "openChannelResponse")) {
-            throw new IOException("Couldn't open new channel.");
-        }
-        //SoapTcpUtils.printSoapTcpFrame(System.out, response);
-        
-        return getChannelIdFromResponse(response);
-    }
-    
-    private int getChannelIdFromResponse(final SoapTcpFrame frame) {
-        return ChannelIdParser.getChannelId(new ByteArrayInputStream(frame.getPayload()));
-    }
-
-    @Override
-    public void thresholdNotReached() throws IOException {
-        //Send single message if didn't send any message yet or end message if already send message
-        if (messageSent) {
-            SoapTcpFrameHeader header = new SoapTcpFrameHeader(SoapTcpFrameHeader.MESSAGE_END_CHUNK, null);
-            header.setChannelId(channelId);
-            SoapTcpFrame frame = new SoapTcpFrame();
-            frame.setChannelId(channelId);
-            frame.setHeader(header);
-            frame.setPayload(this.buffer.toByteArray());
-            SoapTcpUtils.writeMessageFrame(outStream, frame);
-        } else {
-            final SoapTcpFrameContentDescription contentDesc = new SoapTcpFrameContentDescription();
-            contentDesc.setContentId(0);
-            
-            final Map<Integer, String> parameters = new Hashtable<Integer, String>();
-            parameters.put(0, "utf-8");
-            
-            contentDesc.setParameters(parameters);
-            
-            final SoapTcpFrameHeader header =
-                new SoapTcpFrameHeader(SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE, contentDesc);
-            header.setChannelId(channelId);
-            final SoapTcpFrame frame = new SoapTcpFrame();
-            frame.setHeader(header);
-            frame.setChannelId(channelId);
-            frame.setPayload(this.buffer.toByteArray());
-            SoapTcpUtils.writeMessageFrame(outStream, frame);
-            messageSent = true;
-        }
-    }
-
-    @Override
-    public void thresholdReached() throws IOException {
-        //Send start-chunk message if didn't send any message yet or message chunk if already send message
-        if (messageSent) {
-            SoapTcpFrameHeader header = new SoapTcpFrameHeader(SoapTcpFrameHeader.MESSAGE_CHUNK, null);
-            header.setChannelId(channelId);
-            SoapTcpFrame frame = new SoapTcpFrame();
-            frame.setChannelId(channelId);
-            frame.setHeader(header);
-            frame.setPayload(this.buffer.toByteArray());
-            SoapTcpUtils.writeMessageFrame(outStream, frame);
-        } else {
-            SoapTcpFrameContentDescription contentDesc = new SoapTcpFrameContentDescription();
-            contentDesc.setContentId(0);
-            
-            Map<Integer, String> parameters = new Hashtable<Integer, String>();
-            parameters.put(0, "utf-8");
-            
-            contentDesc.setParameters(parameters);
-            
-            SoapTcpFrameHeader header =
-                new SoapTcpFrameHeader(SoapTcpFrameHeader.MESSAGE_START_CHUNK, contentDesc);
-            header.setChannelId(channelId);
-            SoapTcpFrame frame = new SoapTcpFrame();
-            frame.setHeader(header);
-            frame.setChannelId(channelId);
-            frame.setPayload(this.buffer.toByteArray());
-            SoapTcpUtils.writeMessageFrame(outStream, frame);
-            messageSent = true;
-        }
-    }
-    
-    @Override
-    public void close() throws IOException {
-        super.close();
-        if (messageSent) {
-            InputStream inputStream = getResponse();
-            Exchange exchange = outMessage.getExchange();
-            Message inMessage = new MessageImpl();
-            inMessage.setExchange(exchange);
-            inMessage.setContent(InputStream.class, inputStream);
-            
-            incomingObserver.onMessage(inMessage);
-        }
-    }
-
-    @Override
-    protected void onFirstWrite() throws IOException {
-        
-    }
-    
-    private InputStream getResponse() {
-        SoapTcpFrame responseMessage = null;
-        try {
-            responseMessage = SoapTcpUtils.readMessageFrame(inStream);
-        } catch (IOException e2) {
-            e2.printStackTrace();
-        }
-        if (responseMessage != null) {
-            int frameType = responseMessage.getHeader().getFrameType();
-            if (frameType == SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE
-                || frameType == SoapTcpFrameHeader.ERROR_MESSAGE
-                || frameType == SoapTcpFrameHeader.NULL_MESSAGE) {
-                return new ByteArrayInputStream(responseMessage.getPayload());
-            } else if (frameType == SoapTcpFrameHeader.MESSAGE_START_CHUNK) {
-                ByteArrayOutputStream baos = new ByteArrayOutputStream(4 * chunkSize);
-                try {
-                    baos.write(responseMessage.getPayload());
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-                while (frameType != SoapTcpFrameHeader.MESSAGE_END_CHUNK) {
-                    try {
-                        SoapTcpFrame frame = SoapTcpUtils.readMessageFrame(inStream);
-                        baos.write(frame.getPayload());
-                        frameType = frame.getHeader().getFrameType();
-                    } catch (IOException e) {
-                        break;
-                    }
-                }
-                return new ByteArrayInputStream(baos.toByteArray());
-            }
-        }
-        
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpProtocolConsts.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpProtocolConsts.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpProtocolConsts.java
deleted file mode 100644
index 5a6a0b0..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpProtocolConsts.java
+++ /dev/null
@@ -1,34 +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.cxf.binding.soap.tcp;
-
-public final class SoapTcpProtocolConsts {
-
-    public static final String MAGIC_IDENTIFIER = "vnd.sun.ws.tcp";
-    public static final int PROTOCOL_VERSION_MAJOR = 1;
-    public static final int PROTOCOL_VERSION_MINOR = 0;
-    public static final int CONNECTION_MANAGEMENT_VERSION_MAJOR = 1;
-    public static final int CONNECTION_MANAGEMENT_VERSION_MINOR = 0;
-    
-    private SoapTcpProtocolConsts() {
-        
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpSessionState.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpSessionState.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpSessionState.java
deleted file mode 100644
index 775e6c6..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpSessionState.java
+++ /dev/null
@@ -1,42 +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.cxf.binding.soap.tcp;
-
-public class SoapTcpSessionState {
-    public static final byte SOAP_TCP_SESSION_STATE_NEW = 0;
-    public static final byte SOAP_TCP_SESSION_STATE_AFTER_HANDSHAKE = 1;
-    public static final byte SOAP_TCP_SESSION_STATE_INITIATED = 2;
-    
-    private byte stateId;
-    
-    public SoapTcpSessionState() {
-        stateId = SOAP_TCP_SESSION_STATE_NEW;
-    }
-
-    public byte getStateId() {
-        return stateId;
-    }
-
-    public void setStateId(byte stateId) {
-        this.stateId = stateId;
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpUtils.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpUtils.java
deleted file mode 100644
index e73ea45..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/SoapTcpUtils.java
+++ /dev/null
@@ -1,222 +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.cxf.binding.soap.tcp;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrame;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameContentDescription;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameHeader;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpMessage;
-import org.apache.cxf.staxutils.StaxUtils;
-
-public final class SoapTcpUtils {
-
-    private SoapTcpUtils() {
-        
-    }
-    
-    public static void writeSoapTcpMessage(final OutputStream out, final SoapTcpMessage msg)
-        throws IOException {
-        for (SoapTcpFrame frame : msg.getFrames()) {
-            writeMessageFrame(out, frame);
-        }
-    }
-    
-    /**
-     * Method  that writes single SoapTcpFrame
-     * @param out
-     * @param frame
-     * @throws IOException
-     */
-    public static void writeMessageFrame(final OutputStream out, final SoapTcpFrame frame) throws IOException
-    {
-        if (frame != null) {
-            final SoapTcpFrameHeader header = frame.getHeader();
-            final byte payload[] = frame.getPayload();
-            if (header != null && payload != null) {
-                header.write(out);
-                DataCodingUtils.writeInt8(out, payload.length);
-                out.write(payload);
-                out.flush();
-            }
-        }
-    }
-    
-    /**
-     * Method that reads single SoapTcpFrame
-     * @param inputStream
-     * @return
-     * @throws IOException
-     */
-    public static SoapTcpFrame readMessageFrame(final InputStream inputStream) throws IOException
-    {
-        final SoapTcpFrame frame = new SoapTcpFrame();
-        final SoapTcpFrameHeader header = new SoapTcpFrameHeader();
-        frame.setHeader(header);
-        
-        final int response[] = new int[2]; //[0] channel-id, [1] message-id
-        DataCodingUtils.readInts4(inputStream, response, 2);
-        
-        frame.setChannelId(response[0]);
-        header.setChannelId(response[0]);
-        header.setFrameType(response[1]);
-        switch(response[1]) {
-        case SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE:
-            header.setContentDescription(readContentDescription(inputStream));
-            break;
-        case SoapTcpFrameHeader.MESSAGE_START_CHUNK:
-            header.setContentDescription(readContentDescription(inputStream));
-            break;
-        case SoapTcpFrameHeader.MESSAGE_CHUNK:
-            break;
-        case SoapTcpFrameHeader.MESSAGE_END_CHUNK:
-            break;
-        case SoapTcpFrameHeader.ERROR_MESSAGE:
-            break;
-        case SoapTcpFrameHeader.NULL_MESSAGE:
-            break;
-        default:
-        }
-            
-        final int payloadLength = DataCodingUtils.readInt8(inputStream);
-        final byte payload[] = new byte[payloadLength];
-        if (inputStream.read(payload, 0, payload.length) != payloadLength) {
-            throw new IOException();
-        }
-        frame.setPayload(payload);
-        
-        return frame;
-    }
-    
-    private static SoapTcpFrameContentDescription readContentDescription(final InputStream inputStream)
-        throws IOException {
-        final int response[] = new int[2];
-        DataCodingUtils.readInts4(inputStream, response, 2); //[0] content-id, [1] number-of-parameters
-        
-        final SoapTcpFrameContentDescription contentDesc = new SoapTcpFrameContentDescription();
-        contentDesc.setContentId(response[0]);
-        final int numOfParams = response[1];
-        
-        final Map<Integer, String> parameters = new Hashtable<Integer, String>();
-        for (int i = 0; i < numOfParams; i++) {
-            DataCodingUtils.readInts4(inputStream, response, 2); //[0] parameter-id, [1] string-length
-            if (response[1] > 0) {
-                final byte[] buffer = new byte[response[1]];
-                if (inputStream.read(buffer) > 0) {
-                    final String value = new String(buffer, "UTF-8");
-                    parameters.put(Integer.valueOf(response[0]), value);
-                    //System.out.println("parameter-id = " + response[0] + " parameter-value = " + value);
-                }
-            }
-        }
-        contentDesc.setParameters(parameters);
-        
-        return contentDesc;
-    }
-
-    
-    /**
-     * Method that parse SoapTcpFrame payload to find important tag. 
-     *  
-     * @param responseFrame frame that will be examinated
-     * @param elementName a tag to look for 
-     * @return true If payload contains that tag then method return true
-     * otherwise return false;
-     */
-    public static boolean checkSingleFrameResponse(final SoapTcpFrame responseFrame,
-                                                   final String elementName) {
-        if (responseFrame != null
-            && responseFrame.getHeader().getFrameType() == SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE) {
-            ByteArrayInputStream bais = new ByteArrayInputStream(responseFrame.getPayload());
-            XMLStreamReader xmlReader = StaxUtils.createXMLStreamReader(bais);
-            try {
-                while (xmlReader.hasNext()) {
-                    xmlReader.next();
-                    if (xmlReader.getEventType() == XMLStreamReader.START_ELEMENT
-                        && xmlReader.getLocalName().equals(elementName)) {
-                        return true;
-                    }
-                }
-            } catch (XMLStreamException e) {
-                e.printStackTrace();
-            } finally {
-                try {
-                    StaxUtils.close(xmlReader);
-                } catch (XMLStreamException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        return false;
-    }
-    
-    /**
-     * Method that print SoapTcpFrame
-     * @param out
-     * @param frame
-     */
-    public static void printSoapTcpFrame(final OutputStream out, final SoapTcpFrame frame) {
-        if (frame != null) {
-            final PrintStream writer = (PrintStream)out;
-            writer.println("channel-id: " + frame.getChannelId());
-            
-            final SoapTcpFrameHeader header = frame.getHeader();
-            if (header != null) {
-                writer.println("frameType: " + header.getFrameType());
-                final SoapTcpFrameContentDescription contentDesc = header.getContentDescription();
-                if (contentDesc != null) {
-                    writer.println("content-id: " + contentDesc.getContentId());
-                    final Map<Integer, String> parameters = contentDesc.getParameters();
-                    if (parameters != null) {
-                        final Iterator<Integer> keys = parameters.keySet().iterator();
-                        writer.println("parameters");
-                        while (keys.hasNext()) {
-                            final Integer key = keys.next();
-                            final String value = parameters.get(key);
-                            writer.println(key + " : " + value);
-                        }
-                    }
-                }
-            }
-            final byte payload[] = frame.getPayload();
-            if (payload != null) {
-                try {
-                    final String messageContent = new String(payload, "UTF-8");
-                    writer.println("messageContent:");
-                    writer.println(messageContent);
-                } catch (UnsupportedEncodingException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/TCPConduit.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/TCPConduit.java
deleted file mode 100644
index 1354fb1..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/TCPConduit.java
+++ /dev/null
@@ -1,181 +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.cxf.binding.soap.tcp;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.Socket;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrame;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameContentDescription;
-import org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameHeader;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.Configurable;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.AbstractConduit;
-import org.apache.cxf.transport.Assertor;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-
-public class TCPConduit
-    extends AbstractConduit
-    implements Configurable, Assertor {
-
-    private static final Logger LOG = LogUtils.getL7dLogger(TCPConduit.class);
-    
-    private Socket socket;
-    private InputStream in;
-    private OutputStream out;
-    private String endPointAddress;
-    
-    public TCPConduit(EndpointReferenceType t) throws IOException {
-        super(t);
-        
-        String hostName = null;
-        int port = 0;
-        
-        String address = t.getAddress().getValue();
-        if (address.contains("soap.tcp://")) {
-            endPointAddress = address;
-            int beginIndex = address.indexOf("://");
-            int endIndex = address.indexOf(":", beginIndex + 1);
-            hostName = address.substring(beginIndex + 3, endIndex);
-            beginIndex = endIndex;
-            endIndex = address.indexOf("/", beginIndex);
-            port = Integer.parseInt(address.substring(beginIndex + 1, endIndex));
-            //System.out.println("hostName: " + hostName);
-            //System.out.println("port: " + port);
-        }
-
-        socket = new Socket(hostName, port);
-        in = socket.getInputStream();
-        out = socket.getOutputStream();
-        
-        out.write(SoapTcpProtocolConsts.MAGIC_IDENTIFIER.getBytes("US-ASCII"));
-        DataCodingUtils.writeInts4(out, SoapTcpProtocolConsts.PROTOCOL_VERSION_MAJOR,
-                                   SoapTcpProtocolConsts.PROTOCOL_VERSION_MINOR,
-                                   SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MAJOR,
-                                   SoapTcpProtocolConsts.CONNECTION_MANAGEMENT_VERSION_MINOR);
-        out.flush();
-        
-        final int version[] = new int[4];
-        DataCodingUtils.readInts4(in, version, 4);
-        
-        //System.out.println("serverProtocolVersionMajor = " + version[0]);
-        //System.out.println("serverProtocolVersionMinor = " + version[1]);
-        //System.out.println("serverConnectionManagementVersionMajor = " + version[2]);
-        //System.out.println("serverConnectionManagementVersionMinor = " + version[3]);
-        
-        initSession();
-    }
-    
-    public TCPConduit(EndpointInfo ei) throws IOException {
-        this(ei.getTarget());
-    }
-
-    private void initSession() throws IOException {
-        final String initSessionMessage = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"
-            + "<s:Body><initiateSession xmlns=\"http://servicechannel.tcp.transport.ws.xml.sun.com/\""
-            + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-            + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"/></s:Body></s:Envelope>";
-        byte[] initSessionMessageBytes = null;
-        try {
-            initSessionMessageBytes = initSessionMessage.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-
-        final SoapTcpFrameContentDescription contentDesc = new SoapTcpFrameContentDescription();
-        contentDesc.setContentId(0);
-        
-        Map<Integer, String> parameters = new Hashtable<Integer, String>();
-        parameters.put(0, "utf-8");
-        
-        contentDesc.setParameters(parameters);
-        
-        final SoapTcpFrameHeader header =
-            new SoapTcpFrameHeader(SoapTcpFrameHeader.SINGLE_FRAME_MESSAGE, contentDesc);
-        SoapTcpFrame frame = new SoapTcpFrame();
-        frame.setHeader(header);
-        frame.setChannelId(0);
-        frame.setPayload(initSessionMessageBytes);
-        try {
-            SoapTcpUtils.writeMessageFrame(out, frame);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        
-        final SoapTcpFrame response = SoapTcpUtils.readMessageFrame(in);
-        if (!SoapTcpUtils.checkSingleFrameResponse(response, "initiateSessionResponse")) {
-            throw new IOException("Could not initiate SOAP/TCP connection.");
-        }
-        //SoapTcpUtils.printSoapTcpFrame(System.out, response);
-    }
-    
-    @Override
-    protected Logger getLogger() {
-        return LOG;
-    }
-
-    public String getBeanName() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void assertMessage(Message message) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public boolean canAssert(QName type) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public void prepare(Message message) throws IOException {
-        final SoapTcpOutputStream soapTcpOutputStream =
-            new SoapTcpOutputStream(in, out, message, endPointAddress, incomingObserver);
-        message.setContent(OutputStream.class, soapTcpOutputStream);
-    }
-
-    @Override
-    public void close(Message message) {
-        
-    }
-    
-    @Override
-    public void close() {
-        try {
-            in.close();
-            out.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrame.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrame.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrame.java
deleted file mode 100644
index b2aea65..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrame.java
+++ /dev/null
@@ -1,44 +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.cxf.binding.soap.tcp.frames;
-
-public class SoapTcpFrame {
-    private SoapTcpFrameHeader header;
-    private byte[] payload;
-    
-    public int getChannelId() {
-        return header.getChannelId();
-    }
-    public void setChannelId(int channelId) {
-        this.header.setChannelId(channelId);
-    }
-    public SoapTcpFrameHeader getHeader() {
-        return header;
-    }
-    public void setHeader(SoapTcpFrameHeader header) {
-        this.header = header;
-    }
-    public byte[] getPayload() {
-        return payload;
-    }
-    public void setPayload(byte[] payload) {
-        this.payload = payload;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/a63b9462/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrameContentDescription.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrameContentDescription.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrameContentDescription.java
deleted file mode 100644
index 2f772df..0000000
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/tcp/frames/SoapTcpFrameContentDescription.java
+++ /dev/null
@@ -1,60 +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.cxf.binding.soap.tcp.frames;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.cxf.binding.soap.tcp.DataCodingUtils;
-
-public class SoapTcpFrameContentDescription {
-    private int contentId;
-    private Map<Integer, String> parameters;
-    
-    public int getContentId() {
-        return contentId;
-    }
-    
-    public void setContentId(final int contentId) {
-        this.contentId = contentId;
-    }
-    
-    public Map<Integer, String> getParameters() {
-        return parameters;
-    }
-    
-    public void setParameters(final Map<Integer, String> parameters) {
-        this.parameters = parameters;
-    }
-    
-    public void write(final OutputStream output) throws IOException {
-        DataCodingUtils.writeInts4(output, contentId, parameters.size());
-        final Iterator<Integer> keys = parameters.keySet().iterator();
-        while (keys.hasNext()) {
-            final Integer paramId = keys.next();
-            final String paramValue = parameters.get(paramId);
-            final byte[] paramValueBytes = paramValue.getBytes("UTF-8");
-            DataCodingUtils.writeInts4(output, paramId.intValue(), paramValueBytes.length);
-            output.write(paramValueBytes);
-        }
-    }
-}


Mime
View raw message