Methods Summary |
---|
public javax.xml.soap.SOAPBodyElement | addBodyElement(javax.xml.soap.Name name)
SOAPBodyElement bodyElement = new SOAPBodyElement(name);
addChildElement(bodyElement);
return bodyElement;
|
void | addBodyElement(SOAPBodyElement element)
if (log.isDebugEnabled())
log.debug(Messages.getMessage("addBody00"));
try {
addChildElement(element);
} catch (SOAPException ex) {
// class cast should never fail when parent is a SOAPBody
log.fatal(Messages.getMessage("exception00"), ex);
}
|
public void | addChild(MessageElement element)
// Commented out for SAAJ compatibility - gdaniels, 05/19/2003
// if (!(element instanceof javax.xml.soap.SOAPBodyElement)) {
// throw new SOAPException(Messages.getMessage("badSOAPBodyElement00"));
// }
element.setEnvelope(getEnvelope());
super.addChild(element);
|
public javax.xml.soap.SOAPElement | addChildElement(javax.xml.soap.SOAPElement element)
// Commented out for SAAJ compatibility - gdaniels, 05/19/2003
// if (!(element instanceof javax.xml.soap.SOAPBodyElement)) {
// throw new SOAPException(Messages.getMessage("badSOAPBodyElement00"));
// }
SOAPElement child = super.addChildElement(element);
setDirty();
return child;
|
public javax.xml.soap.SOAPElement | addChildElement(javax.xml.soap.Name name)
SOAPBodyElement child = new SOAPBodyElement(name);
addChildElement(child);
return child;
|
public javax.xml.soap.SOAPElement | addChildElement(java.lang.String localName)
// Inherit parent's namespace
SOAPBodyElement child = new SOAPBodyElement(getNamespaceURI(),
localName);
addChildElement(child);
return child;
|
public javax.xml.soap.SOAPElement | addChildElement(java.lang.String localName, java.lang.String prefix)
SOAPBodyElement child =
new SOAPBodyElement(getNamespaceURI(prefix), localName);
child.setPrefix(prefix);
addChildElement(child);
return child;
|
public javax.xml.soap.SOAPElement | addChildElement(java.lang.String localName, java.lang.String prefix, java.lang.String uri)
SOAPBodyElement child = new SOAPBodyElement(uri, localName);
child.setPrefix(prefix);
child.addNamespaceDeclaration(prefix, uri);
addChildElement(child);
return child;
|
public javax.xml.soap.SOAPBodyElement | addDocument(org.w3c.dom.Document document)
SOAPBodyElement bodyElement = new SOAPBodyElement(document.getDocumentElement());
addChildElement(bodyElement);
return bodyElement;
|
public javax.xml.soap.SOAPFault | addFault(javax.xml.soap.Name name, java.lang.String s, java.util.Locale locale)
AxisFault af = new AxisFault(new QName(name.getURI(), name.getLocalName()), s, "", new Element[0]);
SOAPFault fault = new SOAPFault(af);
addChildElement(fault);
return fault;
|
public javax.xml.soap.SOAPFault | addFault(javax.xml.soap.Name name, java.lang.String s)
AxisFault af = new AxisFault(new QName(name.getURI(), name.getLocalName()), s, "", new Element[0]);
SOAPFault fault = new SOAPFault(af);
addChildElement(fault);
return fault;
|
public javax.xml.soap.SOAPFault | addFault()
AxisFault af = new AxisFault(new QName(Constants.NS_URI_AXIS, Constants.FAULT_SERVER_GENERAL), "", "", new Element[0]);
SOAPFault fault = new SOAPFault(af);
addChildElement(fault);
return fault;
|
void | clearBody()
removeContents();
|
public void | disableFormatting()
this.disableFormatting = true;
|
SOAPBodyElement | getBodyByName(java.lang.String namespace, java.lang.String localPart)
QName name = new QName(namespace, localPart);
return (SOAPBodyElement)getChildElement(name);
|
java.util.Vector | getBodyElements()
initializeChildren();
return new Vector(getChildren());
|
public javax.xml.soap.SOAPFault | getFault()
List bodyElements = getChildren();
if (bodyElements != null) {
Iterator e = bodyElements.iterator();
while (e.hasNext()) {
Object element = e.next();
if(element instanceof javax.xml.soap.SOAPFault) {
return (javax.xml.soap.SOAPFault) element;
}
}
}
return null;
|
SOAPBodyElement | getFirstBody()
if (!hasChildNodes())
return null;
return (SOAPBodyElement)getChildren().get(0);
|
public boolean | hasFault()
return (getFault() != null);
|
protected void | outputImpl(org.apache.axis.encoding.SerializationContext context)
boolean oldPretty = context.getPretty();
if (!disableFormatting) {
context.setPretty(true);
} else {
context.setPretty(false);
}
List bodyElements = getChildren();
if (bodyElements == null || bodyElements.isEmpty()) {
// This is a problem.
// throw new Exception("No body elements!");
// If there are no body elements just return - it's ok that
// the body is empty
}
// Output <SOAP-ENV:Body>
context.startElement(new QName(soapConstants.getEnvelopeURI(),
Constants.ELEM_BODY),
getAttributesEx());
if (bodyElements != null) {
Iterator e = bodyElements.iterator();
while (e.hasNext()) {
MessageElement body = (MessageElement)e.next();
body.output(context);
// Output this body element.
}
}
// Output multi-refs if appropriate
context.outputMultiRefs();
// Output </SOAP-ENV:Body>
context.endElement();
context.setPretty(oldPretty);
|
void | removeBodyElement(SOAPBodyElement element)
if (log.isDebugEnabled())
log.debug(Messages.getMessage("removeBody00"));
removeChild( (MessageElement)element );
|
public void | setEncodingStyle(java.lang.String encodingStyle)
if (encodingStyle == null) {
encodingStyle = "";
}
if (doSAAJEncodingCompliance) {
// Make sure this matches a known encodingStyle. This is
if (!knownEncodingStyles.contains(encodingStyle))
throw new IllegalArgumentException(Messages.getMessage("badEncodingStyle1", encodingStyle));
}
super.setEncodingStyle(encodingStyle);
|
public void | setParentElement(javax.xml.soap.SOAPElement parent)
if(parent == null) {
throw new IllegalArgumentException(Messages.getMessage("nullParent00"));
}
try {
SOAPEnvelope env = (SOAPEnvelope)parent;
super.setParentElement(env);
setEnvelope(env);
} catch (Throwable t) {
throw new SOAPException(t);
}
|
public void | setSAAJEncodingCompliance(boolean comply)
this.doSAAJEncodingCompliance = true;
|