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;
}
Aggregations