• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DeserializationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:18,代码来源:CaGridLogoutController.java


示例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;

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


示例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();
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:27,代码来源:LookUpEntities.java


示例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.");
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:26,代码来源:LookUpEntities.java


示例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;
}
 
开发者ID:NCIP,项目名称:labviewer,代码行数:26,代码来源:LabViewerStudyTest.java


示例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;
}
 
开发者ID:NCIP,项目名称:labviewer,代码行数:28,代码来源:LabViewerRegistrationTest.java


示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:13,代码来源:RProteomicsImpl.java


示例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);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:21,代码来源:Utils.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RemoteLookupFailureException类代码示例发布时间:2022-05-22
下一篇:
Java LongEditor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap