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


Java AddressingUtils类代码示例

本文整理汇总了Java中org.globus.wsrf.utils.AddressingUtils的典型用法代码示例。如果您正苦于以下问题:Java AddressingUtils类的具体用法?Java AddressingUtils怎么用?Java AddressingUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ServiceSecurityImpl

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public ServiceSecurityImpl() throws RemoteException {
	try {
		EndpointReferenceType type = AddressingUtils.createEndpointReference(null);
		String configFileEnd = (String) MessageContext.getCurrentContext().getProperty("securityMetadata");
		String configFile = ContainerConfig.getBaseDirectory() + File.separator + configFileEnd;
		File f = new File(configFile);
		if (!f.exists()) {
			throw new RemoteException("The security metadata file (" + configFile + ") could not be found!!!");
		}
		metadata = (ServiceSecurityMetadata) Utils.deserializeDocument(configFile, ServiceSecurityMetadata.class);

	} catch (Exception e) {
		FaultHelper.printStackTrace(e);
		throw new RemoteException(Utils.getExceptionMessage(e));
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:17,代码来源:ServiceSecurityImpl.java

示例2: DorianImpl

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public DorianImpl() throws RemoteException {
    try {
        EndpointReferenceType type = AddressingUtils.createEndpointReference(null);
        String configFile = DorianConfiguration.getConfiguration().getDorianConfiguration();
        String propertiesFile = DorianConfiguration.getConfiguration().getDorianProperties();
        BeanUtils utils = new BeanUtils(new FileSystemResource(configFile), new FileSystemResource(propertiesFile));
        DorianProperties conf = utils.getDorianProperties();
        this.dorian = new Dorian(conf, type.getAddress().toString());
        getResourceHome().getAddressedResource().setDorian(this.dorian);
        QName[] list = new QName[1];
        list[0] = AuthenticationProfile.BASIC_AUTHENTICATION;
        AuthenticationProfiles profiles = new AuthenticationProfiles();
        profiles.setProfile(list);
        getResourceHome().getAddressedResource().setAuthenticationProfiles(profiles);

        utils.getEventManager().logEvent(AuditConstants.SYSTEM_ID, AuditConstants.SYSTEM_ID,
            FederationAudit.SystemStartup.getValue(), "System successfully started!!!");
    } catch (Exception e) {
        FaultHelper.printStackTrace(e);
        throw new RemoteException(Utils.getExceptionMessage(e));
    }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:23,代码来源:DorianImpl.java

示例3: getDelegatedCredentialRefernce

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
private DelegatedCredentialReference getDelegatedCredentialRefernce(
		DelegationIdentifier id) throws CDSInternalFault {
	try {
		MessageContext ctx = MessageContext.getCurrentContext();
		String transportURL = (String) ctx
				.getProperty(org.apache.axis.MessageContext.TRANS_URL);
		transportURL = transportURL.substring(0, transportURL
				.lastIndexOf('/') + 1);

		transportURL += "DelegatedCredential";

		EndpointReferenceType epr = AddressingUtils
				.createEndpointReference(transportURL, home
						.getResourceKey(id));
		return new DelegatedCredentialReference(epr);
	} catch (Exception e) {
		log.error(e.getMessage(), e);
		throw Errors.getInternalFault("Unexpected error creating EPR.", e);
	}

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

示例4: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "Gallery";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference ref = new org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:14,代码来源:GalleryResourceHome.java

示例5: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "StockPortfolioManager";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference ref = new org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:14,代码来源:StockPortfolioManagerResourceHome.java

示例6: createWorkflow

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public workflowmanagementfactoryservice.WMSOutputType createWorkflow(workflowmanagementfactoryservice.WMSInputType wMSInputElement) throws RemoteException, gov.nih.nci.cagrid.workflow.factory.stubs.types.WorkflowException {

	  TavernaWorkflowServiceImplResourceHome home = null;
		ResourceKey key = null;
		int TERM_TIME = 180;
		try {
			System.out.println("Creating a resource for the workflow..");
			Context ctx = new InitialContext();
			String lookupString = Constants.JNDI_SERVICES_BASE_NAME +
			"cagrid/TavernaWorkflowServiceImpl"+ "/home";
			home = (TavernaWorkflowServiceImplResourceHome) ctx.lookup(lookupString);

			key = home.createResource();

			//Create a resource on the Impl Service.
			TavernaWorkflowServiceImplResource workflowResource = home.getResource(key);

			EndpointReferenceType epr = AddressingUtils.createEndpointReference(ServiceHost
					.getBaseURL() + "cagrid/TavernaWorkflowServiceImpl", key);
			
			//If the Client sends a Termination time, use it. Otherwise use the default 180min.
			Calendar termTime = wMSInputElement.getTerminationTime();
			
			if(termTime == null){
				termTime = Calendar.getInstance();
		        termTime.add(Calendar.MINUTE, TERM_TIME);
			}
			workflowResource.setTerminationTime(termTime);
	        
			workflowResource.createWorkflow(wMSInputElement, threadExecutor);
			WMSOutputType wMSOutputElement = new WMSOutputType();
			wMSOutputElement.setWorkflowEPR(epr);
			return wMSOutputElement;
			
		} catch (Exception e1) {
			
			e1.printStackTrace();
			throw new RemoteException(e1.getLocalizedMessage());
		}
	}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:41,代码来源:TavernaWorkflowServiceImpl.java

示例7: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "TavernaWorkflowServiceImpl";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference ref = new gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:TavernaWorkflowServiceImplResourceHome.java

示例8: createEnumerationResponse

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public static EnumerationResponseContainer createEnumerationResponse(EnumIterator enumIter)
    throws EnumerationCreationException {
    try {
        EnumResourceHome resourceHome = EnumResourceHome.getEnumResourceHome();
        VisibilityProperties visibility = new VisibilityProperties(
            "cagrid/" + WsEnumConstants.CAGRID_ENUMERATION_SERVICE_NAME, null);

        EnumResource resource = resourceHome.createEnumeration(
            enumIter, visibility, false);
        ResourceKey key = resourceHome.getKey(resource);

        EnumerationContextType enumContext = 
            EnumProvider.createEnumerationContextType(key);

        URL baseURL = ServiceHost.getBaseURL();
        String serviceURI = baseURL.toString() 
            + "cagrid/" + WsEnumConstants.CAGRID_ENUMERATION_SERVICE_NAME;

        EndpointReferenceType epr = 
            AddressingUtils.createEndpointReference(serviceURI, key);

        EnumerationResponseContainer container = new EnumerationResponseContainer();
        container.setContext(enumContext);
        container.setEPR(epr);
        return container;
    } catch (Exception ex) {
        throw new EnumerationCreationException(ex.getMessage(), ex);
    }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:EnumerateResponseFactory.java

示例9: main

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public static void main(String[] args) {
	try {
		EndpointReferenceType epr = AddressingUtils.createEndpointReference(args[0], null);
		CQLQueryResultsValidator validator = new CQLQueryResultsValidator(epr);
		CQLQueryResults result = Utils.deserializeDocument(args[1], CQLQueryResults.class);
		validator.validateCQLResultSet(result);
		System.out.println("Results were valid.");
	} catch (Exception e) {
		System.out.println("Results were invalid: " + e.getMessage());
		e.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:13,代码来源:CQLQueryResultsValidator.java

示例10: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public org.cagrid.transfer.context.stubs.types.TransferServiceContextReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "TransferServiceContext";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	org.cagrid.transfer.context.stubs.types.TransferServiceContextReference ref = new org.cagrid.transfer.context.stubs.types.TransferServiceContextReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:TransferServiceContextResourceHome.java

示例11: GTSImpl

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
public GTSImpl() throws RemoteException {
	try {
		EndpointReferenceType type = AddressingUtils.createEndpointReference(null);
		String configFileEnd = (String) MessageContext.getCurrentContext().getProperty(GTS_CONFIG);
		String configFile = ContainerConfig.getBaseDirectory() + File.separator + configFileEnd;
		SimpleResourceManager srm = new SimpleResourceManager(configFile);
		Configuration conf = (Configuration) srm.getResource(Configuration.RESOURCE);
		this.gts = new GTS(conf, type.getAddress().toString());
	} catch (Exception e) {
		FaultHelper.printStackTrace(e);
		throw new RemoteException("Error configuring Grid Trust Service");
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:GTSImpl.java

示例12: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "FederatedQueryResultsRetrieval";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference ref = new gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:FederatedQueryResultsRetrievalResourceHome.java

示例13: getResourceReference

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
	* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
	*/
public gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference getResourceReference(ResourceKey key) throws Exception {
	MessageContext ctx = MessageContext.getCurrentContext();
	String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
	transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
	transportURL += "FederatedQueryResults";
	EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
	gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference ref = new gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference();
	ref.setEndpointReference(epr);
	return ref;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:FederatedQueryResultsResourceHome.java

示例14: createTransferContext

import org.globus.wsrf.utils.AddressingUtils; //导入依赖的package包/类
/**
 * This method is called to create a transfer resource that will be loaded
 * from the client
 * 
 * @param dd
 *            optional metadata about that data which is being staged
 * @return Reference to the resource which was created to represent your
 *         transfer data
 * @throws RemoteException
 */
public static org.cagrid.transfer.context.stubs.types.TransferServiceContextReference createTransferContext(
		DataDescriptor dd, DataStagedCallback callback)
		throws RemoteException {
	org.apache.axis.message.addressing.EndpointReferenceType epr = new org.apache.axis.message.addressing.EndpointReferenceType();
	org.cagrid.transfer.context.service.globus.resource.TransferServiceContextResourceHome home = null;
	org.globus.wsrf.ResourceKey resourceKey = null;
	org.apache.axis.MessageContext ctx = org.apache.axis.MessageContext
			.getCurrentContext();

	String servicePath = ctx.getTargetService();
	String homeName = "java:comp/env/services/cagrid/TransferServiceContext/home";

	try {
		javax.naming.Context initialContext = new javax.naming.InitialContext();
		home = (org.cagrid.transfer.context.service.globus.resource.TransferServiceContextResourceHome) initialContext
				.lookup(homeName);
		resourceKey = home.createResource();

		// Grab the newly created resource
		org.cagrid.transfer.context.service.globus.resource.TransferServiceContextResource thisResource = (org.cagrid.transfer.context.service.globus.resource.TransferServiceContextResource) home
				.find(resourceKey);

		thisResource
				.setSecurityDescriptor(gov.nih.nci.cagrid.introduce.servicetools.security.SecurityUtils
						.createCreatorOnlyResourceSecurityDescriptor());
		thisResource.stage(dd, callback);

		String transportURL = (String) ctx
				.getProperty(org.apache.axis.MessageContext.TRANS_URL);
		transportURL = transportURL.substring(0, transportURL
				.lastIndexOf('/') + 1);
		transportURL += "TransferServiceContext";
		epr = org.globus.wsrf.utils.AddressingUtils
				.createEndpointReference(transportURL, resourceKey);
	} catch (Exception e) {
		throw new RemoteException(
				"Error looking up TransferServiceContext home:"
						+ e.getMessage(), e);
	}

	// return the typed EPR
	org.cagrid.transfer.context.stubs.types.TransferServiceContextReference ref = new org.cagrid.transfer.context.stubs.types.TransferServiceContextReference();
	ref.setEndpointReference(epr);

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


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