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

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


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


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

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

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

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

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

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

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

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

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

TOP

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

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.