org.apache.axis2.context.MessageContext.getWSAAction()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(9.1k)|赞(0)|评价(0)|浏览(83)

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

MessageContext.getWSAAction介绍

暂无

代码示例

代码示例来源:origin: wso2/wso2-synapse

public String getWSAAction() {
  return axis2MessageContext.getWSAAction();
}

代码示例来源:origin: org.apache.sandesha2/sandesha2-core

public String getWSAAction() {
  return msgContext.getWSAAction();
}

代码示例来源:origin: org.apache.synapse/synapse-core

public String getWSAAction() {
  return axis2MessageContext.getWSAAction();
}

代码示例来源:origin: org.n52.amused/amused-platform-axis2

private void handleResponse(MessageContext msgContext)
{
  String currentResponseAction = msgContext.getWSAAction();
  String realResponseAction = null;
  
  //
  // replace "Request" with "Response" if needed - if "Request" is 
  // not found, just tack on a "Response"
  //
  // NOTE: this logic is based on MessageHeaders.createReplyHeaders()
  //
  
  int requestSuffix = currentResponseAction.lastIndexOf(_REQUEST);
  
  if (requestSuffix >= 0)
    realResponseAction = currentResponseAction.substring(0, requestSuffix) + _RESPONSE;
  
  else
    realResponseAction = currentResponseAction + _RESPONSE;
  msgContext.setWSAAction(realResponseAction);
}

代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bam.lwevent.core

public final void processMessage(MessageContext mc) throws AxisFault, WSEventException {
  if (EventingConstants.WSE_SUBSCRIBE.equals(mc.getWSAAction())) {
    handleSubscribe(mc);
  } else if (EventingConstants.WSE_UNSUBSCRIBE.equals(mc.getWSAAction())) {
    handleUnsubscribe(mc);
  } else if (EventingConstants.WSE_GET_STATUS.equals(mc.getWSAAction())) {
    handleGetStatus(mc);
  } else if (EventingConstants.WSE_RENEW.equals(mc.getWSAAction())) {
    handleRenew(mc);
  } else if (EventingConstants.WSE_GET_SUBSCRIPTIONS.equals(mc.getWSAAction())) {
    handleGetSubscriptions(mc);
  } else if (EventingConstants.WSE_INSTALL_EVENT_SINK.equals(mc.getWSAAction())) {
    //TODO this is to install certain new event sink (e.g. by adding classes to classpath) so it can be used by subscriptions
    handleInstallEventSink(mc);
  } else {
    handleEvent(mc);
  }
}

代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.event.ws

public final void processMessage(MessageContext mc) throws AxisFault, WSEventException {
  if (EventingConstants.WSE_SUBSCRIBE.equals(mc.getWSAAction())) {
    handleSubscribe(mc);
  } else if (EventingConstants.WSE_UNSUBSCRIBE.equals(mc.getWSAAction())) {
    handleUnsubscribe(mc);
  } else if (EventingConstants.WSE_GET_STATUS.equals(mc.getWSAAction())) {
    handleGetStatus(mc);
  } else if (EventingConstants.WSE_RENEW.equals(mc.getWSAAction())) {
    handleRenew(mc);
  } else if (EventingConstants.WSE_GET_SUBSCRIPTIONS.equals(mc.getWSAAction())) {
    handleGetSubscriptions(mc);
  } else if (EventingConstants.WSE_INSTALL_EVENT_SINK.equals(mc.getWSAAction())) {
    //TODO this is to install certain new event sink (e.g. by adding classes to classpath) so it can be used by subscriptions
    handleInstallEventSink(mc);
  } else {
    handleEvent(mc);
  }
}

代码示例来源:origin: org.apache.synapse/synapse-handler

/**
 * Helper util method to get the logging done whenever injecting the message into synapse
 *
 * @param log - Log appender to be used to append logs
 * @param messageContext - MessageContext which will be logged
 */
public static void doHandlerLogging(Log log, MessageContext messageContext) {
  if (log.isDebugEnabled()) {
    log.debug("Synapse handler received a new message for message mediation...");
    log.debug("Received To: " + (messageContext.getTo() != null ?
        messageContext.getTo().getAddress() : "null"));
    log.debug("SOAPAction: " + (messageContext.getSoapAction() != null ?
        messageContext.getSoapAction() : "null"));
    log.debug("WSA-Action: " + (messageContext.getWSAAction() != null ?
        messageContext.getWSAAction() : "null"));
    String[] cids = messageContext.getAttachmentMap().getAllContentIDs();
    if (cids != null && cids.length > 0) {
      for (int i = 0; i < cids.length; i++) {
        log.debug("Attachment : " + cids[i]);
      }
    }
    log.debug("Body : \n" + messageContext.getEnvelope());
  }
}

代码示例来源:origin: wso2/wso2-synapse

/**
 * Helper util method to get the logging done whenever injecting the message into synapse
 *
 * @param log - Log appender to be used to append logs
 * @param messageContext - MessageContext which will be logged
 */
public static void doHandlerLogging(Log log, MessageContext messageContext) {
  if (log.isDebugEnabled()) {
    log.debug("Synapse handler received a new message for message mediation...");
    log.debug("Received To: " + (messageContext.getTo() != null ?
        messageContext.getTo().getAddress() : "null"));
    log.debug("SOAPAction: " + (messageContext.getSoapAction() != null ?
        messageContext.getSoapAction() : "null"));
    log.debug("WSA-Action: " + (messageContext.getWSAAction() != null ?
        messageContext.getWSAAction() : "null"));
    String[] cids = messageContext.getAttachmentMap().getAllContentIDs();
    if (cids != null && cids.length > 0) {
      for (int i = 0; i < cids.length; i++) {
        log.debug("Attachment : " + cids[i]);
      }
    }
    log.debug("Body : \n" + messageContext.getEnvelope());
  }
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
   * If addressing was found and the dispatch failed we SHOULD (and hence will) return a
   * WS-Addressing ActionNotSupported fault. This will make more sense once the
   * AddressingBasedDsipatcher is moved into the addressing module
   */
  private void checkAction(MessageContext msgContext) throws AxisFault {
    if ((msgContext.getAxisService() == null) || (msgContext.getAxisOperation() == null)) {
      AddressingFaultsHelper
          .triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: apache/axis2-java

/**
   * If addressing was found and the dispatch failed we SHOULD (and hence will) return a
   * WS-Addressing ActionNotSupported fault. This will make more sense once the
   * AddressingBasedDsipatcher is moved into the addressing module
   */
  private void checkAction(MessageContext msgContext) throws AxisFault {
    if ((msgContext.getAxisService() == null) || (msgContext.getAxisOperation() == null)) {
      AddressingFaultsHelper
          .triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: org.apache.airavata/airavata-message-broker

private void checkAction(MessageContext msgContext) throws AxisFault {
  Phase addPhase = getAddressingPhase(msgContext);
  if (addPhase == null) {
    logger.error("unable to locate addressing phase object");
  }
  if (msgContext != null) {
    if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) {
      if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
        AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

while (msgContextIterator.hasNext()) {
  MessageContext msgContext = msgContextIterator.next();
  log.debug("msgContext: " + msgContext + " action: " + msgContext.getWSAAction());

代码示例来源:origin: apache/axis2-java

while (msgContextIterator.hasNext()) {
  MessageContext msgContext = msgContextIterator.next();
  log.debug("msgContext: " + msgContext + " action: " + msgContext.getWSAAction());

代码示例来源:origin: org.apache.airavata/messagebroker

private void checkAction(MessageContext msgContext) throws AxisFault {
  Phase addPhase = getAddressingPhase(msgContext);
  if (addPhase == null) {
    logger.error("unable to locate addressing phase object");
  }
  if (msgContext != null) {
    if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) {
      if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
        AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: org.apache.airavata/messagebox

private void checkAction(MessageContext msgContext) throws AxisFault {
  Phase addPhase = getAddressingPhase(msgContext);
  if (addPhase == null) {
    logger.error("unable to locate addressing phase object");
  }
  if (msgContext != null) {
    if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) {
      if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
        AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: org.apache.airavata/airavata-message-box

private void checkAction(MessageContext msgContext) throws AxisFault {
  Phase addPhase = getAddressingPhase(msgContext);
  if (addPhase == null) {
    logger.error("unable to locate addressing phase object");
  }
  if (msgContext != null) {
    if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) {
      if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
        AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction());
    }
  }
}

代码示例来源:origin: org.apache.synapse/synapse-core

if (EventingConstants.WSE_SUBSCRIBE.equals(mc.getWSAAction())) {
} else if (EventingConstants.WSE_UNSUBSCRIBE.equals(mc.getWSAAction())) {
} else if (EventingConstants.WSE_GET_STATUS.equals(mc.getWSAAction())) {
} else if (EventingConstants.WSE_RENEW.equals(mc.getWSAAction())) {

代码示例来源:origin: wso2/wso2-synapse

if (axis2MessageCtx.getWSAAction() != null) {
  transportPropertyMap.put("WSAction", axis2MessageCtx.getWSAAction());

代码示例来源:origin: org.apache.sandesha2/sandesha2-core

boolean isFault = isRMFaultAction(rmMsgCtx.getMessageContext().getWSAAction());

代码示例来源:origin: org.apache.synapse/synapse-core

(mc.getSoapAction() != null ? mc.getSoapAction() : "null"));
traceOrDebug(traceOn, "WSA-Action: " +
  (mc.getWSAAction() != null ? mc.getWSAAction() : "null"));

相关文章

微信公众号

最新文章

更多

MessageContext类方法