Search in sources :

Example 1 with NoSuchCodeLit

use of org.apache.hello_world_soap_http.types.NoSuchCodeLit in project cxf by apache.

the class AbstractGreeterImpl method testDocLitFault.

public void testDocLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
    verifyMAPs();
    if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
        throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
    }
    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);
    }
}
Also used : BadRecordLitFault(org.apache.hello_world_soap_http.BadRecordLitFault) NoSuchCodeLit(org.apache.hello_world_soap_http.types.NoSuchCodeLit) NoSuchCodeLitFault(org.apache.hello_world_soap_http.NoSuchCodeLitFault) ErrorCode(org.apache.hello_world_soap_http.types.ErrorCode)

Example 2 with NoSuchCodeLit

use of org.apache.hello_world_soap_http.types.NoSuchCodeLit in project cxf by apache.

the class BaseGreeterImpl method testDocLitFault.

public void testDocLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
    LOG.info("Invoking testDocLitFault");
    invocationCount++;
    if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
        throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
    }
    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);
    }
    throw new RuntimeException("Unknown source", new IOException("dummy io exception"));
}
Also used : NoSuchCodeLit(org.apache.hello_world_soap_http.types.NoSuchCodeLit) ErrorCode(org.apache.hello_world_soap_http.types.ErrorCode) IOException(java.io.IOException)

Example 3 with NoSuchCodeLit

use of org.apache.hello_world_soap_http.types.NoSuchCodeLit in project cxf by apache.

the class NotAnnotatedGreeterImpl method testDocLitFault.

public void testDocLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
    ErrorCode ec = new ErrorCode();
    ec.setMajor((short) 1);
    ec.setMinor((short) 1);
    NoSuchCodeLit nscl = new NoSuchCodeLit();
    nscl.setCode(ec);
    throw new NoSuchCodeLitFault("TestException", nscl);
}
Also used : NoSuchCodeLit(org.apache.hello_world_soap_http.types.NoSuchCodeLit) ErrorCode(org.apache.hello_world_soap_http.types.ErrorCode)

Aggregations

ErrorCode (org.apache.hello_world_soap_http.types.ErrorCode)3 NoSuchCodeLit (org.apache.hello_world_soap_http.types.NoSuchCodeLit)3 IOException (java.io.IOException)1 BadRecordLitFault (org.apache.hello_world_soap_http.BadRecordLitFault)1 NoSuchCodeLitFault (org.apache.hello_world_soap_http.NoSuchCodeLitFault)1