本文整理汇总了Java中org.globus.wsrf.utils.AddressingUtils.createEndpointReference方法的典型用法代码示例。如果您正苦于以下问题:Java AddressingUtils.createEndpointReference方法的具体用法?Java AddressingUtils.createEndpointReference怎么用?Java AddressingUtils.createEndpointReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.globus.wsrf.utils.AddressingUtils
的用法示例。
在下文中一共展示了AddressingUtils.createEndpointReference方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
}
示例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));
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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());
}
}
示例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;
}
示例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);
}
}
示例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();
}
}
示例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;
}
示例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");
}
}
示例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;
}
示例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;
}