本文整理汇总了Java中org.globus.wsrf.utils.AnyHelper类的典型用法代码示例。如果您正苦于以下问题:Java AnyHelper类的具体用法?Java AnyHelper怎么用?Java AnyHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnyHelper类属于org.globus.wsrf.utils包,在下文中一共展示了AnyHelper类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
public void run() throws Exception {
FileWriter writer = null;
this.factoryClient = new WorkflowFactoryServiceClient(url);
WMSInputType input = createInput(null, "AnnualDemo.bpel");
WMSOutputType output = this.factoryClient.createWorkflow(input);
this.epr = output.getWorkflowEPR();
writer = new FileWriter("workflow_" + input.getWorkflowName() + "_epr");
writer.write(
ObjectSerializer.toString(epr, new QName("", "WMS_EPR")));
this.serviceClient = new WorkflowServiceImplClient(this.epr);
StartInputType startInput = new StartInputType();
WorkflowInputType inputArgs = new WorkflowInputType();
FileInputStream in = new FileInputStream("input11.xml");
Element e2 = XmlUtils.newDocument(in).getDocumentElement();
System.out.println(XmlUtils.toString(e2));
MessageElement anyContent = AnyHelper.toAny(new MessageElement(e2));
inputArgs.set_any(new MessageElement[] {anyContent});
startInput.setInputArgs(inputArgs);
WorkflowStatusType status = this.serviceClient.start(startInput);
//status = this.serviceClient.getStatus();
System.out.println(status.getValue());
}
示例2: run1
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
public void run1() throws Exception {
FileWriter writer = null;
this.factoryClient = new WorkflowFactoryServiceClient(url);
WMSInputType input = createInput1(null, "geWorkBench.bpel");
WMSOutputType output = this.factoryClient.createWorkflow(input);
this.epr = output.getWorkflowEPR();
writer = new FileWriter("workflow_" + input.getWorkflowName() + "_epr");
writer.write(
ObjectSerializer.toString(epr, new QName("", "WMS_EPR")));
this.serviceClient = new WorkflowServiceImplClient(this.epr);
StartInputType startInput = new StartInputType();
WorkflowInputType inputArgs = new WorkflowInputType();
FileInputStream in = new FileInputStream("input10.xml");
Element e2 = XmlUtils.newDocument(in).getDocumentElement();
System.out.println(XmlUtils.toString(e2));
MessageElement anyContent = AnyHelper.toAny(new MessageElement(e2));
inputArgs.set_any(new MessageElement[] {anyContent});
startInput.setInputArgs(inputArgs);
WorkflowStatusType status = this.serviceClient.start(startInput);
//status = this.serviceClient.getStatus();
System.out.println(status.getValue());
}
示例3: run2
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
public void run2() throws Exception {
FileWriter writer = null;
this.factoryClient = new WorkflowFactoryServiceClient(url);
WMSInputType input = createInput2(null, "genepattern.bpel");
WMSOutputType output = this.factoryClient.createWorkflow(input);
this.epr = output.getWorkflowEPR();
writer = new FileWriter("workflow_" + input.getWorkflowName() + "_epr");
writer.write(
ObjectSerializer.toString(epr, new QName("", "WMS_EPR")));
this.serviceClient = new WorkflowServiceImplClient(this.epr);
StartInputType startInput = new StartInputType();
WorkflowInputType inputArgs = new WorkflowInputType();
FileInputStream in = new FileInputStream("input3.xml");
Element e2 = XmlUtils.newDocument(in).getDocumentElement();
System.out.println(XmlUtils.toString(e2));
MessageElement anyContent = AnyHelper.toAny(new MessageElement(e2));
inputArgs.set_any(new MessageElement[] {anyContent});
startInput.setInputArgs(inputArgs);
WorkflowStatusType status = this.serviceClient.start(startInput);
//status = this.serviceClient.getStatus();
System.out.println(status.getValue());
}
示例4: run3
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
public void run3() throws Exception {
FileWriter writer = null;
this.factoryClient = new WorkflowFactoryServiceClient(url);
WMSInputType input = createInput3(null, "PreProp.bpel");
WMSOutputType output = this.factoryClient.createWorkflow(input);
this.epr = output.getWorkflowEPR();
writer = new FileWriter("workflow_" + input.getWorkflowName() + "_epr");
writer.write(
ObjectSerializer.toString(epr, new QName("", "WMS_EPR")));
this.serviceClient = new WorkflowServiceImplClient(this.epr);
StartInputType startInput = new StartInputType();
WorkflowInputType inputArgs = new WorkflowInputType();
FileInputStream in = new FileInputStream("input6.xml");
Element e2 = XmlUtils.newDocument(in).getDocumentElement();
System.out.println(XmlUtils.toString(e2));
MessageElement anyContent = AnyHelper.toAny(new MessageElement(e2));
inputArgs.set_any(new MessageElement[] {anyContent});
startInput.setInputArgs(inputArgs);
WorkflowStatusType status = this.serviceClient.start(startInput);
//status = this.serviceClient.getStatus();
System.out.println(status.getValue());
}
示例5: createSubscriptionListener
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
private SubscriptionListener createSubscriptionListener(
final FederatedQueryResultsRetrievalClient resultsClient, final InfoHolder info) {
SubscriptionListener listener = new SubscriptionListener() {
public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
try {
String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
FederatedQueryExecutionStatus status = Utils.deserializeObject(
new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
StringWriter writer = new StringWriter();
Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
LOG.debug("GOT NOTIFICATION:");
LOG.debug(writer.getBuffer().toString());
if ((info.success == null || !info.success.booleanValue()) && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
enumerateAndVerify(resultsClient);
LOG.debug("SETTING SUCCESS STATUS TO TRUE");
info.success = Boolean.TRUE;
}
} catch (Exception ex) {
ex.printStackTrace();
info.success = Boolean.FALSE;
info.exception = ex;
}
}
};
return listener;
}
示例6: createSubscriptionListener
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
private SubscriptionListener createSubscriptionListener(
final FederatedQueryResultsClient resultsClient, final InfoHolder info) {
SubscriptionListener listener = new SubscriptionListener() {
public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
try {
String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
FederatedQueryExecutionStatus status = (FederatedQueryExecutionStatus) Utils.deserializeObject(
new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
StringWriter writer = new StringWriter();
Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
LOG.debug("GOT NOTIFICATION:");
LOG.debug(writer.getBuffer().toString());
if ((info.success == null || !info.success.booleanValue()) && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
enumerateAndVerify(resultsClient);
LOG.debug("SETTING SUCCESS STATUS TO TRUE");
info.success = Boolean.TRUE;
}
} catch (Exception ex) {
ex.printStackTrace();
info.success = Boolean.FALSE;
info.exception = ex;
}
}
};
return listener;
}
示例7: debugPrintResource
import org.globus.wsrf.utils.AnyHelper; //导入依赖的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);
}
}
}
示例8: createStackFault
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
private static BaseFaultType createStackFault(String message,
String stackTrace) {
BaseFaultType stackFault = new BaseFaultType();
BaseFaultTypeErrorCode errorCode = new BaseFaultTypeErrorCode();
errorCode.setDialect(STACK_TRACE);
errorCode.set_any(AnyHelper.toText(stackTrace));
stackFault.setErrorCode(errorCode);
if (message != null && message.length() > 0) {
BaseFaultTypeDescription [] desc = new BaseFaultTypeDescription[1];
desc[0] = new BaseFaultTypeDescription(message);
stackFault.setDescription(desc);
}
stackFault.setTimestamp(Calendar.getInstance());
return stackFault;
}
示例9: createSubscriptionListener
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
private SubscriptionListener createSubscriptionListener(
final FederatedQueryResultsClient resultsClient, final InfoHolder info) {
SubscriptionListener listener = new SubscriptionListener() {
private boolean completeDetected = false;
public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
try {
String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
FederatedQueryExecutionStatus status = Utils.deserializeObject(
new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
StringWriter writer = new StringWriter();
Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
if (LOG.isDebugEnabled()) {
LOG.debug("GOT NOTIFICATION:");
LOG.debug(writer.getBuffer().toString());
}
if (!completeDetected && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
completeDetected = true;
LOG.debug("EXECUTING TRANSFER AND VERIFY PROCESS");
transferAndVerify(resultsClient);
LOG.debug("SETTING SUCCESS STATUS TO TRUE");
info.success = Boolean.TRUE;
}
} catch (Exception ex) {
ex.printStackTrace();
info.success = Boolean.FALSE;
info.exception = ex;
}
}
};
return listener;
}
示例10: createSubscriptionListener
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
private SubscriptionListener createSubscriptionListener(
final FederatedQueryResultsRetrievalClient resultsClient, final InfoHolder info) {
SubscriptionListener listener = new SubscriptionListener() {
private boolean completeDetected = false;
public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
try {
String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
FederatedQueryExecutionStatus status = Utils.deserializeObject(
new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
StringWriter writer = new StringWriter();
Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
if (LOG.isDebugEnabled()) {
LOG.debug("GOT NOTIFICATION:");
LOG.debug(writer.getBuffer().toString());
}
if (!completeDetected && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
completeDetected = true;
LOG.debug("EXECUTING TRANSFER AND VERIFY PROCESS");
transferAndVerify(resultsClient);
LOG.debug("SETTING SUCCESS STATUS TO TRUE");
info.success = Boolean.TRUE;
}
} catch (Exception ex) {
ex.printStackTrace();
info.success = Boolean.FALSE;
info.exception = ex;
}
}
};
return listener;
}
示例11: getStackTrace
import org.globus.wsrf.utils.AnyHelper; //导入依赖的package包/类
/**
* Gets stack trace of the fault. Note, this stack trace only contains
* information sent from server. It does not contain client stack
* trace information.
*
* @return stack trace of the fault. It includes any chained faults.
*/
public String getStackTrace() {
StringBuffer buf = new StringBuffer();
buf.append(this.fault.getClass().getName());
String desc = getDescriptionAsString();
if (desc != null) {
buf.append(": ").append(desc);
}
if (this.fault.getTimestamp() != null) {
buf.append(LS).append(i18n.getMessage("timestamp"));
buf.append(this.fault.getTimestamp().getTime().toString());
}
if (this.fault.getOriginator() != null) {
buf.append(LS).append(i18n.getMessage("originator"));
buf.append(this.fault.getOriginator().toString());
}
BaseFaultType [] cause = this.fault.getFaultCause();
BaseFaultTypeErrorCode errorCode = null;
if (cause != null) {
FaultHelper helper = null;
for (int i=0;i<cause.length;i++) {
helper = new FaultHelper(cause[i], false);
errorCode = cause[i].getErrorCode();
if (errorCode != null &&
STACK_TRACE.equals(errorCode.getDialect())) {
buf.append(LS);
try {
buf.append(AnyHelper.toSingleString(
errorCode.get_any()));
} catch (Exception e) {
// ?
}
continue;
}
buf.append(LS).append(i18n.getMessage("causedBy01"));
buf.append(helper.getStackTrace());
}
}
return buf.toString();
}