public abstract class ResponseMatchers extends Object
ResponseMatcher classes. Typically used to provide input for
ResponseActions.andExpect(ResponseMatcher).| Modifier and Type | Method and Description |
|---|---|
static ResponseMatcher |
clientOrSenderFault()
Expects a
Client (SOAP 1.1) or Sender (SOAP 1.2) fault. |
static ResponseMatcher |
clientOrSenderFault(String faultStringOrReason)
Expects a
Client (SOAP 1.1) or Sender (SOAP 1.2) fault with a particular fault string or reason. |
static ResponseMatcher |
mustUnderstandFault()
Expects a
MustUnderstand fault. |
static ResponseMatcher |
mustUnderstandFault(String faultStringOrReason)
Expects a
MustUnderstand fault with a particular fault string or reason. |
static ResponseMatcher |
noFault()
Expects the response not to contain a SOAP fault.
|
static ResponseMatcher |
payload(org.springframework.core.io.Resource payload)
Expects the given
Resource XML payload. |
static ResponseMatcher |
payload(Source payload)
Expects the given
Source XML payload. |
static ResponseMatcher |
serverOrReceiverFault()
Expects a
Server (SOAP 1.1) or Receiver (SOAP 1.2) fault. |
static ResponseMatcher |
serverOrReceiverFault(String faultStringOrReason)
Expects a
Server (SOAP 1.1) or Receiver (SOAP 1.2) fault with a particular fault string or reason. |
static ResponseMatcher |
soapEnvelope(org.springframework.core.io.Resource soapEnvelope)
Expects the given
Resource XML SOAP envelope. |
static ResponseMatcher |
soapEnvelope(Source soapEnvelope)
Expects the given
Source XML SOAP envelope. |
static ResponseMatcher |
soapHeader(QName soapHeaderName)
Expects the given SOAP header in the outgoing message.
|
static ResponseMatcher |
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 ResponseMatcher |
versionMismatchFault()
Expects a
VersionMismatch fault. |
static ResponseMatcher |
versionMismatchFault(String faultStringOrReason)
Expects a
VersionMismatch fault with a particular fault string or reason. |
static ResponseXPathExpectations |
xpath(String xpathExpression)
Expects the given XPath expression to (not) exist or be evaluated to a value.
|
static ResponseXPathExpectations |
xpath(String xpathExpression,
Map<String,String> namespaceMapping)
Expects the given XPath expression to (not) exist or be evaluated to a value.
|
public static ResponseMatcher payload(Source payload)
Source XML payload.payload - the XML payloadpublic static ResponseMatcher payload(org.springframework.core.io.Resource payload) throws IOException
Resource XML payload.payload - the XML payloadIOExceptionpublic static ResponseMatcher validPayload(org.springframework.core.io.Resource schema, org.springframework.core.io.Resource... furtherSchemas) throws IOException
schema - the schemafurtherSchemas - further schemas, if necessaryIOExceptionpublic static ResponseXPathExpectations xpath(String xpathExpression)
xpathExpression - the XPath expressionpublic static ResponseXPathExpectations xpath(String xpathExpression, Map<String,String> namespaceMapping)
xpathExpression - the XPath expressionnamespaceMapping - the namespacespublic static ResponseMatcher soapEnvelope(Source soapEnvelope)
Source XML SOAP envelope.soapEnvelope - the XML SOAP envelopepublic static ResponseMatcher soapEnvelope(org.springframework.core.io.Resource soapEnvelope) throws IOException
Resource XML SOAP envelope.soapEnvelope - the XML SOAP envelopeIOExceptionpublic static ResponseMatcher soapHeader(QName soapHeaderName)
soapHeaderName - the qualified name of the SOAP header to expectpublic static ResponseMatcher noFault()
public static ResponseMatcher mustUnderstandFault()
MustUnderstand fault.public static ResponseMatcher mustUnderstandFault(String faultStringOrReason)
MustUnderstand fault with a particular fault string or reason.faultStringOrReason - the SOAP 1.1 fault string or SOAP 1.2 reason text. If null the fault string or
reason text will not be verifiedSoapBody.addMustUnderstandFault(String, Locale)public static ResponseMatcher clientOrSenderFault()
Client (SOAP 1.1) or Sender (SOAP 1.2) fault.public static ResponseMatcher clientOrSenderFault(String faultStringOrReason)
Client (SOAP 1.1) or Sender (SOAP 1.2) fault with a particular fault string or reason.faultStringOrReason - the SOAP 1.1 fault string or SOAP 1.2 reason text. If null the fault string or
reason text will not be verifiedSoapBody.addClientOrSenderFault(String, Locale)public static ResponseMatcher serverOrReceiverFault()
Server (SOAP 1.1) or Receiver (SOAP 1.2) fault.public static ResponseMatcher serverOrReceiverFault(String faultStringOrReason)
Server (SOAP 1.1) or Receiver (SOAP 1.2) fault with a particular fault string or reason.faultStringOrReason - the SOAP 1.1 fault string or SOAP 1.2 reason text. If null the fault string or
reason text will not be verifiedSoapBody.addClientOrSenderFault(String, Locale)public static ResponseMatcher versionMismatchFault()
VersionMismatch fault.public static ResponseMatcher versionMismatchFault(String faultStringOrReason)
VersionMismatch fault with a particular fault string or reason.faultStringOrReason - the SOAP 1.1 fault string or SOAP 1.2 reason text. If null the fault string or
reason text will not be verifiedSoapBody.addClientOrSenderFault(String, Locale)Copyright © 2023 VMware, Inc.. All rights reserved.