org.apache.axis2.i18n.Messages.getMessage()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(124)

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

Messages.getMessage介绍

[英]Get a message from resource.properties from the package of the given object.
[中]从资源获取消息。来自给定对象的包的属性。

代码示例

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

/**
 * Get the version of this AXIS.
 *
 * @return the version of this axis2
 */
public static String getVersion() {
  return Messages.getMessage("axisVersion") + "\n" +
      Messages.getMessage("builtOn");
}

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

/**
 * Returns the Axis Version number and build date.
 * <p/>
 * Example output: 1.1 Jul 08, 2003 (09:00:12 EDT)
 *
 * @return the full version of this axis2
 */
public static String getVersionText() {
  return Messages.getMessage("axisVersionRaw");
}

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

public void execute(Runnable worker) {
  if (shutDown) {
    throw new RuntimeException(Messages.getMessage("threadpoolshutdown"));
  }
  executor.execute(worker);
}

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

protected static Object makeNewServiceObject(AxisService service) throws AxisFault {
  Object serviceObject = Utils.createServiceObject(service);
  if (serviceObject == null) {
    throw new AxisFault(
        Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER"));
  } else {
    return serviceObject;
  }
}

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

public AxisMessage getMessage(String label) {
  if (WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(label)) {
    return (AxisMessage) getChild("inMessage");
  } else {
    throw new UnsupportedOperationException(Messages.getMessage("invalidacess"));
  }
}

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

public SOAPFactory getSOAPFactory(org.apache.axis2.context.MessageContext msgContext) throws AxisFault {
    String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI();
    if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
      return OMAbstractFactory.getSOAP12Factory();
    } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
      return OMAbstractFactory.getSOAP11Factory();
    } else {
      throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
    }
  }
}

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

public SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault {
  String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI();
  if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
    return OMAbstractFactory.getSOAP12Factory();
  } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
    return OMAbstractFactory.getSOAP11Factory();
  } else {
    throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
  }
}

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

private SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault {
    String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI();
    if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
      return OMAbstractFactory.getSOAP12Factory();
    } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
      return OMAbstractFactory.getSOAP11Factory();
    } else {
      throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
    }
  }
}

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

public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext)
    throws AxisFault {
  HashMap<String, MessageContext> mep = opContext.getMessageContexts();
  MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE);
  if (faultMessageCtxt != null) {
    throw new AxisFault(Messages.getMessage("mepcompleted"));
  } else {
    mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext);
    opContext.setComplete(true);
    opContext.cleanup();
  }
}

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

public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext)
    throws AxisFault {
  HashMap<String, MessageContext> mep = opContext.getMessageContexts();
  MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE);
  if (faultMessageCtxt != null) {
    throw new AxisFault(Messages.getMessage("mepcompleted"));
  } else {
    mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext);
    opContext.setComplete(true);
    opContext.cleanup();
  }
}

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

public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext)
    throws AxisFault {
  HashMap mep = opContext.getMessageContexts();
  MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE);
  if (faultMessageCtxt != null) {
    throw new AxisFault(Messages.getMessage("mepcompleted"));
  } else {
    mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext);
    opContext.setComplete(true);
    opContext.cleanup();
  }
}

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

public void addMessageContext(MessageContext msgContext, OperationContext opContext)
    throws AxisFault {
  if (!opContext.isComplete()) {
    opContext.getMessageContexts().put(MESSAGE_LABEL_IN_VALUE, msgContext);
    opContext.setComplete(true);
  } else {
    throw new AxisFault(Messages.getMessage("mepcompleted"));
  }
}

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

public void startService(String serviceName) throws AxisFault {
  AxisService service = allServices.get(serviceName);
  if (service == null) {
    throw new AxisFault(Messages.getMessage("servicenamenotvalid",
                        serviceName));
  }
  service.setActive(true);
  notifyObservers(new AxisEvent(AxisEvent.SERVICE_START , service), service);
}

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

public void stopService(String serviceName) throws AxisFault {
  AxisService service = allServices.get(serviceName);
  if (service == null) {
    throw new AxisFault(Messages.getMessage("servicenamenotvalid",
                        serviceName));
  }
  service.setActive(false);
  notifyObservers(new AxisEvent(AxisEvent.SERVICE_STOP , service), service);
}

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

/**
 * Add a Parameter
 *
 * @param param the Parameter to associate with this HandlerDescription
 */
public void addParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameterInclude.addParameter(param);
  }
}

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

public void removeParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameters.removeParameter(param);
  }
}

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

/**
 * @param param : Parameter to be added
 */
public void addParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameters.addParameter(param);
  }
}

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

public void addParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameterInclude.addParameter(param);
  }
}

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

public void removeParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameterInclude.removeParameter(param);
  }
}

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

public void removeParameter(Parameter param) throws AxisFault {
  if (isParameterLocked(param.getName())) {
    throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName()));
  } else {
    parameterInclude.removeParameter(param);
  }
}

相关文章

Messages类方法