Package org.camelcookbook.ws.payment_service

Examples of org.camelcookbook.ws.payment_service.FaultMessage


        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


        try {
            response = template.requestBody(String.format("cxf:http://localhost:%d/paymentFaultService?serviceClass=org.camelcookbook.ws.payment_service.Payment", port1), request, TransferResponse.class);
            fail("Request should have failed");
        } catch (CamelExecutionException e) {
            FaultMessage fault = assertIsInstanceOf(FaultMessage.class, e.getCause());

            log.info("reason = {}", fault.getMessage());
        }
    }
View Full Code Here

        try {
            response = template.requestBody(String.format("cxf:http://localhost:%d/paymentFaultService?serviceClass=org.camelcookbook.ws.payment_service.Payment", port1), request, TransferResponse.class);
            fail("Request should have failed");
        } catch (CamelExecutionException e) {
            FaultMessage fault = assertIsInstanceOf(FaultMessage.class, e.getCause());

            log.info("reason = {}", fault.getMessage());
        }
    }
View Full Code Here

import org.camelcookbook.ws.payment_service.FaultMessage;

public class FaultHandler {
    public FaultMessage createFault(Exception exception) {
        FaultMessage fault = new FaultMessage(exception.getMessage());
        fault.setStackTrace(exception.getStackTrace());

        return fault;
    }
View Full Code Here

import org.camelcookbook.ws.payment_service.FaultMessage;

public class FaultHandler {
    public FaultMessage createInvalidOperation() {
        return new FaultMessage("Invalid Operation");
    }
View Full Code Here

        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

Related Classes of org.camelcookbook.ws.payment_service.FaultMessage

Copyright © 2018 www.massapicom. 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.