com.sun.xml.ws.api.message
Interface MessageWritable


public interface MessageWritable

A Message implementation may implement this interface as an alternative way to write the message into the OutputStream.


Method Summary
 org.jvnet.ws.message.ContentType getContentType()
          Gets the Content-type of this message.
 org.jvnet.ws.message.ContentType writeTo(OutputStream out)
          Writes the XML infoset portion of this MessageContext (from <soap:Envelope> to </soap:Envelope>).
 

Method Detail

getContentType

org.jvnet.ws.message.ContentType getContentType()
Gets the Content-type of this message.

Returns:
The MIME content type of this message

writeTo

org.jvnet.ws.message.ContentType writeTo(OutputStream out)
                                         throws IOException
Writes the XML infoset portion of this MessageContext (from <soap:Envelope> to </soap:Envelope>).

Parameters:
out - Must not be null. The caller is responsible for closing the stream, not the callee.
Returns:
The MIME content type of this message (such as "application/xml"). This information is often ncessary by transport.
Throws:
IOException - if a OutputStream throws IOException.


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.