org.springframework.ws.test.support.matcher
Class SchemaValidatingMatcher

java.lang.Object
  extended by org.springframework.ws.test.support.matcher.SchemaValidatingMatcher
All Implemented Interfaces:
WebServiceMessageMatcher

public class SchemaValidatingMatcher
extends java.lang.Object
implements WebServiceMessageMatcher

Uses the XmlValidator to validate request payload.

Since:
2.0
Author:
Lukas Krecan, Arjen Poutsma

Constructor Summary
SchemaValidatingMatcher(org.springframework.core.io.Resource schema, org.springframework.core.io.Resource... furtherSchemas)
          Creates a SchemaValidatingMatcher based on the given schema resource(s).
 
Method Summary
 void match(org.springframework.ws.WebServiceMessage message)
          Matches the given message against the expectations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaValidatingMatcher

public SchemaValidatingMatcher(org.springframework.core.io.Resource schema,
                               org.springframework.core.io.Resource... furtherSchemas)
                        throws java.io.IOException
Creates a SchemaValidatingMatcher based on the given schema resource(s).

Parameters:
schema - the schema
furtherSchemas - further schemas, if necessary
Throws:
java.io.IOException - in case of I/O errors
Method Detail

match

public void match(org.springframework.ws.WebServiceMessage message)
           throws java.io.IOException,
                  java.lang.AssertionError
Description copied from interface: WebServiceMessageMatcher
Matches the given message against the expectations. Implementations typically make use of JUnit-based assertions.

Specified by:
match in interface WebServiceMessageMatcher
Parameters:
message - the message
Throws:
java.io.IOException - in case of I/O errors
java.lang.AssertionError - if expectations are not met


Copyright © 2011. All Rights Reserved.