public abstract SOAPMessage createMessage (MimeHeaders headers, InputStream in) throws IOException, SOAPException

Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.

Parameters:
in    the InputStream object that contains the data for a message
headers    the transport-specific headers passed to the message in a transport-independent fashion for creation of the message

Returns:  a new SOAPMessage object containing the data from the given InputStream object

Exceptions:
IOException    if there is a problem in reading data from the input stream
SOAPException    may be thrown if the message is invalid
IllegalArgumentException    if the MessageFactory requires one or more MIME headers to be present in the headers parameter and they are missing. MessageFactory implementations for SOAP_1_1_PROTOCOL or SOAP_1_2_PROTOCOL must not throw IllegalArgumentException for this reason.