Package com.sun.xml.ws.message

Examples of com.sun.xml.ws.message.EmptyMessageImpl


     *      The SOAP version of the message. Must not be null.
     */
    public static Message createUsingPayload(Source payload, SOAPVersion ver) {
        if (payload instanceof DOMSource) {
            if (((DOMSource)payload).getNode() == null) {
                return new EmptyMessageImpl(ver);
            }
        } else if (payload instanceof StreamSource) {
            StreamSource ss = (StreamSource)payload;
            if (ss.getInputStream() == null && ss.getReader() == null && ss.getSystemId() == null) {
                return new EmptyMessageImpl(ver);
            }
        } else if (payload instanceof SAXSource) {
            SAXSource ss = (SAXSource)payload;
            if (ss.getInputSource() == null && ss.getXMLReader() == null) {
                return new EmptyMessageImpl(ver);
            }
        }
        return new PayloadSourceMessage(payload, ver);
    }
View Full Code Here


        if(body==null)
            throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope);
        Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");

        if(payload==null) {
            return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver);
        } else {
            return new DOMMessage(ver,headers,payload);
        }
    }
View Full Code Here

    /**
     * Creates a {@link Message} that doesn't have any payload.
     */
    public static Message createEmpty(SOAPVersion soapVersion) {
        return new EmptyMessageImpl(soapVersion);
    }
View Full Code Here

        public Object getPayload(JAXBContext context) {
            return null;
        }

        public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) {
            return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion());
        }
View Full Code Here

        public Object getPayload(BindingContext context) {
            return null;
        }

        public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
            return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion());
        }
View Full Code Here

     *      The SOAP version of the message. Must not be null.
     */
    public static Message createUsingPayload(Source payload, SOAPVersion ver) {
        if (payload instanceof DOMSource) {
            if (((DOMSource)payload).getNode() == null) {
                return new EmptyMessageImpl(ver);
            }
        } else if (payload instanceof StreamSource) {
            StreamSource ss = (StreamSource)payload;
            if (ss.getInputStream() == null && ss.getReader() == null && ss.getSystemId() == null) {
                return new EmptyMessageImpl(ver);
            }
        } else if (payload instanceof SAXSource) {
            SAXSource ss = (SAXSource)payload;
            if (ss.getInputSource() == null && ss.getXMLReader() == null) {
                return new EmptyMessageImpl(ver);
            }
        }
        return new PayloadSourceMessage(payload, ver);
    }
View Full Code Here

        if(body==null)
            throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope);
        Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");

        if(payload==null) {
            return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver);
        } else {
            return new DOMMessage(ver,headers,payload);
        }
    }
View Full Code Here

    /**
     * Creates a {@link Message} that doesn't have any payload.
     */
    public static Message createEmpty(SOAPVersion soapVersion) {
        return new EmptyMessageImpl(soapVersion);
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.message.EmptyMessageImpl

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.