net.javacrumbs.springws.test.common
Class DefaultMessageComparator
java.lang.Object
net.javacrumbs.springws.test.common.DefaultMessageComparator
- All Implemented Interfaces:
- MessageComparator
public class DefaultMessageComparator
- extends java.lang.Object
- implements MessageComparator
Compares messages, throws WsTestException if they differ.
- Author:
- Lukas Krecan
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
|
Method Summary |
protected void |
compareDocuments(org.w3c.dom.Document controlDocument,
org.w3c.dom.Document messageDocument)
Compares documents. |
void |
compareMessage(org.springframework.ws.WebServiceMessage message,
org.springframework.core.io.Resource controlResource)
|
protected org.custommonkey.xmlunit.Diff |
createDiff(org.w3c.dom.Document controlDocument,
org.w3c.dom.Document messageDocument)
|
XmlUtil |
getXmlUtil()
|
boolean |
isIgnoreWhitespace()
|
protected boolean |
isSoap(org.w3c.dom.Document document)
|
protected org.w3c.dom.Document |
loadDocument(org.springframework.core.io.Resource resource)
|
protected org.w3c.dom.Document |
loadDocument(javax.xml.transform.Source source)
|
protected org.w3c.dom.Document |
loadDocument(org.springframework.ws.WebServiceMessage message)
|
protected java.lang.String |
serializeDocument(org.w3c.dom.Document document)
|
void |
setIgnoreWhitespace(boolean ignoreWhitespace)
|
void |
setXmlUtil(XmlUtil xmlUtil)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
DefaultMessageComparator
public DefaultMessageComparator()
compareMessage
public void compareMessage(org.springframework.ws.WebServiceMessage message,
org.springframework.core.io.Resource controlResource)
throws java.io.IOException
- Specified by:
compareMessage in interface MessageComparator
- Throws:
java.io.IOException
compareDocuments
protected void compareDocuments(org.w3c.dom.Document controlDocument,
org.w3c.dom.Document messageDocument)
- Compares documents. If they are different throws
WsTestException.
- Parameters:
controlDocument - messageDocument -
createDiff
protected org.custommonkey.xmlunit.Diff createDiff(org.w3c.dom.Document controlDocument,
org.w3c.dom.Document messageDocument)
serializeDocument
protected java.lang.String serializeDocument(org.w3c.dom.Document document)
isSoap
protected boolean isSoap(org.w3c.dom.Document document)
loadDocument
protected org.w3c.dom.Document loadDocument(org.springframework.ws.WebServiceMessage message)
throws java.io.IOException
- Throws:
java.io.IOException
loadDocument
protected org.w3c.dom.Document loadDocument(org.springframework.core.io.Resource resource)
throws java.io.IOException
- Throws:
java.io.IOException
loadDocument
protected org.w3c.dom.Document loadDocument(javax.xml.transform.Source source)
getXmlUtil
public XmlUtil getXmlUtil()
setXmlUtil
public void setXmlUtil(XmlUtil xmlUtil)
- Specified by:
setXmlUtil in interface MessageComparator
isIgnoreWhitespace
public boolean isIgnoreWhitespace()
- Specified by:
isIgnoreWhitespace in interface MessageComparator
setIgnoreWhitespace
public void setIgnoreWhitespace(boolean ignoreWhitespace)
- Specified by:
setIgnoreWhitespace in interface MessageComparator
Copyright © 2011. All Rights Reserved.