net.javacrumbs.smock.common
Interface MessageFactory


public interface MessageFactory

The WebServiceMessageFactory serves as a factory for WebServiceMessages.

Allows the creation of empty messages, or messages based on InputStreams. Copy of from Spring WS WebServiceMessageFactory. We do not want to be dependent on Spring WS here, in common library.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
WebServiceMessage

Method Summary
 Message createWebServiceMessage()
          Creates a new, empty WebServiceMessage.
 Message createWebServiceMessage(InputStream inputStream)
          Reads a WebServiceMessage from the given input stream.
 

Method Detail

createWebServiceMessage

Message createWebServiceMessage()
Creates a new, empty WebServiceMessage.

Returns:
the empty message

createWebServiceMessage

Message createWebServiceMessage(InputStream inputStream)
                                throws IOException
Reads a WebServiceMessage from the given input stream.

If the given stream is an instance of TransportInputStream, the headers will be read from the request.

Parameters:
inputStream - the inputstream to read the message from
Returns:
the created message
Throws:
IOException - if an I/O exception occurs


Copyright © 2011. All Rights Reserved.