Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2005-2010 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.ws.test.support.matcher;
import static org.springframework.ws.test.support.AssertionErrors.assertTrue;

Abstract base class for SOAP-specific WebServiceMessageMatcher implementations.

Asserts that the message given to match(org.springframework.ws.WebServiceMessage) is a org.springframework.ws.soap.SoapMessage, and invokes match(org.springframework.ws.soap.SoapMessage) with it if so.

Author(s):
Arjen Poutsma
Since:
2.0
public abstract class AbstractSoapMessageMatcher implements WebServiceMessageMatcher {
    public final void match(WebServiceMessage messagethrows IOExceptionAssertionError {
        assertTrue("Message is not a SOAP message"message instanceof SoapMessage);
        match((SoapMessagemessage);
    }

    
Abstract template method that gets invoked from match(org.springframework.ws.WebServiceMessage) if the given message is a org.springframework.ws.soap.SoapMessage.

Parameters:
soapMessage the soap message
Throws:
java.io.IOException in case of I/O errors
java.lang.AssertionError if expectations are not met
    protected abstract void match(SoapMessage soapMessagethrows IOExceptionAssertionError;
New to GrepCode? Check out our FAQ X