Package org.apache.cxf.binding.soap.tcp.frames

Examples of org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameContentDescription


            openChannelMsg += "<negotiatedParams xmlns=\"\">" + param + "</negotiatedParams>";
        }

        openChannelMsg += "</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);
View Full Code Here


            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();
View Full Code Here

            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();
View Full Code Here

    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;
    }
View Full Code Here

            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();
View Full Code Here

            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);
View Full Code Here

            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();
View Full Code Here

            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();
View Full Code Here

            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);
View Full Code Here

    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;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.tcp.frames.SoapTcpFrameContentDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.