@Test public void parseTpicHeaderFromFaultResponseToBackend() throws Exception { final Map<String, String> context = new HashMap<>(); context.put("our key", "is our value"); final StringResult result = new StringResult(); new SoapHeaderTransport().renderSoapHeader(context, result); final Source source = new StringSource(result.toString()); final SoapHeader soapHeader = mock(SoapHeader.class); when(((SoapMessage) messageContext.getResponse()).getSoapHeader()).thenReturn(soapHeader); final SoapHeaderElement element = mock(SoapHeaderElement.class); when(element.getSource()).thenReturn(source); when(soapHeader.examineHeaderElements(eq(SOAP_HEADER_QNAME))).thenReturn(Collections.singletonList(element).iterator()); unit.handleFault(messageContext); assertThat(backend.size(), is(1)); assertThat(backend.copyToMap(), hasEntry("our key", "is our value")); }
@Override public boolean handleFault(MessageContext messageContext) { return handleResponse(messageContext); }
TraceeClientInterceptor extends AbstractTraceeInterceptor implements ClientInterceptor { @Override public boolean handleFault(MessageContext messageContext) { return handleResponse(messageContext); } }
TraceeClientInterceptor extends AbstractTraceeInterceptor implements ClientInterceptor { @Override public boolean handleFault(MessageContext messageContext) { return handleResponse(messageContext); } TraceeClientInterceptor();  TraceeClientInterceptor(final String profile);  TraceeClientInterceptor(final TraceeBackend backend, final String profile); }
TraceeClientInterceptor extends AbstractTraceeInterceptor implements ClientInterceptor { @Override public boolean handleFault(MessageContext messageContext) { return handleResponse(messageContext); } TraceeClientInterceptor();  TraceeClientInterceptor(final String profile);  TraceeClientInterceptor(final TraceeBackend backend, final String profile); @Override boolean handleRequest(MessageContext messageContext); @Override boolean handleResponse(MessageContext messageContext); @Override boolean handleFault(MessageContext messageContext); @Override void afterCompletion(MessageContext messageContext, Exception ex); }
TraceeClientInterceptor extends AbstractTraceeInterceptor implements ClientInterceptor { @Override public boolean handleFault(MessageContext messageContext) { return handleResponse(messageContext); } TraceeClientInterceptor();  TraceeClientInterceptor(final String profile);  TraceeClientInterceptor(final TraceeBackend backend, final String profile); @Override boolean handleRequest(MessageContext messageContext); @Override boolean handleResponse(MessageContext messageContext); @Override boolean handleFault(MessageContext messageContext); @Override void afterCompletion(MessageContext messageContext, Exception ex);  }