public class DefaultMessage2SOAPGenerator extends java.lang.Object implements Message2SOAPGenerator
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMessage2SOAPGenerator.ReusableByteArrayOutputStream |
| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayBuffer |
bufferCurrentlyInUse |
protected MessageSerializer |
msgSerializer |
protected Ws4dXmlSerializer |
xmlSerializer |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultMessage2SOAPGenerator()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStandardNamespaces(Message msg,
IPConnectionInfo connectionInfo,
Ws4dXmlSerializer serializer)
Serialize the Standardnamespaces and the specific Namespaces to the messages
|
ByteArrayBuffer |
generateSOAPMessage(Message msg,
IPConnectionInfo ci,
AttributedURI optionalMessageId,
boolean includeXAddrsInHello)
Serialize an DPWS Message Object to an array of bytes.
|
void |
generateSOAPMessage(java.io.OutputStream out,
Message msg,
IPConnectionInfo ci,
AttributedURI optionalMessageId)
Serialize an DPWS Message Object to the given output stream.
|
ByteArrayBuffer |
getCurrentBuffer()
Return the current buffer of this instance
|
protected void |
internalGenerateSOAPMessage(Message msg,
IPConnectionInfo connectionInfo,
AttributedURI optionalMessageId,
boolean includeXAddrsInHello,
java.io.OutputStream out)
Builds the SOAP Message and sends it
|
void |
returnCurrentBufferToCache()
Return the current buffer of this instance to the cache for reuse
|
protected Ws4dXmlSerializer xmlSerializer
protected MessageSerializer msgSerializer
protected ByteArrayBuffer bufferCurrentlyInUse
protected DefaultMessage2SOAPGenerator()
public void generateSOAPMessage(java.io.OutputStream out,
Message msg,
IPConnectionInfo ci,
AttributedURI optionalMessageId)
throws java.lang.IllegalArgumentException,
WS4DIllegalStateException,
java.io.IOException,
DiscoveryProxyProbeMatchesException
Message2SOAPGeneratorgenerateSOAPMessage in interface Message2SOAPGeneratorout - stream, to which the element should be serialized.java.lang.IllegalArgumentExceptionWS4DIllegalStateExceptionjava.io.IOExceptionDiscoveryProxyProbeMatchesExceptionpublic void returnCurrentBufferToCache()
Message2SOAPGeneratorreturnCurrentBufferToCache in interface Message2SOAPGeneratorpublic ByteArrayBuffer getCurrentBuffer()
Message2SOAPGeneratorgetCurrentBuffer in interface Message2SOAPGenerator generateSOAPMessage(Message msg,
ConnectionInfo ci)public ByteArrayBuffer generateSOAPMessage(Message msg, IPConnectionInfo ci, AttributedURI optionalMessageId, boolean includeXAddrsInHello) throws java.io.IOException, DiscoveryProxyProbeMatchesException
Message2SOAPGenerator
ATTENTION: When the message generated by this method is not needed anymore return it
for reuse by calling returnBuffer(ByteArrayBuffer buffer)
generateSOAPMessage in interface Message2SOAPGeneratormsg - the message which is use to get the Informationjava.io.IOExceptionDiscoveryProxyProbeMatchesExceptionprotected void internalGenerateSOAPMessage(Message msg, IPConnectionInfo connectionInfo, AttributedURI optionalMessageId, boolean includeXAddrsInHello, java.io.OutputStream out) throws java.io.IOException, DiscoveryProxyProbeMatchesException
msg - connectionInfo - java.io.IOExceptionDiscoveryProxyProbeMatchesExceptionprotected void addStandardNamespaces(Message msg, IPConnectionInfo connectionInfo, Ws4dXmlSerializer serializer) throws java.io.IOException
msg - java.io.IOException