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


Java MessageContext.getCurrentContext方法代码示例

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


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

示例1: getMessageAttachments

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
 * extract attachments from the current request
 * 
 * @return a list of attachmentparts or
 *         an empty array for no attachments support in this axis
 *         buid/runtime
 * @throws AxisFault 
 */
private AttachmentPart[] getMessageAttachments() throws AxisFault {

    MessageContext msgContext = MessageContext.getCurrentContext();
    Message reqMsg = msgContext.getRequestMessage();
    Attachments messageAttachments = reqMsg.getAttachmentsImpl();
    int attachmentCount =
            messageAttachments.getAttachmentCount();
    AttachmentPart attachments[] = new AttachmentPart[attachmentCount];
    Iterator it =
            messageAttachments.getAttachments().iterator();
    int count = 0;

    while (it.hasNext()) {
        AttachmentPart part = (AttachmentPart) it.next();
        attachments[count++] = part;
    }
    return attachments;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:SwaBindingImpl.java

示例2: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public StudyConsumerResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/StudyConsumer";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (StudyConsumerResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:labviewer,代码行数:22,代码来源:StudyConsumerResourceBase.java

示例3: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public CaNanoLabServiceResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/CaNanoLabService";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (CaNanoLabServiceResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cananolab,代码行数:22,代码来源:CaNanoLabServiceResourceBase.java

示例4: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public ResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (ResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:20,代码来源:BaseResource.java

示例5: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public static RegistrationConsumerConfiguration getConfiguration() throws Exception {
	if (RegistrationConsumerConfiguration.configuration != null) {
		return RegistrationConsumerConfiguration.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
	try {
		javax.naming.Context initialContext = new InitialContext();
		RegistrationConsumerConfiguration.configuration = (RegistrationConsumerConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		throw new Exception("Unable to instantiate service configuration.", e);
	}

	return RegistrationConsumerConfiguration.configuration;
}
 
开发者ID:NCIP,项目名称:labviewer,代码行数:19,代码来源:RegistrationConsumerConfiguration.java

示例6: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public DorianConfiguration getConfiguration() throws Exception {
    if (this.configuration != null) {
        return this.configuration;
    }
    MessageContext ctx = MessageContext.getCurrentContext();

    String servicePath = ctx.getTargetService();

    String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
    try {
        javax.naming.Context initialContext = new InitialContext();
        this.configuration = (DorianConfiguration) initialContext.lookup(jndiName);
    } catch (Exception e) {
        throw new Exception("Unable to instantiate service configuration.", e);
    }

    return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:19,代码来源:DorianImpl.java

示例7: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public static CredentialDelegationServiceConfiguration getConfiguration() throws Exception {
	if (CredentialDelegationServiceConfiguration.configuration != null) {
		return CredentialDelegationServiceConfiguration.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
	try {
		javax.naming.Context initialContext = new InitialContext();
		CredentialDelegationServiceConfiguration.configuration = (CredentialDelegationServiceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		throw new Exception("Unable to instantiate service configuration.", e);
	}

	return CredentialDelegationServiceConfiguration.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:19,代码来源:CredentialDelegationServiceConfiguration.java

示例8: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public RegistrationConsumerResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/RegistrationConsumer";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (RegistrationConsumerResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:labviewer,代码行数:22,代码来源:RegistrationConsumerResourceBase.java

示例9: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public static GTSConfiguration getConfiguration() throws Exception {
	if (GTSConfiguration.configuration != null) {
		return GTSConfiguration.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
	try {
		javax.naming.Context initialContext = new InitialContext();
		GTSConfiguration.configuration = (GTSConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		throw new Exception("Unable to instantiate service configuration.", e);
	}

	return GTSConfiguration.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:19,代码来源:GTSConfiguration.java

示例10: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public FederatedQueryResultsResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/FederatedQueryResults";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (FederatedQueryResultsResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:22,代码来源:FederatedQueryResultsResourceBase.java

示例11: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public GalleryResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/Gallery";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (GalleryResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:22,代码来源:GalleryResourceBase.java

示例12: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public PhotoSharingResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/PhotoSharing";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (PhotoSharingResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:22,代码来源:PhotoSharingResourceBase.java

示例13: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public TavernaWorkflowServiceResourceConfiguration getConfiguration() {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();
	servicePath = servicePath.substring(0,servicePath.lastIndexOf("/"));
	servicePath+="/TavernaWorkflowService";

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/configuration";
	logger.debug("Will read configuration from jndi name: " + jndiName);
	try {
		Context initialContext = new InitialContext();
		this.configuration = (TavernaWorkflowServiceResourceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		logger.error("when performing JNDI lookup for " + jndiName + ": " + e, e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:22,代码来源:TavernaWorkflowServiceResourceBase.java

示例14: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public ServiceConfiguration getConfiguration() throws Exception {
	if (this.configuration != null) {
		return this.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
	try {
		javax.naming.Context initialContext = new InitialContext();
		this.configuration = (ServiceConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		throw new Exception("Unable to instantiate service configuration.", e);
	}

	return this.configuration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:19,代码来源:GTSImpl.java

示例15: getConfiguration

import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public static CaObrConfiguration getConfiguration() throws Exception {
	if (CaObrConfiguration.configuration != null) {
		return CaObrConfiguration.configuration;
	}
	MessageContext ctx = MessageContext.getCurrentContext();

	String servicePath = ctx.getTargetService();

	String jndiName = Constants.JNDI_SERVICES_BASE_NAME + servicePath + "/serviceconfiguration";
	try {
		javax.naming.Context initialContext = new InitialContext();
		CaObrConfiguration.configuration = (CaObrConfiguration) initialContext.lookup(jndiName);
	} catch (Exception e) {
		throw new Exception("Unable to instantiate service configuration.", e);
	}

	return CaObrConfiguration.configuration;
}
 
开发者ID:NCIP,项目名称:caobr,代码行数:19,代码来源:CaObrConfiguration.java


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