From 888e8a99602d4647617e7025da8241b4f9e9e396 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 7 Nov 2007 09:14:01 +0000 Subject: [PATCH] Upgraded to XMLUnit 1.1 Made SaajImplementation package-local --- .../ws/soap/saaj/Saaj11Implementation.java | 2 +- .../ws/soap/saaj/Saaj12Implementation.java | 2 +- .../ws/soap/saaj/Saaj13Implementation.java | 2 +- .../ws/soap/saaj/SaajImplementation.java | 102 +++++++++--------- pom.xml | 26 +++-- 5 files changed, 70 insertions(+), 64 deletions(-) diff --git a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj11Implementation.java b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj11Implementation.java index 1a2c3c81..dce1dbc9 100644 --- a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj11Implementation.java +++ b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj11Implementation.java @@ -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(); diff --git a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj12Implementation.java b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj12Implementation.java index aa0809c2..6ee58c51 100644 --- a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj12Implementation.java +++ b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj12Implementation.java @@ -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(); diff --git a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj13Implementation.java b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj13Implementation.java index 4ce321b1..4419c87d 100644 --- a/core/src/main/java/org/springframework/ws/soap/saaj/Saaj13Implementation.java +++ b/core/src/main/java/org/springframework/ws/soap/saaj/Saaj13Implementation.java @@ -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(); diff --git a/core/src/main/java/org/springframework/ws/soap/saaj/SaajImplementation.java b/core/src/main/java/org/springframework/ws/soap/saaj/SaajImplementation.java index 77d56928..0615c172 100644 --- a/core/src/main/java/org/springframework/ws/soap/saaj/SaajImplementation.java +++ b/core/src/main/java/org/springframework/ws/soap/saaj/SaajImplementation.java @@ -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 Source of the given element. */ - Source getSource(SOAPElement element); + public abstract Source getSource(SOAPElement element); /** Returns the writable Result 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 true if the body has a fault, false 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; } diff --git a/pom.xml b/pom.xml index 83b2ee02..3f1e2875 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.springframework.ws spring-ws @@ -92,8 +93,10 @@ - scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk - scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk + scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk + + scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk + http://fisheye3.cenqua.com/browse/springframework/spring-ws/trunk @@ -230,19 +233,20 @@ - - + + - - - - + + + + - + @@ -660,7 +664,7 @@ xmlunit xmlunit - 1.0 + 1.1 test