@Test public void testInvokeReturnsInvalidXml() throws AxisFault { MessageContext messageContext = new MessageContext(axisEngine); messageContext.setRequestMessage(requestMessage); messageContext.setProperty(MessageContext.TRANS_URL, mockHttpServer.getServerUrl()); messageContext.setProperty(HTTPConstants.MC_GZIP_REQUEST, true); mockHttpServer.setMockResponse( new MockResponse( "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + "<soap:Envelope xmlns:soap='http: + "foo...")); httpHandler.invoke(messageContext); thrown.expect(AxisFault.class); messageContext.getResponseMessage().getSOAPEnvelope(); }
@Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } try { HttpResponse response = null; HttpRequest postRequest = createHttpRequest(msgContext); response = postRequest.execute(); msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } }
HttpHandler extends BasicHandler implements HttpRequestInitializer { @Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } try { HttpResponse response = null; HttpRequest postRequest = createHttpRequest(msgContext); response = postRequest.execute(); msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } } }
HttpHandler extends BasicHandler implements HttpRequestInitializer { @Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } try { HttpResponse response = null; HttpRequest postRequest = createHttpRequest(msgContext); response = postRequest.execute(); msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } } HttpHandler(); @VisibleForTesting  HttpHandler(HttpTransport transport, InputStreamEventListener inputStreamEventListener); }
HttpHandler extends BasicHandler implements HttpRequestInitializer { @Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } try { HttpResponse response = null; HttpRequest postRequest = createHttpRequest(msgContext); response = postRequest.execute(); msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } } HttpHandler(); @VisibleForTesting  HttpHandler(HttpTransport transport, InputStreamEventListener inputStreamEventListener); @Override void invoke(MessageContext msgContext); @Override void initialize(HttpRequest httpRequest); }
HttpHandler extends BasicHandler implements HttpRequestInitializer { @Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } try { HttpResponse response = null; HttpRequest postRequest = createHttpRequest(msgContext); response = postRequest.execute(); msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } } HttpHandler(); @VisibleForTesting  HttpHandler(HttpTransport transport, InputStreamEventListener inputStreamEventListener); @Override void invoke(MessageContext msgContext); @Override void initialize(HttpRequest httpRequest);  }