Search in sources :

Example 1 with ErrorCode

use of org.apache.cxf.hello_world_jms.types.ErrorCode in project cxf by apache.

the class TwoWayJMSImplBase method testRpcLitFault.

public TestRpcLitFaultResponse testRpcLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
    BadRecordLit badRecord = new BadRecordLit();
    badRecord.setReason("BadRecordLitFault");
    if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
        throw new BadRecordLitFault("TestBadRecordLit", badRecord);
    }
    if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
        ErrorCode ec = new ErrorCode();
        ec.setMajor((short) 1);
        ec.setMinor((short) 1);
        NoSuchCodeLit nscl = new NoSuchCodeLit();
        nscl.setCode(ec);
        throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
    }
    return new TestRpcLitFaultResponse();
}
Also used : TestRpcLitFaultResponse(org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse) BadRecordLitFault(org.apache.cxf.hello_world_jms.BadRecordLitFault) NoSuchCodeLit(org.apache.cxf.hello_world_jms.types.NoSuchCodeLit) NoSuchCodeLitFault(org.apache.cxf.hello_world_jms.NoSuchCodeLitFault) ErrorCode(org.apache.cxf.hello_world_jms.types.ErrorCode) BadRecordLit(org.apache.cxf.hello_world_jms.types.BadRecordLit)

Example 2 with ErrorCode

use of org.apache.cxf.hello_world_jms.types.ErrorCode in project cxf by apache.

the class TwoWayJMSImplBase method testRpcLitFault.

public TestRpcLitFaultResponse testRpcLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
    BadRecordLit badRecord = new BadRecordLit();
    badRecord.setReason("BadRecordLitFault");
    if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
        throw new BadRecordLitFault("TestBadRecordLit", badRecord);
    }
    if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
        ErrorCode ec = new ErrorCode();
        ec.setMajor((short) 1);
        ec.setMinor((short) 1);
        NoSuchCodeLit nscl = new NoSuchCodeLit();
        nscl.setCode(ec);
        throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
    }
    return new TestRpcLitFaultResponse();
}
Also used : TestRpcLitFaultResponse(org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse) BadRecordLitFault(org.apache.cxf.hello_world_jms.BadRecordLitFault) NoSuchCodeLit(org.apache.cxf.hello_world_jms.types.NoSuchCodeLit) NoSuchCodeLitFault(org.apache.cxf.hello_world_jms.NoSuchCodeLitFault) ErrorCode(org.apache.cxf.hello_world_jms.types.ErrorCode) BadRecordLit(org.apache.cxf.hello_world_jms.types.BadRecordLit)

Aggregations

BadRecordLitFault (org.apache.cxf.hello_world_jms.BadRecordLitFault)2 NoSuchCodeLitFault (org.apache.cxf.hello_world_jms.NoSuchCodeLitFault)2 BadRecordLit (org.apache.cxf.hello_world_jms.types.BadRecordLit)2 ErrorCode (org.apache.cxf.hello_world_jms.types.ErrorCode)2 NoSuchCodeLit (org.apache.cxf.hello_world_jms.types.NoSuchCodeLit)2 TestRpcLitFaultResponse (org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse)2