Package org.apache.cxf.message

Examples of org.apache.cxf.message.XMLMessage


    public Message createMessage(Message m) {
        if (!m.containsKey(Message.CONTENT_TYPE)) {
            m.put(Message.CONTENT_TYPE, "text/xml");
        }
        return new XMLMessage(m);
    }
View Full Code Here


        Message message;

        inputStream = new ByteArrayInputStream(data.getBytes());

        message = new XMLMessage(new MessageImpl());
        message.put(Message.CONTENT_TYPE, contentType);
        message.setContent(InputStream.class, inputStream);
        message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, System
                .getProperty("java.io.tmpdir"));
        message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, String
View Full Code Here

        Message message;

        inputStream = new ByteArrayInputStream(data.getBytes());

        message = new XMLMessage(new MessageImpl());
        message.put(Message.CONTENT_TYPE, contentType);
        message.setContent(InputStream.class, inputStream);
        message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, System
                .getProperty("java.io.tmpdir"));
        message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, String
View Full Code Here

        Message message;

        inputStream = new ByteArrayInputStream(data.getBytes());

        message = new XMLMessage(new MessageImpl());
        message.put(Message.CONTENT_TYPE, contentType);
        message.setContent(InputStream.class, inputStream);
        message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, System
                .getProperty("java.io.tmpdir"));
        message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, String
View Full Code Here

        Message message;

        inputStream = new ByteArrayInputStream(data.getBytes());

        message = new XMLMessage(new MessageImpl());
        message.put(Message.CONTENT_TYPE, contentType);
        message.setContent(InputStream.class, inputStream);
        message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, System
                .getProperty("java.io.tmpdir"));
        message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, String
View Full Code Here

        Message message;

        inputStream = new ByteArrayInputStream(data.getBytes());

        message = new XMLMessage(new MessageImpl());
        message.put(Message.CONTENT_TYPE, contentType);
        message.setContent(InputStream.class, inputStream);
        message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, System
                .getProperty("java.io.tmpdir"));
        message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, String
View Full Code Here

            if (ct == null) {
                ct = "text/xml";
            }
            m.put(Message.CONTENT_TYPE, ct);
        }
        return new XMLMessage(m);
    }
View Full Code Here

        return createMessage(new MessageImpl());
    }

    public Message createMessage(Message m) {
        m.put(Message.CONTENT_TYPE, "text/xml");
        return new XMLMessage(m);
    }
View Full Code Here

        InputStream is = getTestStream("../resources/sayHiDocLitBareReq.xml");
        assertNotNull(is);

        MessageImpl msg = new MessageImpl();
        msg.setContent(InputStream.class, is);
        XMLMessage xmlMsg = new XMLMessage(msg);

        Object source = reader.read(null, xmlMsg, DOMSource.class);
        assertNotNull(source);
        assertTrue(XMLUtils.toString((Source)source).contains(expected));
    }
View Full Code Here

        InputStream is = getTestStream("../resources/emptyReq.xml");
        assertNotNull(is);

        MessageImpl msg = new MessageImpl();
        msg.setContent(InputStream.class, is);
        XMLMessage xmlMsg = new XMLMessage(msg);

        Object source = reader.read(null, xmlMsg, DOMSource.class);
        assertNull(source);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.message.XMLMessage

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.