Search in sources :

Example 1 with PingMeResponseT

use of org.apache.headers.coloc.types.PingMeResponseT in project cxf by apache.

the class AbstractHeaderServiceRpcLitTest method verifyTwoWay.

public void verifyTwoWay(HeaderTester ht) {
    getLogger().debug("Client: calling pingMe");
    PingMeT in = new PingMeT();
    try {
        in.setFaultType("ABCD");
        PingMeResponseT ret = ht.pingMe(in);
        assertNotNull(ret);
    } catch (Exception ex) {
        fail("Should not throw any exception");
    }
}
Also used : PingMeT(org.apache.headers.coloc.types.PingMeT) PingMeResponseT(org.apache.headers.coloc.types.PingMeResponseT) WebServiceException(javax.xml.ws.WebServiceException)

Example 2 with PingMeResponseT

use of org.apache.headers.coloc.types.PingMeResponseT in project cxf by apache.

the class BaseHeaderTesterRpcLitImpl method pingMe.

public PingMeResponseT pingMe(PingMeT in) throws PingMeFault {
    String msgType = in.getFaultType();
    getLogger().debug("Server: in pingMe:" + msgType);
    if ("USER".equals(msgType)) {
        FaultDetailT detail = new FaultDetailT();
        detail.setMajor((short) 1);
        detail.setMinor((short) 2);
        throw new PingMeFault("USER FAULT TEST", detail);
    } else if ("SYSTEM".equals(msgType)) {
        throw new Fault(new Message(HeaderTesterUtil.EX_STRING, (ResourceBundle) null, new Object[] { "FAULT TEST" }));
    } else if ("RUNTIME".equals(msgType)) {
        throw new IllegalArgumentException(HeaderTesterUtil.EX_STRING);
    }
    return new PingMeResponseT();
}
Also used : PingMeFault(org.apache.headers.rpc_lit.PingMeFault) Message(org.apache.cxf.common.i18n.Message) FaultDetailT(org.apache.headers.coloc.types.FaultDetailT) PingMeResponseT(org.apache.headers.coloc.types.PingMeResponseT) Fault(org.apache.cxf.interceptor.Fault) PingMeFault(org.apache.headers.rpc_lit.PingMeFault)

Aggregations

PingMeResponseT (org.apache.headers.coloc.types.PingMeResponseT)2 WebServiceException (javax.xml.ws.WebServiceException)1 Message (org.apache.cxf.common.i18n.Message)1 Fault (org.apache.cxf.interceptor.Fault)1 FaultDetailT (org.apache.headers.coloc.types.FaultDetailT)1 PingMeT (org.apache.headers.coloc.types.PingMeT)1 PingMeFault (org.apache.headers.rpc_lit.PingMeFault)1