@Test public void testPayload() { Source source = new StringSource(PAYLOAD); MessageMatcher matcher = new MessageMatcher(source); SoapMessage request = createMock(SoapMessage.class); expect(request.getPayloadSource()).andReturn(new StringSource(PAYLOAD)); replay(request); matcher.matchInternal(null, request); verify(request); }
protected final void matchInternal(WebServiceMessage input, WebServiceMessage message) { Source controlMessage = preprocessControlMessage(input); if (isSoapControl(controlMessage)) { Source messageSource = getEnvelopeSource(message); compare(controlMessage, messageSource); } else { Source messageSource = message.getPayloadSource(); compare(controlMessage, messageSource); } }
MessageMatcher implements RequestMatcher, ResponseMatcher { protected final void matchInternal(WebServiceMessage input, WebServiceMessage message) { Source controlMessage = preprocessControlMessage(input); if (isSoapControl(controlMessage)) { Source messageSource = getEnvelopeSource(message); compare(controlMessage, messageSource); } else { Source messageSource = message.getPayloadSource(); compare(controlMessage, messageSource); } } }
MessageMatcher implements RequestMatcher, ResponseMatcher { protected final void matchInternal(WebServiceMessage input, WebServiceMessage message) { Source controlMessage = preprocessControlMessage(input); if (isSoapControl(controlMessage)) { Source messageSource = getEnvelopeSource(message); compare(controlMessage, messageSource); } else { Source messageSource = message.getPayloadSource(); compare(controlMessage, messageSource); } } MessageMatcher(Source controlMessage); }
MessageMatcher implements RequestMatcher, ResponseMatcher { protected final void matchInternal(WebServiceMessage input, WebServiceMessage message) { Source controlMessage = preprocessControlMessage(input); if (isSoapControl(controlMessage)) { Source messageSource = getEnvelopeSource(message); compare(controlMessage, messageSource); } else { Source messageSource = message.getPayloadSource(); compare(controlMessage, messageSource); } } MessageMatcher(Source controlMessage); void match(WebServiceMessage request, WebServiceMessage response); void match(URI uri, WebServiceMessage request); final Source getControlMessage(); }
MessageMatcher implements RequestMatcher, ResponseMatcher { protected final void matchInternal(WebServiceMessage input, WebServiceMessage message) { Source controlMessage = preprocessControlMessage(input); if (isSoapControl(controlMessage)) { Source messageSource = getEnvelopeSource(message); compare(controlMessage, messageSource); } else { Source messageSource = message.getPayloadSource(); compare(controlMessage, messageSource); } } MessageMatcher(Source controlMessage); void match(WebServiceMessage request, WebServiceMessage response); void match(URI uri, WebServiceMessage request); final Source getControlMessage();  }