Upgraded to XMLUnit 1.1

Made SaajImplementation package-local
This commit is contained in:
Arjen Poutsma
2007-11-07 09:14:01 +00:00
parent 4b3cf97be9
commit 888e8a9960
5 changed files with 70 additions and 64 deletions

View File

@@ -60,7 +60,7 @@ import org.xml.sax.InputSource;
* @author Arjen Poutsma
* @since 1.0.0
*/
public class Saaj11Implementation implements SaajImplementation {
class Saaj11Implementation extends SaajImplementation {
private static final Saaj11Implementation INSTANCE = new Saaj11Implementation();

View File

@@ -55,7 +55,7 @@ import org.springframework.ws.transport.TransportOutputStream;
* @author Arjen Poutsma
* @since 1.0.0
*/
public class Saaj12Implementation implements SaajImplementation {
class Saaj12Implementation extends SaajImplementation {
private static final Saaj12Implementation INSTANCE = new Saaj12Implementation();

View File

@@ -52,7 +52,7 @@ import org.springframework.ws.transport.TransportOutputStream;
* @author Arjen Poutsma
* @since 1.0.0
*/
public class Saaj13Implementation implements SaajImplementation {
class Saaj13Implementation extends SaajImplementation {
private static final Saaj13Implementation INSTANCE = new Saaj13Implementation();

View File

@@ -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;
}

26
pom.xml
View File

@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws</artifactId>
@@ -92,8 +93,10 @@
</license>
</licenses>
<scm>
<connection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk</connection>
<developerConnection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk</developerConnection>
<connection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk
</connection>
<developerConnection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk
</developerConnection>
<url>http://fisheye3.cenqua.com/browse/springframework/spring-ws/trunk</url>
</scm>
<modules>
@@ -230,19 +233,20 @@
<postProcess>
<copy todir="target/site/reference">
<fileset dir="target/docbkx">
<include name="**/*.html" />
<include name="**/*.pdf" />
<include name="**/*.html"/>
<include name="**/*.pdf"/>
</fileset>
</copy>
<copy todir="target/site/reference/html">
<fileset dir="src/docbkx/resources">
<include name="**/*.css" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
<move file="target/site/reference/pdf/index.pdf" tofile="target/site/reference/pdf/spring-ws-reference.pdf" failonerror="false" />
<move file="target/site/reference/pdf/index.pdf"
tofile="target/site/reference/pdf/spring-ws-reference.pdf" failonerror="false"/>
</postProcess>
</configuration>
</plugin>
@@ -660,7 +664,7 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.0</version>
<version>1.1</version>
<scope>test</scope>
</dependency>
</dependencies>