Search in sources :

Example 1 with PingFaultDetails

use of org.apache.handler_test.types.PingFaultDetails in project cxf by apache.

the class HandlerTestImpl method pingWithArgs.

public final List<String> pingWithArgs(String handlerCommand) throws PingException {
    List<String> ret = new ArrayList<>();
    ret.add(handlerCommand);
    ret.addAll(getHandlersInfo(context.getMessageContext()));
    if (handlerCommand.contains("servant throw exception")) {
        PingFaultDetails details = new PingFaultDetails();
        details.setDetail(ret.toString());
        throw new PingException("from servant", details);
    } else if (handlerCommand.contains("servant throw RuntimeException")) {
        throw new RuntimeException("servant throw RuntimeException");
    } else if (handlerCommand.contains("servant throw SOAPFaultException")) {
        throw createSOAPFaultException("servant throws SOAPFaultException");
    } else if (handlerCommand.contains("servant throw WebServiceException")) {
        RuntimeException re = new RuntimeException("servant throws RuntimeException");
        throw new WebServiceException("RemoteException with nested RuntimeException", re);
    }
    return ret;
}
Also used : WebServiceException(javax.xml.ws.WebServiceException) ArrayList(java.util.ArrayList) PingFaultDetails(org.apache.handler_test.types.PingFaultDetails) PingException(org.apache.handler_test.PingException)

Aggregations

ArrayList (java.util.ArrayList)1 WebServiceException (javax.xml.ws.WebServiceException)1 PingException (org.apache.handler_test.PingException)1 PingFaultDetails (org.apache.handler_test.types.PingFaultDetails)1