Package com.sun.xml.internal.ws.encoding.xml.XMLMessage

Examples of com.sun.xml.internal.ws.encoding.xml.XMLMessage.MessageDataSource


    DataSource toReturnValue(Packet response) {

        Message message = response.getMessage();

        if (message instanceof MessageDataSource) {
            MessageDataSource hasDS = (MessageDataSource)message;
            // TODO Need to call hasUnconsumedDataSource()
            return hasDS.getDataSource();
        } else if (message instanceof PayloadSourceMessage) {
            return XMLMessage.getDataSource(message, binding);
        }
        return null;
    }
View Full Code Here


    public ContentType getStaticContentType(Packet packet) {
        setRootCodec(packet);

        ContentType ct = null;
        if (packet.getMessage() instanceof MessageDataSource) {
            final MessageDataSource mds = (MessageDataSource)packet.getMessage();
            if (mds.hasUnconsumedDataSource()) {
                ct = getStaticContentType(mds);
                return (ct != null)
                    ? _adaptingContentType.set(packet, ct)
                    : null;
            }
View Full Code Here

    @Override
    public ContentType encode(Packet packet, OutputStream out) throws IOException {
        setRootCodec(packet);

        if (packet.getMessage() instanceof MessageDataSource) {
            final MessageDataSource mds = (MessageDataSource)packet.getMessage();
            if (mds.hasUnconsumedDataSource())
                return _adaptingContentType.set(packet, encode(mds, out));
        }

        return _adaptingContentType.set(packet, super.encode(packet, out));
    }
View Full Code Here

    public ContentType getStaticContentType(Packet packet) {
        setRootCodec(packet);

        ContentType ct = null;
        if (packet.getMessage() instanceof MessageDataSource) {
            final MessageDataSource mds = (MessageDataSource)packet.getMessage();
            if (mds.hasUnconsumedDataSource()) {
                ct = getStaticContentType(mds);
                return (ct != null)
                    ? _adaptingContentType.set(packet, ct)
                    : null;
            }
View Full Code Here

    @Override
    public ContentType encode(Packet packet, OutputStream out) throws IOException {
        setRootCodec(packet);

        if (packet.getMessage() instanceof MessageDataSource) {
            final MessageDataSource mds = (MessageDataSource)packet.getMessage();
            if (mds.hasUnconsumedDataSource())
                return _adaptingContentType.set(packet, encode(mds, out));
        }

        return _adaptingContentType.set(packet, super.encode(packet, out));
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.ws.encoding.xml.XMLMessage.MessageDataSource

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.