public class MessageFactoryImpl extends MessageFactory
Modifier and Type | Field and Description |
---|---|
protected boolean |
lazyAttachments |
protected OutputStream |
listener |
protected static Logger |
log |
Constructor and Description |
---|
MessageFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
SOAPMessage |
createMessage()
Creates a new
SOAPMessage object with the default
SOAPPart , SOAPEnvelope , SOAPBody ,
and SOAPHeader objects. |
SOAPMessage |
createMessage(boolean isFastInfoset,
boolean acceptFastInfoset) |
SOAPMessage |
createMessage(MimeHeaders headers,
InputStream in)
Internalizes the contents of the given
InputStream object into a
new SOAPMessage object and returns the SOAPMessage
object. |
SOAPMessage |
createMessage(MimeHeaders headers,
XMLStreamReader reader) |
SOAPMessage |
createMessage(String protocol) |
protected static String |
getContentType(MimeHeaders headers) |
OutputStream |
listen(OutputStream newListener) |
void |
setLazyAttachmentOptimization(boolean flag) |
newInstance, newInstance
protected static final Logger log
protected OutputStream listener
protected boolean lazyAttachments
public OutputStream listen(OutputStream newListener)
public SOAPMessage createMessage() throws SOAPException
MessageFactory
SOAPMessage
object with the default
SOAPPart
, SOAPEnvelope
, SOAPBody
,
and SOAPHeader
objects. Profile-specific message factories
can choose to prepopulate the SOAPMessage
object with
profile-specific headers.
Content can be added to this message's SOAPPart
object, and
the message can be sent "as is" when a message containing only a SOAP part
is sufficient. Otherwise, the SOAPMessage
object needs
to create one or more AttachmentPart
objects and
add them to itself. Any content that is not in XML format must be
in an AttachmentPart
object.
createMessage
in class MessageFactory
SOAPMessage
objectSOAPException
- if a SOAP error occurspublic SOAPMessage createMessage(String protocol) throws SOAPException
SOAPException
public SOAPMessage createMessage(boolean isFastInfoset, boolean acceptFastInfoset) throws SOAPException
SOAPException
public SOAPMessage createMessage(MimeHeaders headers, XMLStreamReader reader) throws SOAPException, IOException
SOAPException
IOException
public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws SOAPException, IOException
MessageFactory
InputStream
object into a
new SOAPMessage
object and returns the SOAPMessage
object.createMessage
in class MessageFactory
headers
- the transport-specific headers passed to the
message in a transport-independent fashion for creation of the
messagein
- the InputStream
object that contains the data
for a messageSOAPMessage
object containing the data from
the given InputStream
objectSOAPException
- may be thrown if the message is invalidIOException
- if there is a problem in reading data from
the input streamprotected static final String getContentType(MimeHeaders headers)
public void setLazyAttachmentOptimization(boolean flag)
Copyright © 2021 JBoss by Red Hat. All rights reserved.