public abstract class RequestMatchers extends Object
RequestMatcher
classes. Typically used to provide input for MockWebServiceServer.expect(RequestMatcher)
.Modifier and Type | Method and Description |
---|---|
static RequestMatcher |
anything()
Expects any request.
|
static RequestMatcher |
connectionTo(String uri)
Expects a connection to the given URI.
|
static RequestMatcher |
connectionTo(URI uri)
Expects a connection to the given URI.
|
static RequestMatcher |
payload(org.springframework.core.io.Resource payload)
Expects the given
Resource XML payload. |
static RequestMatcher |
payload(Source payload)
Expects the given
Source XML payload. |
static RequestMatcher |
soapEnvelope(org.springframework.core.io.Resource soapEnvelope)
Expects the given
Resource XML SOAP envelope. |
static RequestMatcher |
soapEnvelope(Source soapEnvelope)
Expects the given
Source XML SOAP envelope. |
static RequestMatcher |
soapHeader(QName soapHeaderName)
Expects the given SOAP header in the outgoing message.
|
static RequestMatcher |
validPayload(org.springframework.core.io.Resource schema,
org.springframework.core.io.Resource... furtherSchemas)
Expects the payload to validate against the given XSD schema(s).
|
static RequestXPathExpectations |
xpath(String xpathExpression)
Expects the given XPath expression to (not) exist or be evaluated to a value.
|
static RequestXPathExpectations |
xpath(String xpathExpression,
Map<String,String> namespaceMapping)
Expects the given XPath expression to (not) exist or be evaluated to a value.
|
public static RequestMatcher anything()
public static RequestMatcher payload(Source payload)
Source
XML payload.payload
- the XML payloadpublic static RequestMatcher payload(org.springframework.core.io.Resource payload) throws IOException
Resource
XML payload.payload
- the XML payloadIOException
public static RequestMatcher validPayload(org.springframework.core.io.Resource schema, org.springframework.core.io.Resource... furtherSchemas) throws IOException
schema
- the schemafurtherSchemas
- further schemas, if necessaryIOException
public static RequestXPathExpectations xpath(String xpathExpression)
xpathExpression
- the XPath expressionpublic static RequestXPathExpectations xpath(String xpathExpression, Map<String,String> namespaceMapping)
xpathExpression
- the XPath expressionnamespaceMapping
- the namespacespublic static RequestMatcher soapEnvelope(Source soapEnvelope)
Source
XML SOAP envelope.soapEnvelope
- the XML SOAP envelopepublic static RequestMatcher soapEnvelope(org.springframework.core.io.Resource soapEnvelope) throws IOException
Resource
XML SOAP envelope.soapEnvelope
- the XML SOAP envelopeIOException
public static RequestMatcher soapHeader(QName soapHeaderName)
soapHeaderName
- the qualified name of the SOAP header to expectpublic static RequestMatcher connectionTo(String uri)
uri
- the String uri expected to connect topublic static RequestMatcher connectionTo(URI uri)
uri
- the String uri expected to connect to