Package org.apache.cxf.greeter_control.types

Examples of org.apache.cxf.greeter_control.types.FaultDetail


        Greeter greeter = getGreeter();
        try {
            greeter.pingMe();
            fail("Should throw Exception!");
        } catch (PingMeFault ex) {
            FaultDetail detail = ex.getFaultInfo();
            assertEquals((short)2, detail.getMajor());
            assertEquals((short)1, detail.getMinor());
            assertEquals("PingMeFault raised by server", ex.getMessage());
            StackTraceElement[] element = ex.getStackTrace();
            // The stack trace will be reset as it's a declare exception
            assertEquals("org.apache.cxf.jaxws.JaxWsClientProxy", element[0].getClassName());
        }
View Full Code Here


    public void pingMe() throws PingMeFault {
        pingMeCount++;
        if ((pingMeCount % 2) == 0 || throwAlways) {
            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
            FaultDetail fd = new FaultDetail();
            fd.setMajor((short)2);
            fd.setMinor((short)1);
            throw new PingMeFault("Pings succeed only every other time.", fd);
        } else {
            LOG.fine("Executing operation pingMe");       
        }
    }
View Full Code Here

        Greeter greeter = getGreeter();
        try {
            greeter.pingMe();
            fail("Should throw Exception!");
        } catch (PingMeFault ex) {
            FaultDetail detail = ex.getFaultInfo();
            assertEquals((short)2, detail.getMajor());
            assertEquals((short)1, detail.getMinor());
            assertEquals("PingMeFault raised by server", ex.getMessage());
            StackTraceElement[] element = ex.getStackTrace();
            // The stack trace will be reset as it's a declare exception
            assertEquals("org.apache.cxf.jaxws.JaxWsClientProxy", element[0].getClassName());
        }
View Full Code Here

        Greeter greeter = getGreeter();
        try {
            greeter.pingMe();
            fail("Should throw Exception!");
        } catch (PingMeFault ex) {
            FaultDetail detail = ex.getFaultInfo();
            assertEquals((short)2, detail.getMajor());
            assertEquals((short)1, detail.getMinor());
            assertEquals("PingMeFault raised by server", ex.getMessage());
            StackTraceElement[] element = ex.getStackTrace();
            assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11",
                         element[0].getClassName());
        }
View Full Code Here

    public void greetMeOneWay(String requestType) {
        System.out.println("*********  greetMeOneWay: " + requestType);
    }

    public void pingMe() throws PingMeFault {
        FaultDetail faultDetail = new FaultDetail();
        faultDetail.setMajor((short)2);
        faultDetail.setMinor((short)1);
        LOG.info("Executing operation pingMe, throwing PingMeFault exception");
        System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
        throw new PingMeFault("PingMeFault raised by server", faultDetail);       
    }
View Full Code Here

        if (null != mode) {
            Throwable cause = message.getContent(Exception.class).getCause();
           
            if (FaultMode.CHECKED_APPLICATION_FAULT == mode) {
                PingMeFault original = (PingMeFault)cause;               
                FaultDetail detail = new FaultDetail();
                detail.setMajor((short)20);
                detail.setMinor((short)10);
                PingMeFault replaced = new PingMeFault(original.getMessage(), detail);
                message.setContent(Exception.class, new Fault(replaced));
            } else {
                RuntimeException original = (RuntimeException)cause;
                RuntimeException replaced = new RuntimeException(original.getMessage().toUpperCase());
View Full Code Here

        Greeter greeter = getGreeter();
        try {
            greeter.pingMe();
            fail("Should throw Exception!");
        } catch (PingMeFault ex) {
            FaultDetail detail = ex.getFaultInfo();
            assertEquals((short)2, detail.getMajor());
            assertEquals((short)1, detail.getMinor());
            assertEquals("PingMeFault raised by server", ex.getMessage());
            StackTraceElement[] element = ex.getStackTrace();
            // The stack trace will be reset as it's a declare exception
            assertEquals("org.apache.cxf.jaxws.JaxWsClientProxy", element[0].getClassName());
        }
View Full Code Here

    public void greetMeOneWay(String requestType) {
        System.out.println("*********  greetMeOneWay: " + requestType);
    }

    public void pingMe() throws PingMeFault {
        FaultDetail faultDetail = new FaultDetail();
        faultDetail.setMajor((short)2);
        faultDetail.setMinor((short)1);
        LOG.info("Executing operation pingMe, throwing PingMeFault exception");
        System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
        throw new PingMeFault("PingMeFault raised by server", faultDetail);       
    }
View Full Code Here

    public void pingMe() throws PingMeFault {
        pingMeCount++;
        if ((pingMeCount % 2) == 0 || throwAlways) {
            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
            FaultDetail fd = new FaultDetail();
            fd.setMajor((short)2);
            fd.setMinor((short)1);
            throw new PingMeFault("Pings succeed only every other time.", fd);
        } else {
            LOG.fine("Executing operation pingMe");       
        }
    }
View Full Code Here

        Greeter greeter = getGreeter();
        try {
            greeter.pingMe();
            fail("Should throw Exception!");
        } catch (PingMeFault ex) {
            FaultDetail detail = ex.getFaultInfo();
            assertEquals((short)2, detail.getMajor());
            assertEquals((short)1, detail.getMinor());
            assertEquals("PingMeFault raised by server", ex.getMessage());
            StackTraceElement[] element = ex.getStackTrace();
            assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11",
                         element[0].getClassName());
        }
View Full Code Here

TOP

Related Classes of org.apache.cxf.greeter_control.types.FaultDetail

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.