当前位置: 首页>>代码示例>>Java>>正文


Java MessageContext.getMessageID方法代码示例

本文整理汇总了Java中org.apache.axis2.context.MessageContext.getMessageID方法的典型用法代码示例。如果您正苦于以下问题:Java MessageContext.getMessageID方法的具体用法?Java MessageContext.getMessageID怎么用?Java MessageContext.getMessageID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.context.MessageContext的用法示例。


在下文中一共展示了MessageContext.getMessageID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showMcMap

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
private void showMcMap(HashMap map) {
    if ((map != null) && (!map.isEmpty())) {
        Iterator itList = map.keySet().iterator();

        while (itList.hasNext()) {
            String key = (String) itList.next();

            MessageContext value = (MessageContext) map.get(key);
            String valueID = null;

            if (value != null) {
                valueID = value.getMessageID();

                log.debug(
                        "MessageContextSaveATest: showMcMap:  Message context   ID[" + valueID +
                                "]   Key Label [" + key + "]");

            }
        }
    } else {
        log.debug(
                "MessageContextSaveATest: showMcMap:  No entries to display for message contexts table.");
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:25,代码来源:MessageContextSaveATest.java

示例2: showMCTable

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
private void showMCTable(OperationContext oc) {
    if (oc == null) {
        return;
    }

    HashMap mcTable = oc.getMessageContexts();

    if ((mcTable == null) || (mcTable.isEmpty())) {
        return;
    }

    Iterator it = mcTable.keySet().iterator();

    while (it.hasNext()) {
        String key = (String) it.next();
        MessageContext mc = (MessageContext) mcTable.get(key);

        if (mc != null) {
            String id = mc.getMessageID();
            log.debug("message context table entry:   label [" + key +
                    "]    message ID [" + id + "]    ");
        }
    }

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:26,代码来源:MessageContextSaveCTest.java

示例3: isAsync

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
protected boolean isAsync() {
	MessageContext mc = getMessageContext();
	return 
	mc.getMessageID() != null && 
	!mc.getMessageID().equals("") &&
	mc.getReplyTo() != null &&
	!mc.getReplyTo().hasAnonymousAddress();
}
 
开发者ID:jembi,项目名称:openxds,代码行数:9,代码来源:AppendixV.java

示例4: addMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
/**
 * Adds message context to operation context, so that it will handle the logic correctly if the OperationContext
 * is null then new one will be created, and Operation Context will become null when some one calls reset().
 *
 * @param msgContext the MessageContext to add
 * @throws AxisFault
 */
@Override
public void addMessageContext(final MessageContext msgContext) throws AxisFault {
    msgContext.setServiceContext(sc);
    if (msgContext.getMessageID() == null) {
        setMessageID(msgContext);
    }
    axisOp.registerOperationContext(msgContext, oc);
}
 
开发者ID:holodeck-b2b,项目名称:Holodeck-B2B,代码行数:16,代码来源:OutOptInAxisOperation.java

示例5: RabbitMQMessage

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
/**
 * Create a rabbitMQ message with properties
 *
 * @param msgCtx message context from transport holding the message
 */
public RabbitMQMessage(MessageContext msgCtx) {
    this.soapAction = msgCtx.getSoapAction();
    this.messageId = msgCtx.getMessageID();
    this.correlationId = (String) msgCtx.getProperty(RabbitMQConstants.CORRELATION_ID);
    if ((correlationId == null) || (correlationId.isEmpty())) {
        this.correlationId = msgCtx.getMessageID();
        msgCtx.setProperty(RabbitMQConstants.CORRELATION_ID, correlationId);
    }
    this.contentType = (String) msgCtx.getProperty("messageType");
    this.contentEncoding = (String) msgCtx.getProperty("CHARACTER_SET_ENCODING");
    this.headers = (Map<String, Object>) msgCtx.getProperty(MessageContext.TRANSPORT_HEADERS);
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:18,代码来源:RabbitMQMessage.java

示例6: addMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
/**
 * Adds a message context to the client for processing. This method must not
 * process the message - it only records it in the MEP client. Processing
 * only occurs when execute() is called.
 *
 * @param mc the message context
 * @throws AxisFault if this is called inappropriately.
 */
public void addMessageContext(MessageContext mc) throws AxisFault {
    if (this.mc != null) {
        throw new AxisFault(Messages.getMessage("cannotaddmsgctx"));
    }
    this.mc = mc;
    if (mc.getMessageID() == null) {
        setMessageID(mc);
    }
    mc.setServiceContext(sc);
    axisOp.registerOperationContext(mc, oc);
    this.completed = false;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:21,代码来源:OutOnlyAxisOperation.java

示例7: compareMCMaps

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
private boolean compareMCMaps(HashMap m1, HashMap m2) {
    String title = "MessageContextSaveATest:compareMCMaps(): ";

    if ((m1 != null) && (m2 != null)) {
        int size1 = m1.size();
        int size2 = m2.size();

        if (size1 != size2) {
            log.debug(title + "MISMATCH:  map1 size [" + size1 +
                    "]  !=   map2 size [" + size2 + "]");
            return false;
        }

        String id1 = null;
        String id2 = null;

        // check the keys, ordering is not important between the two maps
        Iterator it1 = m1.keySet().iterator();

        while (it1.hasNext()) {
            String key1 = (String) it1.next();
            MessageContext value1 = (MessageContext) m1.get(key1);

            if (value1 != null) {
                id1 = value1.getMessageID();

                MessageContext value2 = (MessageContext) m2.get(key1);

                if (value2 != null) {
                    id2 = value2.getMessageID();
                } else {
                    // mismatch
                    log.debug(title +
                            "MISMATCH:  no message context in one of the tables for key [" +
                            key1 + "]");
                    return false;
                }

                if ((id1 != null) && (id2 != null)) {
                    if (!id1.equals(id2)) {
                        // mismatch
                        log.debug(title + "MISMATCH:  messageID_1 [" + id1 +
                                "]   !=    messageID_2 [" + id2 + "]");
                        return false;
                    }
                } else {
                    // null values, can't tell
                    log.debug(title + "MISMATCH:  one or more null message IDs");
                    return false;
                }
            }
        }
        return true;
    } else if ((m1 == null) && (m2 == null)) {
        return true;
    } else {
        // mismatch
        log.debug(title + "MISMATCH:  one of the tables is null");
        return false;
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:62,代码来源:MessageContextSaveATest.java

示例8: handleResponse

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
/**
   * Retrieves the properties from the proxyOutMessageContext and sets the values to the
   * inMessageContext.
   *
   * @param proxyOutMessageContext the active message context
   * @param initialMessageContext  the initial message context, which was stored as a property
   *                               in the proxyOutMessageContext
   * @throws AxisFault AxisFault
   */
  private void handleResponse(MessageContext proxyOutMessageContext, MessageContext initialMessageContext) throws AxisFault {
      MessageContext inMessageContext = initialMessageContext.getOperationContext().
              getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);

      // setting the properties
Iterator<String> initialPropertyIterator = proxyOutMessageContext.getPropertyNames();
if (initialPropertyIterator != null) {
	while (initialPropertyIterator.hasNext()) {
		String strKey = initialPropertyIterator.next();
		Object paramObj = proxyOutMessageContext.getProperty(strKey);
		if (paramObj != null) {
			inMessageContext.setProperty(strKey, paramObj);
		}
	}
} 

      inMessageContext.setEnvelope(getEnvelope(proxyOutMessageContext));
      inMessageContext.setAxisServiceGroup(initialMessageContext.getAxisServiceGroup());
      inMessageContext.setAxisService(initialMessageContext.getAxisService());
      inMessageContext.setAxisOperation(initialMessageContext.getAxisOperation());
      inMessageContext.setAxisMessage(initialMessageContext.getAxisOperation().getMessage(
              WSDLConstants.MESSAGE_LABEL_OUT_VALUE));
      inMessageContext.setIncomingTransportName(Constants.TRANSPORT_LOCAL);
      inMessageContext.setServiceContext(initialMessageContext.getServiceContext());

      // set properties on response
      inMessageContext.setServerSide(true);
      inMessageContext.setProperty(MessageContext.TRANSPORT_OUT,
              initialMessageContext.getProperty(MessageContext.TRANSPORT_OUT));
      inMessageContext.setProperty(Constants.OUT_TRANSPORT_INFO,
              initialMessageContext.getProperty(Constants.OUT_TRANSPORT_INFO));
      inMessageContext.setTransportIn(initialMessageContext.getTransportIn());
      inMessageContext.setTransportOut(initialMessageContext.getTransportOut());

      if (log.isDebugEnabled()) {
          log.debug("Setting AxisServiceGroup - " + initialMessageContext.getAxisServiceGroup());
          log.debug("Setting AxisService - " + initialMessageContext.getAxisService());
          log.debug("Setting AxisOperation - " + initialMessageContext.getAxisOperation());
          log.debug("Setting AxisMessage - " + initialMessageContext.getAxisOperation().
                  getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE));
          log.debug("Setting Incoming Transport name - " + Constants.TRANSPORT_LOCAL);
          log.debug("Setting Service Context " + initialMessageContext.getServiceGroupContext().toString());

          log.debug("Setting ServerSide to true");
          log.debug("Setting " + MessageContext.TRANSPORT_OUT + " property to " +
                  initialMessageContext.getProperty(MessageContext.TRANSPORT_OUT));
          log.debug("Setting " + Constants.OUT_TRANSPORT_INFO + " property to " +
                  initialMessageContext.getProperty(Constants.OUT_TRANSPORT_INFO));
          log.debug("Setting TransportIn - " + initialMessageContext.getTransportIn());
          log.debug("Setting TransportOut - " + initialMessageContext.getTransportOut());

          log.debug("Setting ReplyTo - " + initialMessageContext.getReplyTo());
          log.debug("Setting FaultTo - " + initialMessageContext.getFaultTo());
      }

      // copy the message type property that is used by the out message to the response message
      inMessageContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
              initialMessageContext.getProperty(Constants.Configuration.MESSAGE_TYPE));

      if (initialMessageContext.getMessageID() != null) {
          inMessageContext.setRelationships(
                  new RelatesTo[]{new RelatesTo(initialMessageContext.getMessageID())});
      }

      inMessageContext.setReplyTo(initialMessageContext.getReplyTo());
      inMessageContext.setFaultTo(initialMessageContext.getFaultTo());

      AxisEngine.receive(inMessageContext);
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:79,代码来源:LocalResponder.java

示例9: addMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
/**
 * Adds message context to operation context, so that it will handle the
 * logic correctly if the OperationContext is null then new one will be
 * created, and Operation Context will become null when some one calls reset().
 *
 * @param msgContext the MessageContext to add
 * @throws AxisFault
 */
public void addMessageContext(MessageContext msgContext) throws AxisFault {
    msgContext.setServiceContext(sc);
    if (msgContext.getMessageID() == null) {
        setMessageID(msgContext);
    }
    axisOp.registerOperationContext(msgContext, oc);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:OutInAxisOperation.java


注:本文中的org.apache.axis2.context.MessageContext.getMessageID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。