本文整理汇总了Java中org.globus.wsrf.encoding.DeserializationException类的典型用法代码示例。如果您正苦于以下问题:Java DeserializationException类的具体用法?Java DeserializationException怎么用?Java DeserializationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeserializationException类属于org.globus.wsrf.encoding包,在下文中一共展示了DeserializationException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extractDelegationCredentialReference
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
private DelegatedCredentialReference extractDelegationCredentialReference(
String delegationEPR) throws SAXException, ServletException {
DelegatedCredentialReference delegatedCredentialReference = null;
try {
delegatedCredentialReference = Utils
.deserializeObject(new StringReader(delegationEPR),
DelegatedCredentialReference.class,
DelegationUserClient.class
.getResourceAsStream("client-config.wsdd"));
} catch (DeserializationException e) {
log.error(e);
throw new ServletException(
"Unable to deserialize the Delegation Reference: "
+ e.getMessage(), e);
}
return delegatedCredentialReference;
}
示例2: discoverByFilter
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
/**
* Applies the specified predicate to the common path in the Index Service's
* Resource Properties to return registered services' EPRs that match the
* predicate.
*
* @param xpathPredicate
* predicate to apply to the "Entry" in Index Service
* @return EndpointReferenceType[] of matching services @
* @throws ResourcePropertyRetrievalException
* @throws QueryInvalidException
* @throws RemoteResourcePropertyRetrievalException
*/
protected EndpointReferenceType[] discoverByFilter(String xpathPredicate)
throws RemoteResourcePropertyRetrievalException, QueryInvalidException, ResourcePropertyRetrievalException {
EndpointReferenceType[] results = null;
// query the service and deser the results
MessageElement[] elements = ResourcePropertyHelper.queryResourceProperties(this.indexEPR,
translateXPath(xpathPredicate));
Object[] objects = null;
try {
objects = ObjectDeserializer.toObject(elements, EndpointReferenceType.class);
} catch (DeserializationException e) {
throw new ResourcePropertyRetrievalException("Unable to deserialize results to EPRs!", e);
}
// if we got results, cast them into what we are expected to return
if (objects != null) {
results = new EndpointReferenceType[objects.length];
System.arraycopy(objects, 0, results, 0, objects.length);
}
return results;
}
示例3: lookup
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
private void lookup() throws RemoteException, DeserializationException, InvalidInputException {
lookupArrayDataTypes();
lookupArrayDesigns();
lookupArrayProviders();
lookupAssayTypes();
lookupBiomaterials();
lookupCategories();
lookupFiles();
lookupExperiments();
lookupExperimentalContacts();
lookupFactors();
lookupFileTypes();
lookupHybridizations();
lookupOrganisms();
lookupPersons();
lookupQuantitationTypes();
lookupTerms();
lookupTermSources();
lookupPrincipalInvestigators();
lookupCharacteristicCategories();
lookupTermsInCategory();
enumerateExperiments();
lookupPersonsByMatchMode();
lookupExperimentsPageByPage();
}
示例4: enumerateExperiments
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
private void enumerateExperiments() throws RemoteException, DeserializationException {
ExperimentSearchCriteria experimentSearchCriteria = new ExperimentSearchCriteria();
startTime = System.currentTimeMillis();
EnumerationResponseContainer expEnum = client.enumerateExperiments(experimentSearchCriteria);
ClientEnumIterator iter = EnumerationResponseHelper.createClientIterator(expEnum, CaArraySvc_v1_0Client.class
.getResourceAsStream("client-config.wsdd"));
IterationConstraints ic = new IterationConstraints(5, -1, null);
iter.setIterationConstraints(ic);
int numExperimentsFound = 0;
while (iter.hasNext()) {
try {
SOAPElement elem = (SOAPElement) iter.next();
if (elem != null) {
Experiment experiment = (Experiment) ObjectDeserializer.toObject(elem, Experiment.class);
System.out.print(experiment.getTitle() + " ");
numExperimentsFound ++;
}
} catch (NoSuchElementException e) {
break;
}
}
totalTime = System.currentTimeMillis() - startTime;
System.out.println("End of experiment enumeration.");
System.out.println("Found " + numExperimentsFound + " experiments in " + totalTime + " ms.");
}
示例5: getStudy
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
/**
* getStudy reads the XML file and creates a study object from it for
* testing
* <P>
*
* @return
* @throws DeserializationException
* @throws SAXException
*/
private Study getStudy() throws DeserializationException, SAXException, IOException {
//InputStream sampleIs = getClass().getResourceAsStream(sampleFile);
InputStream sampleIs = new FileInputStream(sampleFile);
InputStreamReader reader = new InputStreamReader(sampleIs);
InputStream wsddIs =
getClass()
.getResourceAsStream(
"/gov/nih/nci/ccts/grid/studyconsumer/client/client-config.wsdd");
Study study =
(gov.nih.nci.cabig.ccts.domain.Study) Utils.deserializeObject(
reader, gov.nih.nci.cabig.ccts.domain.Study.class,
wsddIs);
return study;
}
示例6: getRegistration
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
/**
* getRegistration reads the XML file and creates a registration object from
* it for testing
* <P>
*
* @return
* @throws DeserializationException
* @throws SAXException
*/
private Registration getRegistration() throws DeserializationException,
SAXException, IOException {
//InputStream sampleIs = getClass().getResourceAsStream(sampleFile);
InputStream sampleIs = new FileInputStream(sampleFile);
InputStreamReader reader = new InputStreamReader(sampleIs);
InputStream wsddIs =
getClass().getResourceAsStream(
"/gov/nih/nci/ccts/grid/client/client-config.wsdd");
Registration reg =
(gov.nih.nci.cabig.ccts.domain.Registration) Utils
.deserializeObject(
reader,
gov.nih.nci.cabig.ccts.domain.Registration.class,
wsddIs);
return reg;
}
示例7: wrapScanFeatures
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
private ScanFeaturesType[] wrapScanFeatures(String[] scanFeaturesXml)
throws ParserConfigurationException, SAXException, IOException, DeserializationException
{
ScanFeaturesType[] ret = new ScanFeaturesType[scanFeaturesXml.length];
for (int i = 0; i < ret.length; i++) {
ByteArrayInputStream is = new ByteArrayInputStream(scanFeaturesXml[i].getBytes());
org.w3c.dom.Document doc = XMLUtils.newDocument(is);
//System.out.println(scanFeaturesXml[i]);
ret[i] = (ScanFeaturesType) ObjectDeserializer.toObject(doc.getDocumentElement(), ScanFeaturesType.class);
}
return ret;
}
示例8: deserializeObject
import org.globus.wsrf.encoding.DeserializationException; //导入依赖的package包/类
/**
* Deserializes XML into an object
*
* @param xmlReader
* The reader for the XML (eg: FileReader, StringReader, etc)
* @param clazz
* The class to serialize to
* @param wsdd
* A stream containing the WSDD configuration
* @return The object deserialized from the XML
* @throws SAXException
* @throws DeserializationException
*/
public static <T> T deserializeObject(Reader xmlReader, Class<T> clazz, InputStream wsdd) throws SAXException,
DeserializationException {
// input source for the xml
InputSource xmlSource = new InputSource(xmlReader);
return ConfigurableObjectDeserializer.toObject(xmlSource, clazz, wsdd);
}