|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
SOAPMessage and
XMLInvocationHelper.
represents a generic XML-based message containing header(s) and body(ies)
| Field Summary | |
static int |
LOC_BODY
Deprecated. Constant for accessing attributes/namespaces of SOAP body |
static int |
LOC_ENVELOPE
Deprecated. Constant for accessing attributes/namespaces of SOAP envelope |
static int |
LOC_HEADER
Deprecated. Constant for accessing attributes/namespaces of SOAP header |
| Method Summary | |
void |
addHeader(QName headerName,
java.util.Map properties,
java.lang.String content)
Deprecated. Adds header with given name and content at the end of the list of headers for this message instance. |
void |
addHeader(QName headerName,
java.util.Map properties,
java.lang.String content,
int pos)
Deprecated. Inserts header with given name and content at the given position in the list of headers for this message instance. |
void |
addHeader(QName headerName,
java.util.Map properties,
Tokenizer content)
Deprecated. Use addHeader(Tokenizer content) instead. |
void |
addHeader(QName headerName,
java.util.Map properties,
Tokenizer content,
int pos)
Deprecated. Use addHeader(Tokenizer content, int pos) instead. |
void |
addHeader(Tokenizer content)
Deprecated. Adds new header with given content. |
void |
addHeader(Tokenizer content,
int pos)
Deprecated. Adds new header with given content. |
MessagePart |
createBody()
Deprecated. |
MessagePart |
createBody(Tokenizer body)
Deprecated. tokenizer containing the body of the message |
Fault |
createFault()
Deprecated. Creates a new fault for this message. |
QName |
getAttrQNameEncodingStyle()
Deprecated. Returns QName of the attribute encodingStyle |
QName |
getAttrQNameMustUnderstand()
Deprecated. Returns QName of the attribute mustUnderstand |
QName |
getAttrQNameRole()
Deprecated. Returns QName of the attribute role (actor in SOAP 1.1) |
MessagePart |
getBody()
Deprecated. Returns the whole body. |
java.lang.String |
getElementAttribute(QName attributeName,
int location)
Deprecated. returns attribute defined on envelope, header or body element |
Fault |
getFault()
Deprecated. Returns a fault contained in this message. |
Tokenizer |
getHeader(int pos)
Deprecated. Returns header for given index. |
Tokenizer |
getHeader(QName headerName)
Deprecated. Returns header with given header name or null
if no such header found. |
MessagePart |
getHeaderAsPart(int pos)
Deprecated. Returns header for given index. |
MessagePart |
getHeaderAsPart(QName headerName)
Deprecated. Returns header for given name. |
java.lang.String |
getHeaderAsString(int pos)
Deprecated. Returns header for given index. |
java.lang.String |
getHeaderAsString(QName headerName)
Deprecated. Returns header for given name. |
int |
getHeaderCount()
Deprecated. Returns number of headers for this message instance |
java.lang.String |
getNamespace(java.lang.String prefix,
int location)
Deprecated. returns namespace for a given prefix |
void |
initFault()
Deprecated. use initFault(boolean needsBody) instead. |
void |
initFault(boolean needsBody)
Deprecated. This method prepares the message instance for fault generation. |
void |
initInput()
Deprecated. Prepares this Message instance for receiving of the
input data. |
void |
initOutput()
Deprecated. use initOutput(boolean needsBody) instead. |
void |
initOutput(boolean needsBody)
Deprecated. This method prepares the message instance for reply generation. |
boolean |
isFault()
Deprecated. returns whether this message contains SOAP Fault. |
void |
releaseMessagePart(MessagePart part)
Deprecated. called when the message part is no longer used |
void |
removeHeader(int pos)
Deprecated. Removes header on given position from the list of headers for this message instance. |
void |
removeHeader(QName headerName)
Deprecated. Removes header with given name from the list of headers for this instance. |
void |
send()
Deprecated. creates a transport output stream (if not already created) and writes out the message. |
void |
setElementAttribute(QName attributeName,
java.lang.String attributeValue,
int location)
Deprecated. sets attribute on envelope, header or body element |
void |
setNamespace(java.lang.String prefix,
java.lang.String namespace,
int location)
Deprecated. sets namespace-prefix binding |
| Field Detail |
public static final int LOC_ENVELOPE
public static final int LOC_HEADER
public static final int LOC_BODY
| Method Detail |
public int getHeaderCount()
public Tokenizer getHeader(int pos)
Tokenizer interface instance, which is initially
in the START_TOKEN state
This method cannot be combined with getHeaderAsString
methods, because those methods, except the internal
XML Tokenizer, will be in initial state.
pos - the position of the header
public Tokenizer getHeader(QName headerName)
throws MultipleHeadersException
null
if no such header found.
This method cannot be combined with getHeaderAsString
methods, because those methods, except the internal
XML Tokenizer, will be in initial state.
headerName - name of the header
MultipleHeadersException - if multiple headers have given namepublic MessagePart getHeaderAsPart(int pos)
MessagePart interface instance.
pos - position of the part
public MessagePart getHeaderAsPart(QName headerName)
throws MultipleHeadersException
MessagePart interface instance.
headerName - name of the header
null if not found
MultipleHeadersException - if more than one header with
the same QName has been found
public java.lang.String getHeaderAsString(int pos)
throws MessageProcessingException
null when no content is present or
the header contains subelements.
This method cannot be combined with getHeader methods,
because it changes state of the internal XML Tokenizer.
The header is removed from the list of headers for this message instance, so it cannot be retrieved again using any getHeader method.
pos - index of the header
null otherwise.
MessageProcessingException - if the content of the header is
not one string
public java.lang.String getHeaderAsString(QName headerName)
throws MessageProcessingException,
MultipleHeadersException
null when no content is present or
the header contains subelements.
This method cannot be combined with getHeader methods,
because it changes state of the internal XML Tokenizer.
The header is removed from the list of headers for this message instance, so it cannot be retrieved again using any getHeader method.
headerName - name of the header
null otherwise.
MultipleHeadersException - if more than one header with
the same QName has been found
MessageProcessingException - if the content of the header is
not one string
public void addHeader(Tokenizer content)
throws TokenizerException,
java.io.IOException,
MessageProcessingException
content - content of the header to be added including the
header's root element with attributes
TokenizerException
java.io.IOException
MessageProcessingException
public void addHeader(Tokenizer content,
int pos)
throws TokenizerException,
java.io.IOException,
MessageProcessingException
content - content of the header to be added including the
header's root element with attributes.pos - position of the header in the message counting
from 0.
TokenizerException
java.io.IOException
MessageProcessingException
public void addHeader(QName headerName,
java.util.Map properties,
Tokenizer content)
throws java.io.IOException
addHeader(Tokenizer content) instead.
The content Tokenizer must be in the START_TOKEN or CONTENT
state.
headerName - fully qualified name of the headerproperties - additional properties (e.g. mustUnderstand, actor,
etc.) - see Constants interface
It can be null when no additional
properties for the header are needed.content - The Tokenizer interface instance
representing content of the header, can be
null when the header has no content
java.io.IOException - if there was io error
public void addHeader(QName headerName,
java.util.Map properties,
Tokenizer content,
int pos)
throws java.io.IOException
addHeader(Tokenizer content, int pos) instead.
The content Tokenizer must be in the START_TOKEN or CONTENT
state.
headerName - fully qualified name of the headerproperties - additional properties (e.g. mustUnderstand, actor,
etc.) - see Constants interface.
It can be null when no additional
properties for the header are needed.content - The Tokenizer interface instance
representing content of the header, can be
null when the header has no contentpos - position, where the header should placed in the
message
java.io.IOException - if there was io error
public void addHeader(QName headerName,
java.util.Map properties,
java.lang.String content)
throws java.io.IOException
The content is represented by java.lang.String instance
and is stored in the header as a content for the header element.
headerName - fully qualified name of the headerproperties - additional properties (e.g. mustUnderstand, actor,
etc.) - see Constants interface.
It can be null when no additional
properties for the header are needed.content - The java.lang.String instance
representing content of the header, can be
null when the header has no content
java.io.IOException - if there was io error
public void addHeader(QName headerName,
java.util.Map properties,
java.lang.String content,
int pos)
throws java.io.IOException
The content is represented by java.lang.String instance
and is stored in the header as a content for the header element.
headerName - fully qualified name of the headerproperties - additional properties (e.g. mustUnderstand, actor,
etc.) - see Constants interface.
It can be null when no additional
properties for the header are needed.content - The java.lang.String instance
representing content of the header, can be
null when the header has no contentpos - position, where the header should placed in the
message
java.io.IOException - if there was an io errorpublic void removeHeader(int pos)
pos - position of the header
public void removeHeader(QName headerName)
throws MultipleHeadersException
headerName - name of the header
MultipleHeadersException - if multiple headers have given name
public MessagePart getBody()
throws MessageProcessingException
MessageProcessingException - if there an error getting/parsing the body of the SOAP Message
public void initInput()
throws java.io.IOException,
MessageProcessingException
Message instance for receiving of the
input data. It parses all headers from the incoming connection and
positions itself on the first tag after Body envelope tag.
java.io.IOException - if there is an io error
MessageProcessingException - if the message is malformed
public void initOutput()
throws java.io.IOException
initOutput(boolean needsBody) instead.
It needs to be called whenever the message instance is shared for both request and reply. It must be called after the runtime finishes processing of the request because after this method, the request is no longer available in the message.
java.io.IOException - if there is an io error
public void initOutput(boolean needsBody)
throws java.io.IOException
It needs to be called whenever the message instance is shared for both request and reply. It must be called after the runtime finishes processing of the request because after this method, the request is no longer available in the message.
needsBody - if true, the message will cache all
TokenWriter calls done on the body part to
allow further reading and modification by header
processors using Tokenizer interface.
java.io.IOException - if there is an io error
public void initFault()
throws java.io.IOException
initFault(boolean needsBody) instead.
It needs to be called whenever the message instance is shared for both request and reply. It must be called after the runtime finishes processing of the request because after this method, the request is no longer available in the message.
java.io.IOException - if there is an io error
public void initFault(boolean needsBody)
throws java.io.IOException
It needs to be called whenever the message instance is shared for both request and reply. It must be called after the runtime finishes processing of the request because after this method, the request is no longer available in the message.
needsBody - if true, the message will cache all
TokenWriter calls done on the body part to
allow further reading and modification by header
processors using Tokenizer interface.
java.io.IOException - if there is an io error
public MessagePart createBody()
throws java.io.IOException
java.io.IOException
public MessagePart createBody(Tokenizer body)
throws TokenizerException,
java.io.IOException,
MessageProcessingException
body -
TokenizerException
java.io.IOException
MessageProcessingException
public void send()
throws java.io.IOException
This method must be called, otherwise the message will not be send over the transport connection.
java.io.IOException - if there is an io error
public Fault getFault()
throws MessageProcessingException
The returned fault instance can be read using methods of the
Fault interface.
MessageProcessingException - if the message is malformed
public boolean isFault()
throws MessageProcessingException
MessageProcessingException - if the message is malformed
public Fault createFault()
throws java.io.IOException
The returned fault instance should be filled using methods on the
Fault interface and then send() method
on the message must be called for the message with fault to be sent.
java.io.IOException - if there was io error
public java.lang.String getElementAttribute(QName attributeName,
int location)
attributeName - the name of the attributelocation - the location of the attribute (one of LOC_XXX constants)
public void setElementAttribute(QName attributeName,
java.lang.String attributeValue,
int location)
attributeName - the name of the attributeattributeValue - the value of the attributelocation - the location of the attribute (one of LOC_XXX constants)
public java.lang.String getNamespace(java.lang.String prefix,
int location)
prefix - the prefix for which namespace should be returnedlocation - the location where the prefix should be
resolved (one of LOC_XXX constants)
public void setNamespace(java.lang.String prefix,
java.lang.String namespace,
int location)
prefix - the prefix that should be bound to the namespacenamespace - the namespace to be boundlocation - the location where the prefix should be
generated (one of LOC_XXX constants)public void releaseMessagePart(MessagePart part)
public QName getAttrQNameEncodingStyle()
QName of the attribute encodingStyle
QName of the attribute encodingStylepublic QName getAttrQNameMustUnderstand()
QName of the attribute mustUnderstand
QName of the attribute mustUnderstandpublic QName getAttrQNameRole()
QName of the attribute role (actor in SOAP 1.1)
QName of the attribute role (actor in SOAP 1.1)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||