|
|
|
|
@@ -43,152 +43,154 @@ import javax.xml.transform.Source;
|
|
|
|
|
* @author Arjen Poutsma
|
|
|
|
|
* @since 1.0.0
|
|
|
|
|
*/
|
|
|
|
|
public interface SaajImplementation {
|
|
|
|
|
abstract class SaajImplementation {
|
|
|
|
|
|
|
|
|
|
/** Returns the name of the given element. */
|
|
|
|
|
QName getName(SOAPElement element);
|
|
|
|
|
public abstract QName getName(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Returns the readable <code>Source</code> of the given element. */
|
|
|
|
|
Source getSource(SOAPElement element);
|
|
|
|
|
public abstract Source getSource(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Returns the writable <code>Result</code> of the given element. */
|
|
|
|
|
Result getResult(SOAPElement element);
|
|
|
|
|
public abstract Result getResult(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Returns the text of the given element */
|
|
|
|
|
String getText(SOAPElement element);
|
|
|
|
|
public abstract String getText(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Returns the text of the given element */
|
|
|
|
|
void setText(SOAPElement element, String content) throws SOAPException;
|
|
|
|
|
public abstract void setText(SOAPElement element, String content) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Adds an attribute to the specified element. */
|
|
|
|
|
void addAttribute(SOAPElement element, QName name, String value) throws SOAPException;
|
|
|
|
|
public abstract void addAttribute(SOAPElement element, QName name, String value) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Removes an attribute from the specified element. */
|
|
|
|
|
void removeAttribute(SOAPElement element, QName name) throws SOAPException;
|
|
|
|
|
public abstract void removeAttribute(SOAPElement element, QName name) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the attribute value * */
|
|
|
|
|
String getAttributeValue(SOAPElement element, QName name) throws SOAPException;
|
|
|
|
|
public abstract String getAttributeValue(SOAPElement element, QName name) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns all attributes as an iterator of QNames. * */
|
|
|
|
|
Iterator getAllAttibutes(SOAPElement element);
|
|
|
|
|
public abstract Iterator getAllAttibutes(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Returns the envelope of the given message. */
|
|
|
|
|
SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException;
|
|
|
|
|
public abstract SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the header of the given envelope. */
|
|
|
|
|
SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException;
|
|
|
|
|
public abstract SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the body of the given envelope. */
|
|
|
|
|
SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException;
|
|
|
|
|
public abstract SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Adds a header element to the given header. */
|
|
|
|
|
SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException;
|
|
|
|
|
public abstract SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns all header elements. */
|
|
|
|
|
Iterator examineAllHeaderElements(SOAPHeader header);
|
|
|
|
|
public abstract Iterator examineAllHeaderElements(SOAPHeader header);
|
|
|
|
|
|
|
|
|
|
/** Returns all header elements for which the must understand attribute is true, given the actor or role. */
|
|
|
|
|
Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole);
|
|
|
|
|
public abstract Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole);
|
|
|
|
|
|
|
|
|
|
/** Returns the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element. */
|
|
|
|
|
String getActorOrRole(SOAPHeaderElement headerElement);
|
|
|
|
|
public abstract String getActorOrRole(SOAPHeaderElement headerElement);
|
|
|
|
|
|
|
|
|
|
/** Sets the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element. */
|
|
|
|
|
void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole);
|
|
|
|
|
public abstract void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole);
|
|
|
|
|
|
|
|
|
|
/** Gets the must understand attribute for the given header element. */
|
|
|
|
|
boolean getMustUnderstand(SOAPHeaderElement headerElement);
|
|
|
|
|
public abstract boolean getMustUnderstand(SOAPHeaderElement headerElement);
|
|
|
|
|
|
|
|
|
|
/** Sets the must understand attribute for the given header element. */
|
|
|
|
|
void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand);
|
|
|
|
|
public abstract void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand);
|
|
|
|
|
|
|
|
|
|
/** Returns <code>true</code> if the body has a fault, <code>false</code> otherwise. */
|
|
|
|
|
boolean hasFault(SOAPBody body);
|
|
|
|
|
public abstract boolean hasFault(SOAPBody body);
|
|
|
|
|
|
|
|
|
|
/** Returns the fault for the given body, if any. */
|
|
|
|
|
SOAPFault getFault(SOAPBody body);
|
|
|
|
|
public abstract SOAPFault getFault(SOAPBody body);
|
|
|
|
|
|
|
|
|
|
/** Adds a fault to the given body. */
|
|
|
|
|
SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale) throws SOAPException;
|
|
|
|
|
public abstract SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale)
|
|
|
|
|
throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault code for the given fault. */
|
|
|
|
|
QName getFaultCode(SOAPFault fault);
|
|
|
|
|
public abstract QName getFaultCode(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Returns the actor for the given fault. */
|
|
|
|
|
String getFaultActor(SOAPFault fault);
|
|
|
|
|
public abstract String getFaultActor(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Sets the actor for the given fault. */
|
|
|
|
|
void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException;
|
|
|
|
|
public abstract void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault string for the given fault. */
|
|
|
|
|
String getFaultString(SOAPFault fault);
|
|
|
|
|
public abstract String getFaultString(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Returns the fault string language for the given fault. */
|
|
|
|
|
Locale getFaultStringLocale(SOAPFault fault);
|
|
|
|
|
public abstract Locale getFaultStringLocale(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Adds a detail entry to the given detail. */
|
|
|
|
|
DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException;
|
|
|
|
|
public abstract DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault detail for the given fault. */
|
|
|
|
|
Detail getFaultDetail(SOAPFault fault);
|
|
|
|
|
public abstract Detail getFaultDetail(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Adds a fault detail for the given fault. */
|
|
|
|
|
Detail addFaultDetail(SOAPFault fault) throws SOAPException;
|
|
|
|
|
public abstract Detail addFaultDetail(SOAPFault fault) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
void addTextNode(DetailEntry detailEntry, String text) throws SOAPException;
|
|
|
|
|
public abstract void addTextNode(DetailEntry detailEntry, String text) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns an iteration over all detail entries. */
|
|
|
|
|
Iterator getDetailEntries(Detail detail);
|
|
|
|
|
public abstract Iterator getDetailEntries(Detail detail);
|
|
|
|
|
|
|
|
|
|
/** Returns the first child element of the given body. */
|
|
|
|
|
SOAPElement getFirstBodyElement(SOAPBody body);
|
|
|
|
|
public abstract SOAPElement getFirstBodyElement(SOAPBody body);
|
|
|
|
|
|
|
|
|
|
/** Removes the contents (i.e. children) of the element. */
|
|
|
|
|
void removeContents(SOAPElement element);
|
|
|
|
|
public abstract void removeContents(SOAPElement element);
|
|
|
|
|
|
|
|
|
|
/** Writes the given message to the given stream. */
|
|
|
|
|
void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException;
|
|
|
|
|
public abstract void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException;
|
|
|
|
|
|
|
|
|
|
/** Returns the MIME headers of the message. */
|
|
|
|
|
MimeHeaders getMimeHeaders(SOAPMessage message);
|
|
|
|
|
public abstract MimeHeaders getMimeHeaders(SOAPMessage message);
|
|
|
|
|
|
|
|
|
|
/** Returns an iteration over all attachments in the message. */
|
|
|
|
|
Iterator getAttachments(SOAPMessage message);
|
|
|
|
|
public abstract Iterator getAttachments(SOAPMessage message);
|
|
|
|
|
|
|
|
|
|
/** Returns an iteration over all attachments in the message with the given headers. */
|
|
|
|
|
Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders);
|
|
|
|
|
public abstract Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders);
|
|
|
|
|
|
|
|
|
|
/** Adds an attachment to the given message. */
|
|
|
|
|
AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler);
|
|
|
|
|
public abstract AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler);
|
|
|
|
|
|
|
|
|
|
/** Adds a not understood header element to the given header. */
|
|
|
|
|
SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) throws SOAPException;
|
|
|
|
|
public abstract SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Adds a upgrade header element to the given header. */
|
|
|
|
|
SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris) throws SOAPException;
|
|
|
|
|
public abstract SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris)
|
|
|
|
|
throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault role. */
|
|
|
|
|
String getFaultRole(SOAPFault fault);
|
|
|
|
|
public abstract String getFaultRole(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Sets the fault role. */
|
|
|
|
|
void setFaultRole(SOAPFault fault, String role) throws SOAPException;
|
|
|
|
|
public abstract void setFaultRole(SOAPFault fault, String role) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault sub code. */
|
|
|
|
|
Iterator getFaultSubcodes(SOAPFault fault);
|
|
|
|
|
public abstract Iterator getFaultSubcodes(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Adds a fault sub code. */
|
|
|
|
|
void appendFaultSubcode(SOAPFault fault, QName subcode) throws SOAPException;
|
|
|
|
|
public abstract void appendFaultSubcode(SOAPFault fault, QName subcode) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault node. */
|
|
|
|
|
String getFaultNode(SOAPFault fault);
|
|
|
|
|
public abstract String getFaultNode(SOAPFault fault);
|
|
|
|
|
|
|
|
|
|
/** Sets the fault node. */
|
|
|
|
|
void setFaultNode(SOAPFault fault, String uri) throws SOAPException;
|
|
|
|
|
public abstract void setFaultNode(SOAPFault fault, String uri) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Returns the fault reason text. */
|
|
|
|
|
String getFaultReasonText(SOAPFault fault, Locale locale) throws SOAPException;
|
|
|
|
|
public abstract String getFaultReasonText(SOAPFault fault, Locale locale) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
/** Sets the fault reason text. */
|
|
|
|
|
void setFaultReasonText(SOAPFault fault, Locale locale, String text) throws SOAPException;
|
|
|
|
|
public abstract void setFaultReasonText(SOAPFault fault, Locale locale, String text) throws SOAPException;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|