javax.xml.ws.handler.Handler.handleFault()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(208)

本文整理了Java中javax.xml.ws.handler.Handler.handleFault()方法的一些代码示例,展示了Handler.handleFault()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler.handleFault()方法的具体详情如下:
包路径:javax.xml.ws.handler.Handler
类名称:Handler
方法名:handleFault

Handler.handleFault介绍

[英]The handleFault method is invoked for fault message processing. Refer to the description of the handler framework in the JAX-WS specification for full details.
[中]调用handleFault方法进行故障消息处理。请参阅JAX-WS规范中对处理程序框架的描述,以了解完整的详细信息。

代码示例

代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws

@SuppressWarnings("unchecked")
private boolean invokeHandleFault(List<? extends Handler<?>> handlerChain, MessageContext ctx) {
  boolean continueProcessing = true;
  try {
    for (Handler<?> h : handlerChain) {
      if (invokeThisHandler(h)) {
        closeHandlers.add(h);
        markHandlerInvoked(h);
        Handler<MessageContext> lh = (Handler<MessageContext>)h;
        continueProcessing = lh.handleFault(ctx);
      }
      if (!continueProcessing) {
        break;
      }
    }
  } catch (RuntimeException e) {
    LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
    continueProcessing = false;
    throw e;
  }
  return continueProcessing;
}

代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws

@SuppressWarnings("unchecked")
private boolean invokeReversedHandleFault(MessageContext ctx) {
  boolean continueProcessing = true;
  try {
    int index = invokedHandlers.size() - 2;
    while (index >= 0 && continueProcessing) {
      Handler<? extends MessageContext> h = invokedHandlers.get(index);
      if (h instanceof LogicalHandler) {
        LogicalHandler<LogicalMessageContext> lh = (LogicalHandler<LogicalMessageContext>)h;
        continueProcessing = lh.handleFault(logicalMessageContext);
      } else {
        Handler<MessageContext> ph = (Handler<MessageContext>)h;
        continueProcessing = ph.handleFault(protocolMessageContext);
      }
      if (!continueProcessing) {
        invokeReversedClose();
        break;
      }
      index--;
    }
  } catch (RuntimeException e) {
    LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
    invokeReversedClose();
    continueProcessing = false;
    closed = true;
    throw e;
  }
  invokeReversedClose();
  return continueProcessing;
}

代码示例来源:origin: org.jboss.ws/jbossws-common

@Override
public boolean handleFault(T context)
{
 return delegate.handleFault(context);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

try {
  while (i >= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;
try {
  while (i <= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;

代码示例来源:origin: com.sun.xml.ws/rt

try {
  while (i >= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;
try {
  while (i <= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;

代码示例来源:origin: javaee/metro-jax-ws

try {
  while (i >= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;
try {
  while (i <= end) {
    if (!handlers.get(i).handleFault(context)) {
      return false;

代码示例来源:origin: apache/cxf

@SuppressWarnings("unchecked")
private boolean invokeHandleFault(List<? extends Handler<?>> handlerChain, MessageContext ctx) {
  boolean continueProcessing = true;
  try {
    for (Handler<?> h : handlerChain) {
      if (invokeThisHandler(h)) {
        closeHandlers.add(h);
        markHandlerInvoked(h);
        Handler<MessageContext> lh = (Handler<MessageContext>)h;
        continueProcessing = lh.handleFault(ctx);
      }
      if (!continueProcessing) {
        break;
      }
    }
  } catch (RuntimeException e) {
    LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
    continueProcessing = false;
    throw e;
  }
  return continueProcessing;
}

代码示例来源:origin: org.objectweb.celtix/celtix-rt

@SuppressWarnings("unchecked")
private boolean invokeHandleFault(List<? extends Handler> handlerChain, MessageContext ctx) {
  
  boolean continueProcessing = true; 
  try {
    for (Handler<MessageContext> h : handlerChain) {
      if (invokeThisHandler(h)) {
        closeHandlers.add(h);
        continueProcessing = h.handleFault(ctx);
      }
      if (!continueProcessing) {
        break;
      }
      markHandlerInvoked(h); 
    }
  } catch (RuntimeException e) {
    LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
    continueProcessing = false; 
    closed = true;
  }
  return continueProcessing;
}

代码示例来源:origin: apache/cxf

@SuppressWarnings("unchecked")
private boolean invokeReversedHandleFault(MessageContext ctx) {
  boolean continueProcessing = true;
  try {
    int index = invokedHandlers.size() - 2;
    while (index >= 0 && continueProcessing) {
      Handler<? extends MessageContext> h = invokedHandlers.get(index);
      if (h instanceof LogicalHandler) {
        LogicalHandler<LogicalMessageContext> lh = (LogicalHandler<LogicalMessageContext>)h;
        continueProcessing = lh.handleFault(logicalMessageContext);
      } else {
        Handler<MessageContext> ph = (Handler<MessageContext>)h;
        continueProcessing = ph.handleFault(protocolMessageContext);
      }
      if (!continueProcessing) {
        invokeReversedClose();
        break;
      }
      index--;
    }
  } catch (RuntimeException e) {
    LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
    invokeReversedClose();
    continueProcessing = false;
    closed = true;
    throw e;
  }
  invokeReversedClose();
  return continueProcessing;
}

相关文章