Methods Summary |
---|
public javax.xml.soap.SOAPBody | addBody()Add a soap body if one does not exist
if (body == null) {
body = new SOAPBody(this, soapConstants);
_isDirty = true;
body.setOwnerDocument(getOwnerDocument());
return body;
} else {
throw new SOAPException(Messages.getMessage("bodyPresent"));
}
|
public void | addBodyElement(SOAPBodyElement element)Add a SOAP Body Element
if (body == null) {
body = new SOAPBody(this, soapConstants);
}
element.setEnvelope(this);
body.addBodyElement(element);
_isDirty = true;
|
public void | addHeader(SOAPHeaderElement hdr)Add a HeaderElement
if (header == null) {
header = new SOAPHeader(this, soapConstants);
}
hdr.setEnvelope(this);
header.addHeader(hdr);
_isDirty = true;
|
public javax.xml.soap.SOAPHeader | addHeader()Add a soap header if one does not exist
if (header == null) {
header = new SOAPHeader(this, soapConstants);
header.setOwnerDocument(getOwnerDocument());
return header;
} else {
throw new SOAPException(Messages.getMessage("headerPresent"));
}
|
public void | addTrailer(MessageElement element)Add an element to the trailer
if (log.isDebugEnabled())
log.debug(Messages.getMessage("removeTrailer00"));
element.setEnvelope(this);
trailers.addElement(element);
_isDirty = true;
|
protected void | childDeepCloned(NodeImpl oldNode, NodeImpl newNode)
if( oldNode == body )
{
body = (SOAPBody)newNode;
try {
body.setParentElement(this);
} catch (SOAPException ex) {
// class cast should never fail when parent is a SOAPEnvelope
log.fatal(Messages.getMessage("exception00"), ex);
}
}
else
if( oldNode == header )
{
header = (SOAPHeader)newNode;
}
|
public void | clearBody()clear the elements in the soap body
if (body != null) {
body.clearBody();
_isDirty = true;
}
|
public org.w3c.dom.Node | cloneNode(boolean deep)
SOAPEnvelope envelope = (SOAPEnvelope)super.cloneNode( deep );
if( !deep )
{
envelope.body = null;
envelope.header = null;
}
return envelope;
|
public javax.xml.soap.Name | createName(java.lang.String localName)create a Name given the local part
return new PrefixedQName(null, localName, null);
|
public javax.xml.soap.Name | createName(java.lang.String localName, java.lang.String prefix, java.lang.String uri)Create a name given local part, prefix and uri
return new PrefixedQName(uri, localName, prefix);
|
public javax.xml.soap.SOAPBody | getBody()Get the soap body
return body;
|
public SOAPBodyElement | getBodyByName(java.lang.String namespace, java.lang.String localPart)Get a body element given its name
if (body == null) {
return null;
} else {
return body.getBodyByName(namespace, localPart);
}
|
public java.util.Vector | getBodyElements()Get all the BodyElement's in the soap body
if (body != null) {
return body.getBodyElements();
} else {
return new Vector();
}
|
public SOAPBodyElement | getFirstBody()Get the first BodyElement in the SOAP Body
if (body == null) {
return null;
} else {
return body.getFirstBody();
}
|
public javax.xml.soap.SOAPHeader | getHeader()Get the soap header
return header;
|
public SOAPHeaderElement | getHeaderByName(java.lang.String namespace, java.lang.String localPart)Get a header by name (always respecting the currently in-scope
actors list)
return getHeaderByName(namespace, localPart, false);
|
public SOAPHeaderElement | getHeaderByName(java.lang.String namespace, java.lang.String localPart, boolean accessAllHeaders)Get a header by name, filtering for headers targeted at this
engine depending on the accessAllHeaders parameter.
if (header != null) {
return header.getHeaderByName(namespace,
localPart,
accessAllHeaders);
} else {
return null;
}
|
public java.util.Vector | getHeaders()Get Headers
if (header != null) {
return header.getHeaders();
} else {
return new Vector();
}
|
public java.util.Vector | getHeadersByActor(java.util.ArrayList actors)Get all the headers targeted at a list of actors.
if (header != null) {
return header.getHeadersByActor(actors);
} else {
return new Vector();
}
|
public java.util.Enumeration | getHeadersByName(java.lang.String namespace, java.lang.String localPart)Get an enumeration of header elements given the namespace and localpart
return getHeadersByName(namespace, localPart, false);
|
public java.util.Enumeration | getHeadersByName(java.lang.String namespace, java.lang.String localPart, boolean accessAllHeaders)Return an Enumeration of headers which match the given namespace
and localPart. Depending on the value of the accessAllHeaders
parameter, we will attempt to filter on the current engine's list
of actors.
!!! NOTE THAT RIGHT NOW WE ALWAYS ASSUME WE'RE THE "ULTIMATE
DESTINATION" (i.e. we match on null actor). IF WE WANT TO FULLY SUPPORT
INTERMEDIARIES WE'LL NEED TO FIX THIS.
if (header != null) {
return header.getHeadersByName(namespace,
localPart,
accessAllHeaders);
} else {
return new Vector().elements();
}
|
public java.lang.String | getMessageType()Get the Message Type (REQUEST/RESPONSE)
return messageType;
|
public org.apache.axis.soap.SOAPConstants | getSOAPConstants()Get the soap constants for this envelope
return soapConstants;
|
public org.apache.axis.schema.SchemaVersion | getSchemaVersion()Get the schema version for this envelope
return schemaVersion;
|
public java.util.Vector | getTrailers()Return trailers
return trailers;
|
public boolean | isRecorded()
return recorded;
|
public void | outputImpl(org.apache.axis.encoding.SerializationContext context)Should make SOAPSerializationException?
boolean oldPretty = context.getPretty();
context.setPretty(true);
// Register namespace prefixes.
if (namespaces != null) {
for (Iterator i = namespaces.iterator(); i.hasNext(); ) {
Mapping mapping = (Mapping)i.next();
context.registerPrefixForURI(mapping.getPrefix(),
mapping.getNamespaceURI());
}
}
Enumeration enumeration;
// Output <SOAP-ENV:Envelope>
context.startElement(new QName(soapConstants.getEnvelopeURI(),
Constants.ELEM_ENVELOPE), attributes);
// Output <SOAP-ENV:Envelope>'s each child as it appears.
Iterator i = getChildElements();
while (i.hasNext()) {
NodeImpl node = (NodeImpl)i.next();
if (node instanceof SOAPHeader) {
header.outputImpl(context);
} else if (node instanceof SOAPBody) {
body.outputImpl(context);
} else if (node instanceof MessageElement) {
((MessageElement)node).output(context);
} else {
node.output(context);
}
}
// Output trailers
enumeration = trailers.elements();
while (enumeration.hasMoreElements()) {
MessageElement element = (MessageElement)enumeration.nextElement();
element.output(context);
// Output this independent element
}
// Output </SOAP-ENV:Envelope>
context.endElement();
context.setPretty(oldPretty);
|
public void | removeBody()Remove the SOAP Body
if (body != null) {
removeChild(body);
}
body = null;
|
public void | removeBodyElement(SOAPBodyElement element)Remove a Body Element from the soap body
if (body != null) {
body.removeBodyElement(element);
_isDirty = true;
}
|
public org.w3c.dom.Node | removeChild(org.w3c.dom.Node oldChild)
if(oldChild == header) {
header = null;
} else if(oldChild == body) {
body = null;
}
return super.removeChild(oldChild);
|
public void | removeHeader(SOAPHeaderElement hdr)Remove a Header Element from SOAP Header
if (header != null) {
header.removeHeader(hdr);
_isDirty = true;
}
|
public void | removeHeaders()Remove all headers
if (header != null) {
removeChild(header);
}
header = null;
|
public void | removeTrailer(MessageElement element)Remove an element from the trailer
if (log.isDebugEnabled())
log.debug(Messages.getMessage("removeTrailer00"));
trailers.removeElement(element);
_isDirty = true;
|
public void | setBody(SOAPBody body)Set the soap body
if(this.body != null) {
removeChild(this.body);
}
this.body = body;
try {
body.setParentElement(this);
} catch (SOAPException ex) {
// class cast should never fail when parent is a SOAPEnvelope
log.fatal(Messages.getMessage("exception00"), ex);
}
|
public void | setDirty(boolean dirty)
if (recorder != null && !_isDirty && dirty && isRecorded()){
recorder.clear();
recorder = null;
}
setDirty();
|
public void | setHeader(SOAPHeader hdr)Set the SOAP Header
if(this.header != null) {
removeChild(this.header);
}
header = hdr;
try {
header.setParentElement(this);
} catch (SOAPException ex) {
// class cast should never fail when parent is a SOAPEnvelope
log.fatal(Messages.getMessage("exception00"), ex);
}
|
public void | setMessageType(java.lang.String messageType)Set the Message Type (REQUEST/RESPONSE)
this.messageType = messageType;
|
public void | setOwnerDocument(org.apache.axis.SOAPPart sp)
super.setOwnerDocument(sp);
if(body != null) {
body.setOwnerDocument(sp);
setOwnerDocumentForChildren(((NodeImpl)body).children, sp);
}
if(header != null){
header.setOwnerDocument(sp);
setOwnerDocumentForChildren(((NodeImpl)body).children, sp);
}
|
private void | setOwnerDocumentForChildren(java.util.List children, org.apache.axis.SOAPPart sp)
if (children == null) {
return;
}
int size = children.size();
for (int i = 0; i < size; i++) {
NodeImpl node = (NodeImpl) children.get(i);
node.setOwnerDocument(sp);
setOwnerDocumentForChildren(node.children, sp); // recursively
}
|
public void | setRecorded(boolean recorded)
this.recorded = recorded;
|
public void | setSAAJEncodingCompliance(boolean comply)
this.body.setSAAJEncodingCompliance(comply);
|
public void | setSchemaVersion(org.apache.axis.schema.SchemaVersion schemaVersion)Set the schema version for this envelope
this.schemaVersion = schemaVersion;
|
public void | setSoapConstants(org.apache.axis.soap.SOAPConstants soapConstants)Set the soap constants for this envelope
this.soapConstants = soapConstants;
|