Class PlainTextBuilder
- java.lang.Object
-
- org.apache.axis2.format.PlainTextBuilder
-
- All Implemented Interfaces:
Builder,DataSourceMessageBuilder,TextMessageBuilder
public class PlainTextBuilder extends Object implements TextMessageBuilder, DataSourceMessageBuilder
Message builder for plain text payloads.This builder processes the input message as plain text and wraps the text in a wrapper element. The name of the wrapper element can be configured as a service parameter (see
BaseConstants.WRAPPER_PARAM). It defaults toBaseConstants.DEFAULT_TEXT_WRAPPER. If the content is provided as anInputStreamand the content type specifies a charset parameter (e.g. text/plain; charset=ISO-8859-15), this information is used to decode the text. If the content is provided as anInputStreambut no charset parameter is specified on the content type, the default charset encoding specified byMessageContext.DEFAULT_CHAR_SET_ENCODINGis used.
-
-
Constructor Summary
Constructors Constructor Description PlainTextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OMElementprocessDocument(InputStream inputStream, String contentType, MessageContext msgContext)Process a message.OMElementprocessDocument(Reader reader, String contentType, MessageContext msgContext)OMElementprocessDocument(String content, String contentType, MessageContext msgContext)OMElementprocessDocument(DataSource dataSource, String contentType, MessageContext msgContext)
-
-
-
Method Detail
-
processDocument
public OMElement processDocument(InputStream inputStream, String contentType, MessageContext msgContext) throws AxisFault
Description copied from interface:BuilderProcess a message.The raw content of the message is provided as an input stream. It is the responsibility of the caller (typically a transport implementation) to close the stream after the message has been processed (more precisely after the SOAP infoset returned by this method is no longer used). This implies that implementations are not required to consume the input stream during the execution of this method. This enables deferred parsing of the message.
- Specified by:
processDocumentin interfaceBuilder- Parameters:
inputStream- the byte stream with the raw payload- Returns:
- The SOAP infoset for the given message.
- Throws:
AxisFault
-
processDocument
public OMElement processDocument(Reader reader, String contentType, MessageContext msgContext) throws AxisFault
- Specified by:
processDocumentin interfaceTextMessageBuilder- Throws:
AxisFault
-
processDocument
public OMElement processDocument(String content, String contentType, MessageContext msgContext) throws AxisFault
- Specified by:
processDocumentin interfaceTextMessageBuilder- Throws:
AxisFault
-
processDocument
public OMElement processDocument(DataSource dataSource, String contentType, MessageContext msgContext) throws AxisFault
- Specified by:
processDocumentin interfaceDataSourceMessageBuilder- Throws:
AxisFault
-
-