本文整理汇总了Java中org.apache.axis.message.addressing.EndpointReferenceType类的典型用法代码示例。如果您正苦于以下问题:Java EndpointReferenceType类的具体用法?Java EndpointReferenceType怎么用?Java EndpointReferenceType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EndpointReferenceType类属于org.apache.axis.message.addressing包,在下文中一共展示了EndpointReferenceType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: terminateEntry
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
protected Calendar terminateEntry(EndpointReferenceType entryEPR) throws ServiceException,
UnableToSetTerminationTimeFaultType, ResourceUnknownFaultType, TerminationTimeChangeRejectedFaultType,
RemoteException {
if (LOG.isDebugEnabled()) {
debugPrintResource("Terminating entry for:", entryEPR);
}
WSResourceLifetimeServiceAddressingLocator lifetimeloc = new WSResourceLifetimeServiceAddressingLocator();
ScheduledResourceTermination lifetimePort = lifetimeloc.getScheduledResourceTerminationPort(entryEPR);
setSecurityProperties((Stub) lifetimePort);
SetTerminationTime setTermTimeReq = new SetTerminationTime();
// terminate now (in 5 seconds)
Calendar term = Calendar.getInstance();
term.add(Calendar.SECOND, 5);
setTermTimeReq.setRequestedTerminationTime(term);
SetTerminationTimeResponse response = lifetimePort.setTerminationTime(setTermTimeReq);
LOG.debug("Set to terminate at:" + response.getNewTerminationTime().getTime());
if (LOG.isDebugEnabled()) {
debugPrintResource("After terminating entry:", entryEPR);
}
return response.getNewTerminationTime();
}
示例2: debugPrintResource
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
/**
* @param entryEPR
*/
private void debugPrintResource(String header, EndpointReferenceType entryEPR) {
if (LOG.isDebugEnabled()) {
try {
LOG.debug(header + " " + printEPR(entryEPR));
MessageElement[] rps = ResourcePropertyHelper.queryResourceProperties(entryEPR, "/");
StringBuffer sb = new StringBuffer("Resource Properties of entry: ");
if (rps != null) {
for (MessageElement elm : rps) {
sb.append("\n" + AnyHelper.toString(elm));
}
} else {
sb.append("none");
}
LOG.debug(sb.toString());
} catch (Exception e) {
LOG.debug("Problem querying RPs for debug purposes:", e);
}
}
}
示例3: writeEprToFile
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public static void writeEprToFile(EndpointReferenceType epr,
String workflowName) throws Exception {
FileWriter writer = null;
String curDir = System.getProperty("user.dir");
System.out.println(curDir + "/" + workflowName + ".epr");
try {
writer = new FileWriter(curDir + "/" + workflowName + ".epr");
QName qName = new QName("", "TWS_EPR");
writer.write(ObjectSerializer.toString(epr, qName));
} finally {
if (writer != null) {
writer.close();
}
}
}
示例4: getOutputDataHelper
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public static File getOutputDataHelper(EndpointReferenceType epr, GlobusCredential credential, String saveDir) throws MalformedURIException, RemoteException, IOException, Exception {
TavernaWorkflowServiceImplClient serviceClient = new TavernaWorkflowServiceImplClient(epr);
TransferServiceContextReference ref = serviceClient.getOutputData();
TransferServiceContextClient tclient = new TransferServiceContextClient(ref.getEndpointReference());
//File name of the output file set by the Service using DataDescriptor
String fileName = tclient.getDataTransferDescriptor().getDataDescriptor().getName();
File outputFile = new File(saveDir + File.separator + fileName);
//Get the data from the caTransfer service context using the Helper class.
InputStream stream = TransferClientHelper.getData(tclient.getDataTransferDescriptor(), credential);
FileOutputStream fileoutputstream = new FileOutputStream(outputFile);
int n;
byte buf[]=new byte[1024];
while ((n = stream.read(buf, 0, 1024)) > -1)
fileoutputstream.write(buf, 0, n);
fileoutputstream.close();
return outputFile;
}
示例5: testDiscoverServicesByOperationConceptCode
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public void testDiscoverServicesByOperationConceptCode() {
final int operation = BY_OP_CODE;
EndpointReferenceType[] services = null;
services = invokeDiscoveryMethod(NO_SERVICES_RESOURCE, operation, null);
assertEquals(0, services.length);
services = invokeDiscoveryMethod(NO_SERVICES_RESOURCE, operation, "");
assertEquals(0, services.length);
services = invokeDiscoveryMethod(NO_SERVICES_RESOURCE, operation, "foo");
assertEquals(0, services.length);
services = invokeDiscoveryMethod(REGISTERED_SERVICES, operation, "C28421");
assertResultsEqual(new EndpointReferenceType[]{this.service4EPR}, services);
}
示例6: getDelegatedCredentialRefernce
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的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);
}
}
示例7: printResults
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
private static void printResults(EndpointReferenceType[] types) {
if (types != null) {
for (int i = 0; i < types.length; i++) {
System.out.println("\t" + i + ") " + types[i].toString().trim());
}
} else {
System.out.println("no results.");
}
System.out.println("--------------------------------------------------\n\n");
}
示例8: serviceHasCql1TransferOperation
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public static boolean serviceHasCql1TransferOperation(EndpointReferenceType epr) throws WSDLException {
Operation transferOp = getOperation(epr,
TransferMethodConstants.TRANSFER_QUERY_METHOD_INPUT_MESSAGE,
TransferMethodConstants.TRANSFER_QUERY_METHOD_OUTPUT_MESSAGE,
TransferMethodConstants.TRANSFER_QUERY_METHOD_NAME);
return transferOp != null;
}
示例9: initialize
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public void initialize(AggregatorServiceGroupResource aggrResource,
EndpointReferenceType memberEPR,
EndpointReferenceType serviceGroupEPR,
AggregatorContent content)
throws Exception
{
if (!(aggrResource instanceof BigIndexResource)) {
throw new Exception("Incompatible parent resource type, got " +
aggrResource.getClass().getName() +
" but expected " +
BigIndexResource.class.getName());
}
this.indexResource = (BigIndexResource)aggrResource;
this.db = indexResource.getDatabase();
super.initialize(aggrResource, memberEPR, serviceGroupEPR, content);
BigIndexContent indexContent = new BigIndexContent();
indexContent.setContentID(this.docID);
this.contentRP.add(indexContent);
MessageContext msgCtx = MessageContext.getCurrentContext();
db.setDefaultElementIndexPattern(
(String)ContextUtils.getServiceProperty(msgCtx,
"BigIndexServiceEntry", "defaultElementIndexPattern"));
db.setDefaultAttributeIndexPattern(
(String)ContextUtils.getServiceProperty(msgCtx,
"BigIndexServiceEntry", "defaultAttributeIndexPattern"));
}
示例10: getAndCacheCql2Support
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
private static Boolean getAndCacheCql2Support(String targetServiceUrl) throws Exception {
Boolean flag = Boolean.valueOf(
DataServiceFeatureDiscoveryUtil.serviceSupportsCql2(
new EndpointReferenceType(new Address(targetServiceUrl))));
cql2Support.cacheItem(targetServiceUrl, flag);
return flag;
}
示例11: deliver
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public void deliver(List topicPath, EndpointReferenceType producer, Object message) {
org.oasis.wsrf.properties.ResourcePropertyValueChangeNotificationType changeMessage = ((org.globus.wsrf.core.notification.ResourcePropertyValueChangeNotificationElementType) message)
.getResourcePropertyValueChangeNotification();
if (changeMessage != null) {
System.out.println("Got notification");
}
}
示例12: GTSImpl
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的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");
}
}
示例13: getUmlClassesFromService
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
protected UMLClass[] getUmlClassesFromService() throws MalformedURIException, InvalidResourcePropertyException, RemoteResourcePropertyRetrievalException, ResourcePropertyRetrievalException {
if (umlClassList == null) {
EndpointReferenceType epr = new EndpointReferenceType();
AttributedURI uri = new AttributedURI(getServiceUrl());
epr.setAddress(uri);
DomainModel domainModel = MetadataUtils.getDomainModel(epr);
DomainModelExposedUMLClassCollection classCollection = domainModel.getExposedUMLClassCollection();
umlClassList = classCollection.getUMLClass();
}
return umlClassList;
}
示例14: testGetAllDataServices
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public void testGetAllDataServices() {
final int operation = ALL_DS;
EndpointReferenceType[] services = null;
services = invokeDiscoveryMethod(NO_SERVICES_RESOURCE, operation, null);
assertEquals(0, services.length);
services = invokeDiscoveryMethod(REGISTERED_SERVICES, operation, null);
assertResultsEqual(new EndpointReferenceType[]{this.service4EPR}, services);
}
示例15: changePublicIdentifierCreation
import org.apache.axis.message.addressing.EndpointReferenceType; //导入依赖的package包/类
public static void changePublicIdentifierCreation(IdentifiersTestInfo testInfo,
String publicCreation) throws MalformedURIException, RemoteException {
EndpointReferenceType epr = testInfo.getGridSvcEPR();
IdentifiersNAServiceClient client = new IdentifiersNAServiceClient( epr );
IdentifiersTestUtil.replaceKeyValues(client, testInfo.getSysAdminUser(),
testInfo.getSystemIdentifier(), Keys.PUBLIC_CREATION, new String[]{publicCreation});
}