本文整理了Java中org.apache.axis.MessageContext.getAxisEngine()
方法的一些代码示例,展示了MessageContext.getAxisEngine()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MessageContext.getAxisEngine()
方法的具体详情如下:
包路径:org.apache.axis.MessageContext
类名称:MessageContext
方法名:getAxisEngine
[英]Get the axis engine. This will be null
if the message was created outside an engine
[中]找到axis引擎。如果消息是在引擎外部创建的,则该值为null
代码示例来源:origin: axis/axis
private Set getDeployedServiceNames(MessageContext msgContext) throws ConfigurationException {
Set serviceNames = new HashSet();
Iterator deployedServicesIter = msgContext.getAxisEngine().getConfig().getDeployedServices();
while (deployedServicesIter.hasNext()) {
ServiceDesc serviceDesc = (ServiceDesc) deployedServicesIter.next();
serviceNames.add(serviceDesc.getName());
}
return serviceNames;
}
代码示例来源:origin: org.apache.axis/axis
private Set getDeployedServiceNames(MessageContext msgContext) throws ConfigurationException {
Set serviceNames = new HashSet();
Iterator deployedServicesIter = msgContext.getAxisEngine().getConfig().getDeployedServices();
while (deployedServicesIter.hasNext()) {
ServiceDesc serviceDesc = (ServiceDesc) deployedServicesIter.next();
serviceNames.add(serviceDesc.getName());
}
return serviceNames;
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
private Set getDeployedServiceNames(MessageContext msgContext) throws ConfigurationException {
Set serviceNames = new HashSet();
Iterator deployedServicesIter = msgContext.getAxisEngine().getConfig().getDeployedServices();
while (deployedServicesIter.hasNext()) {
ServiceDesc serviceDesc = (ServiceDesc) deployedServicesIter.next();
serviceNames.add(serviceDesc.getName());
}
return serviceNames;
}
代码示例来源:origin: org.apache.axis/axis
public boolean shouldDoAutoTypes() {
if(doAutoTypes != null) {
return doAutoTypes.booleanValue();
}
MessageContext msgContext = MessageContext.getCurrentContext();
if(msgContext != null) {
if (msgContext.isPropertyTrue("axis.doAutoTypes") ||
(msgContext.getAxisEngine() != null && JavaUtils.isTrue(msgContext.getAxisEngine().getOption("axis.doAutoTypes")))) {
doAutoTypes = Boolean.TRUE;
}
}
if(doAutoTypes == null){
doAutoTypes = AxisProperties.getProperty("axis.doAutoTypes",
"false")
.equals("true") ?
Boolean.TRUE : Boolean.FALSE;
}
return doAutoTypes.booleanValue();
}
代码示例来源:origin: axis/axis
public boolean shouldDoAutoTypes() {
if(doAutoTypes != null) {
return doAutoTypes.booleanValue();
}
MessageContext msgContext = MessageContext.getCurrentContext();
if(msgContext != null) {
if (msgContext.isPropertyTrue("axis.doAutoTypes") ||
(msgContext.getAxisEngine() != null && JavaUtils.isTrue(msgContext.getAxisEngine().getOption("axis.doAutoTypes")))) {
doAutoTypes = Boolean.TRUE;
}
}
if(doAutoTypes == null){
doAutoTypes = AxisProperties.getProperty("axis.doAutoTypes",
"false")
.equals("true") ?
Boolean.TRUE : Boolean.FALSE;
}
return doAutoTypes.booleanValue();
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
public boolean shouldDoAutoTypes() {
if(doAutoTypes != null) {
return doAutoTypes.booleanValue();
}
MessageContext msgContext = MessageContext.getCurrentContext();
if(msgContext != null) {
if (msgContext.isPropertyTrue("axis.doAutoTypes") ||
(msgContext.getAxisEngine() != null && JavaUtils.isTrue(msgContext.getAxisEngine().getOption("axis.doAutoTypes")))) {
doAutoTypes = Boolean.TRUE;
}
}
if(doAutoTypes == null){
doAutoTypes = AxisProperties.getProperty("axis.doAutoTypes",
"false")
.equals("true") ?
Boolean.TRUE : Boolean.FALSE;
}
return doAutoTypes.booleanValue();
}
代码示例来源:origin: axis/axis
/**
* Default java service object comes from simply instantiating the
* class wrapped in jc
*
*/
protected Object makeNewServiceObject(MessageContext msgContext,
String clsName)
throws Exception
{
ClassLoader cl = msgContext.getClassLoader();
ClassCache cache = msgContext.getAxisEngine().getClassCache();
JavaClass jc = cache.lookup(clsName, cl);
return jc.getJavaClass().newInstance();
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
/**
* Default java service object comes from simply instantiating the
* class wrapped in jc
*
*/
protected Object makeNewServiceObject(MessageContext msgContext,
String clsName)
throws Exception
{
ClassLoader cl = msgContext.getClassLoader();
ClassCache cache = msgContext.getAxisEngine().getClassCache();
JavaClass jc = cache.lookup(clsName, cl);
return jc.getJavaClass().newInstance();
}
代码示例来源:origin: org.apache.axis/axis
/**
* Default java service object comes from simply instantiating the
* class wrapped in jc
*
*/
protected Object makeNewServiceObject(MessageContext msgContext,
String clsName)
throws Exception
{
ClassLoader cl = msgContext.getClassLoader();
ClassCache cache = msgContext.getAxisEngine().getClassCache();
JavaClass jc = cache.lookup(clsName, cl);
return jc.getJavaClass().newInstance();
}
代码示例来源:origin: axis/axis
public static String getEncoding(Message message,
MessageContext msgContext,
XMLEncoder defaultEncoder) {
String encoding = null;
try {
if(message != null) {
encoding = (String) message.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
} catch (SOAPException e) {
}
if(msgContext == null) {
msgContext = MessageContext.getCurrentContext();
}
if(msgContext != null && encoding == null){
encoding = (String) msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
if (msgContext != null && encoding == null && msgContext.getAxisEngine() != null) {
encoding = (String) msgContext.getAxisEngine().getOption(AxisEngine.PROP_XML_ENCODING);
}
if (encoding == null && defaultEncoder != null) {
encoding = defaultEncoder.getEncoding();
}
return encoding;
}
}
代码示例来源:origin: org.apache.axis/axis
public static String getEncoding(Message message,
MessageContext msgContext,
XMLEncoder defaultEncoder) {
String encoding = null;
try {
if(message != null) {
encoding = (String) message.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
} catch (SOAPException e) {
}
if(msgContext == null) {
msgContext = MessageContext.getCurrentContext();
}
if(msgContext != null && encoding == null){
encoding = (String) msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
if (msgContext != null && encoding == null && msgContext.getAxisEngine() != null) {
encoding = (String) msgContext.getAxisEngine().getOption(AxisEngine.PROP_XML_ENCODING);
}
if (encoding == null && defaultEncoder != null) {
encoding = defaultEncoder.getEncoding();
}
return encoding;
}
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
public static String getEncoding(Message message,
MessageContext msgContext,
XMLEncoder defaultEncoder) {
String encoding = null;
try {
if(message != null) {
encoding = (String) message.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
} catch (SOAPException e) {
}
if(msgContext == null) {
msgContext = MessageContext.getCurrentContext();
}
if(msgContext != null && encoding == null){
encoding = (String) msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
}
if (msgContext != null && encoding == null && msgContext.getAxisEngine() != null) {
encoding = (String) msgContext.getAxisEngine().getOption(AxisEngine.PROP_XML_ENCODING);
}
if (encoding == null && defaultEncoder != null) {
encoding = defaultEncoder.getEncoding();
}
return encoding;
}
}
代码示例来源:origin: axis/axis
private Object getApplicationScopedObject(MessageContext msgContext, String serviceName, String clsName, IntHolder scopeHolder) throws Exception {
AxisEngine engine = msgContext.getAxisEngine();
Session appSession = engine.getApplicationSession();
if (appSession != null) {
return getSessionServiceObject(appSession, serviceName,
msgContext, clsName);
} else {
// was no application session - log an error and
// treat as request scope
log.error(Messages.getMessage("noAppSession"));
scopeHolder.value = Scope.DEFAULT.getValue();
return getNewServiceObject(msgContext, clsName);
}
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
private Object getApplicationScopedObject(MessageContext msgContext, String serviceName, String clsName, IntHolder scopeHolder) throws Exception {
AxisEngine engine = msgContext.getAxisEngine();
Session appSession = engine.getApplicationSession();
if (appSession != null) {
return getSessionServiceObject(appSession, serviceName,
msgContext, clsName);
} else {
// was no application session - log an error and
// treat as request scope
log.error(Messages.getMessage("noAppSession"));
scopeHolder.value = Scope.DEFAULT.getValue();
return getNewServiceObject(msgContext, clsName);
}
}
代码示例来源:origin: org.apache.axis/axis
private Object getApplicationScopedObject(MessageContext msgContext, String serviceName, String clsName, IntHolder scopeHolder) throws Exception {
AxisEngine engine = msgContext.getAxisEngine();
Session appSession = engine.getApplicationSession();
if (appSession != null) {
return getSessionServiceObject(appSession, serviceName,
msgContext, clsName);
} else {
// was no application session - log an error and
// treat as request scope
log.error(Messages.getMessage("noAppSession"));
scopeHolder.value = Scope.DEFAULT.getValue();
return getNewServiceObject(msgContext, clsName);
}
}
代码示例来源:origin: org.apache.axis/axis
/**
* Set the target service for this message.
* <p>
* This looks up the named service in the registry, and has
* the side effect of setting our TypeMappingRegistry to the
* service's.
*
* @param tServ the name of the target service
* @throws AxisFault if anything goes wrong in resolving or setting the
* service
*/
public void setTargetService(String tServ) throws AxisFault {
log.debug("MessageContext: setTargetService(" + tServ+")");
if (tServ == null) {
setService(null);
}
else {
try {
setService(getAxisEngine().getService(tServ));
} catch (AxisFault fault) {
// If we're on the client, don't throw this fault...
if (!isClient()) {
throw fault;
}
}
}
targetService = tServ;
}
代码示例来源:origin: axis/axis
/**
* Set the target service for this message.
* <p>
* This looks up the named service in the registry, and has
* the side effect of setting our TypeMappingRegistry to the
* service's.
*
* @param tServ the name of the target service
* @throws AxisFault if anything goes wrong in resolving or setting the
* service
*/
public void setTargetService(String tServ) throws AxisFault {
log.debug("MessageContext: setTargetService(" + tServ+")");
if (tServ == null) {
setService(null);
}
else {
try {
setService(getAxisEngine().getService(tServ));
} catch (AxisFault fault) {
// If we're on the client, don't throw this fault...
if (!isClient()) {
throw fault;
}
}
}
targetService = tServ;
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
/**
* Set the target service for this message.
* <p>
* This looks up the named service in the registry, and has
* the side effect of setting our TypeMappingRegistry to the
* service's.
*
* @param tServ the name of the target service
* @throws AxisFault if anything goes wrong in resolving or setting the
* service
*/
public void setTargetService(String tServ) throws AxisFault {
log.debug("MessageContext: setTargetService(" + tServ+")");
if (tServ == null) {
setService(null);
}
else {
try {
setService(getAxisEngine().getService(tServ));
} catch (AxisFault fault) {
// If we're on the client, don't throw this fault...
if (!isClient()) {
throw fault;
}
}
}
targetService = tServ;
}
代码示例来源:origin: org.picocontainer.web/picocontainer-web-axis
protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception {
ClassLoader cl = msgContext.getClassLoader();
ClassCache cache = msgContext.getAxisEngine().getClassCache();
Class<?> svcClass = cache.lookup(clsName, cl).getJavaClass();
return PicoServletContainerFilter.getRequestComponentForThread(svcClass);
}
代码示例来源:origin: org.picocontainer.web/picocontainer-web-axis
protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception {
ClassLoader cl = msgContext.getClassLoader();
ClassCache cache = msgContext.getAxisEngine().getClassCache();
Class<?> svcClass = cache.lookup(clsName, cl).getJavaClass();
return PicoServletContainerFilter.getRequestComponentForThread(svcClass);
}
内容来源于网络,如有侵权,请联系作者删除!