org.springframework.ws.client.core.WebServiceTemplate.getFaultMessageResolver()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(96)

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

WebServiceTemplate.getFaultMessageResolver介绍

[英]Returns the fault message resolver for this template.
[中]返回此模板的故障消息解析程序。

代码示例

代码示例来源:origin: spring-projects/spring-ws

/**
 * Handles an fault in the given response message. The default implementation invokes the {@link
 * FaultMessageResolver fault resolver} if registered, or invokes {@link #handleError(WebServiceConnection,
 * WebServiceMessage)} otherwise.
 *
 * @param connection     the faulty connection
 * @param messageContext the message context
 * @return the object to be returned from {@link #sendAndReceive(String,WebServiceMessageCallback,
 *           WebServiceMessageExtractor)}, if any
 */
protected Object handleFault(WebServiceConnection connection, MessageContext messageContext) throws IOException {
  if (logger.isDebugEnabled()) {
    logger.debug("Received Fault message for request [" + messageContext.getRequest() + "]");
  }
  if (getFaultMessageResolver() != null) {
    getFaultMessageResolver().resolveFault(messageContext.getResponse());
    return null;
  }
  else {
    return handleError(connection, messageContext.getRequest());
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Handles an fault in the given response message. The default implementation invokes the {@link
 * FaultMessageResolver fault resolver} if registered, or invokes {@link #handleError(WebServiceConnection,
 * WebServiceMessage)} otherwise.
 *
 * @param connection     the faulty connection
 * @param messageContext the message context
 * @return the object to be returned from {@link #sendAndReceive(String,WebServiceMessageCallback,
 *           WebServiceMessageExtractor)}, if any
 */
protected Object handleFault(WebServiceConnection connection, MessageContext messageContext) throws IOException {
  if (logger.isDebugEnabled()) {
    logger.debug("Received Fault message for request [" + messageContext.getRequest() + "]");
  }
  if (getFaultMessageResolver() != null) {
    getFaultMessageResolver().resolveFault(messageContext.getResponse());
    return null;
  }
  else {
    return handleError(connection, messageContext.getRequest());
  }
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

/**
 * Handles an fault in the given response message. The default implementation invokes the {@link
 * FaultMessageResolver fault resolver} if registered, or invokes {@link #handleError(WebServiceConnection,
 * WebServiceMessage)} otherwise.
 *
 * @param connection     the faulty connection
 * @param messageContext the message context
 * @return the object to be returned from {@link #sendAndReceive(String,WebServiceMessageCallback,
 *         WebServiceMessageExtractor)}, if any
 */
protected Object handleFault(WebServiceConnection connection, MessageContext messageContext) throws IOException {
  if (logger.isDebugEnabled()) {
    logger.debug("Received Fault message for request [" + messageContext.getRequest() + "]");
  }
  if (getFaultMessageResolver() != null) {
    getFaultMessageResolver().resolveFault(messageContext.getResponse());
    return null;
  }
  else {
    return handleError(connection, messageContext.getRequest());
  }
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

/**
 * Handles an fault in the given response message. The default implementation invokes the {@link
 * FaultMessageResolver fault resolver} if registered, or invokes {@link #handleError(WebServiceConnection,
 * WebServiceMessage)} otherwise.
 *
 * @param connection     the faulty connection
 * @param messageContext the message context
 * @return the object to be returned from {@link #sendAndReceive(String,WebServiceMessageCallback,
 *           WebServiceMessageExtractor)}, if any
 */
protected Object handleFault(WebServiceConnection connection, MessageContext messageContext) throws IOException {
  if (logger.isDebugEnabled()) {
    logger.debug("Received Fault message for request [" + messageContext.getRequest() + "]");
  }
  if (getFaultMessageResolver() != null) {
    getFaultMessageResolver().resolveFault(messageContext.getResponse());
    return null;
  }
  else {
    return handleError(connection, messageContext.getRequest());
  }
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

/**
 * Initialize the default implementations for the template's strategies: {@link SoapFaultMessageResolver}, {@link
 * org.springframework.ws.soap.saaj.SaajSoapMessageFactory}, and {@link HttpUrlConnectionMessageSender}.
 *
 * @throws BeanInitializationException in case of initalization errors
 * @see #setFaultMessageResolver(FaultMessageResolver)
 * @see #setMessageFactory(WebServiceMessageFactory)
 * @see #setMessageSender(WebServiceMessageSender)
 */
protected void initDefaultStrategies() {
  DefaultStrategiesHelper strategiesHelper = new DefaultStrategiesHelper(WebServiceTemplate.class);
  if (getMessageFactory() == null) {
    initMessageFactory(strategiesHelper);
  }
  if (ObjectUtils.isEmpty(getMessageSenders())) {
    initMessageSenders(strategiesHelper);
  }
  if (getFaultMessageResolver() == null) {
    initFaultMessageResolver(strategiesHelper);
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Initialize the default implementations for the template's strategies: {@link SoapFaultMessageResolver}, {@link
 * org.springframework.ws.soap.saaj.SaajSoapMessageFactory}, and {@link HttpUrlConnectionMessageSender}.
 *
 * @throws BeanInitializationException in case of initalization errors
 * @see #setFaultMessageResolver(FaultMessageResolver)
 * @see #setMessageFactory(WebServiceMessageFactory)
 * @see #setMessageSender(WebServiceMessageSender)
 */
protected void initDefaultStrategies() {
  DefaultStrategiesHelper strategiesHelper = new DefaultStrategiesHelper(WebServiceTemplate.class);
  if (getMessageFactory() == null) {
    initMessageFactory(strategiesHelper);
  }
  if (ObjectUtils.isEmpty(getMessageSenders())) {
    initMessageSenders(strategiesHelper);
  }
  if (getFaultMessageResolver() == null) {
    initFaultMessageResolver(strategiesHelper);
  }
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

/**
 * Initialize the default implementations for the template's strategies: {@link SoapFaultMessageResolver}, {@link
 * org.springframework.ws.soap.saaj.SaajSoapMessageFactory}, and {@link HttpUrlConnectionMessageSender}.
 *
 * @throws BeanInitializationException in case of initalization errors
 * @see #setFaultMessageResolver(FaultMessageResolver)
 * @see #setMessageFactory(WebServiceMessageFactory)
 * @see #setMessageSender(WebServiceMessageSender)
 */
protected void initDefaultStrategies() {
  DefaultStrategiesHelper strategiesHelper = new DefaultStrategiesHelper(WebServiceTemplate.class);
  if (getMessageFactory() == null) {
    initMessageFactory(strategiesHelper);
  }
  if (ObjectUtils.isEmpty(getMessageSenders())) {
    initMessageSenders(strategiesHelper);
  }
  if (getFaultMessageResolver() == null) {
    initFaultMessageResolver(strategiesHelper);
  }
}

代码示例来源:origin: spring-projects/spring-ws

/**
 * Initialize the default implementations for the template's strategies: {@link SoapFaultMessageResolver}, {@link
 * org.springframework.ws.soap.saaj.SaajSoapMessageFactory}, and {@link HttpUrlConnectionMessageSender}.
 *
 * @throws BeanInitializationException in case of initalization errors
 * @see #setFaultMessageResolver(FaultMessageResolver)
 * @see #setMessageFactory(WebServiceMessageFactory)
 * @see #setMessageSender(WebServiceMessageSender)
 */
protected void initDefaultStrategies() {
  DefaultStrategiesHelper strategiesHelper = new DefaultStrategiesHelper(WebServiceTemplate.class);
  if (getMessageFactory() == null) {
    initMessageFactory(strategiesHelper);
  }
  if (ObjectUtils.isEmpty(getMessageSenders())) {
    initMessageSenders(strategiesHelper);
  }
  if (getFaultMessageResolver() == null) {
    initFaultMessageResolver(strategiesHelper);
  }
}

相关文章

WebServiceTemplate类方法