本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}