Examples of TransferResponse


Examples of com.cloudhopper.mq.broker.protocol.TransferResponse

    public TransferResponse onCompleted(Response response) throws Exception {
        try {
      // consume content and process it
      String body = response.getResponseBody();
      // try to parse the body
      TransferResponse transferResponse = ProtocolFactory.parseTransferResponse(body);
      // check if the response is valid
      ProtocolResponseUtil.verifyResultCodeIsOK(transferResponse);
      if (handler != null) handler.onComplete(transferResponse);
      return transferResponse;
        } catch (Exception e) {
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        request.setBank("Bank of Camel");
        request.setFrom("Jakub");
        request.setTo("Scott");
        request.setAmount("1");

        TransferResponse response = template.requestBody(String.format("cxf:http://localhost:%d/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", port1), request, TransferResponse.class);

        assertNotNull(response);
        assertEquals("OK", response.getReply());
    }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        request.setAmount("1");

        context.startRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStarted());

        TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);

        assertNotNull(response);
        assertEquals("OK", response.getReply());
    }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        request.setBank("Bank of Camel");
        request.setFrom("Jakub");
        request.setTo("Scott");
        request.setAmount("1");

        TransferResponse response = template.requestBody(String.format("cxf:http://localhost:%d/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", port1), request, TransferResponse.class);

        assertNotNull(response);
        assertEquals("OK", response.getReply());
    }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        context.stopRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStopped());

        try {
            TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);
            fail("Should have failed as backend WS is down");
        } catch (CamelExecutionException e) {
            SoapFault fault = assertIsInstanceOf(SoapFault.class, e.getCause());
            log.info(fault.getReason());
        }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        context.startRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStarted());

        try {
            TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);
            fail("Should have failed as backend should throw fault");
        } catch (CamelExecutionException e) {
            FaultMessage fault = assertIsInstanceOf(FaultMessage.class, e.getCause());
            log.info(fault.getLocalizedMessage());
        }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        request.setAmount("1");

        context.startRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStarted());

        TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);

        assertNotNull(response);
        assertEquals("OK", response.getReply());
    }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        request.setBank("Bank of Camel");
        request.setFrom("Jakub");
        request.setTo("Scott");
        request.setAmount("1");

        TransferResponse response = template.requestBody("direct:start", request, TransferResponse.class);

        assertNotNull(response);
        assertEquals("OK", response.getReply());
    }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        context.stopRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStopped());

        try {
            TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);
            fail("Should have failed as backend WS is down");
        } catch (CamelExecutionException e) {
            SoapFault fault = assertIsInstanceOf(SoapFault.class, e.getCause());
            log.info(fault.getReason());
        }
View Full Code Here

Examples of org.camelcookbook.ws.payment_service.types.TransferResponse

        context.startRoute("wsBackend");
        assertTrue(context.getRouteStatus("wsBackend").isStarted());

        try {
            TransferResponse response = template.requestBody("cxf:http://localhost:" + port1 + "/paymentService?serviceClass=org.camelcookbook.ws.payment_service.Payment", request, TransferResponse.class);
            fail("Should have failed as backend should throw fault");
        } catch (CamelExecutionException e) {
            FaultMessage fault = assertIsInstanceOf(FaultMessage.class, e.getCause());
            log.info(fault.getLocalizedMessage());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.