当前位置: 首页>>代码示例>>Java>>正文


Java CTMGApiVersion类代码示例

本文整理汇总了Java中org.oscm.app.contants.CTMGApiVersion的典型用法代码示例。如果您正苦于以下问题:Java CTMGApiVersion类的具体用法?Java CTMGApiVersion怎么用?Java CTMGApiVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CTMGApiVersion类属于org.oscm.app.contants包,在下文中一共展示了CTMGApiVersion类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validateVersion

import org.oscm.app.contants.CTMGApiVersion; //导入依赖的package包/类
void validateVersion(String wsdlUrl) {
    WSDLLocator locator = new BasicAuthWSDLLocator(wsdlUrl, null, null);
    WSDLFactory wsdlFactory;
    Definition serviceDefinition;
    try {
        wsdlFactory = WSDLFactory.newInstance();
        WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
        // avoid importing external documents
        wsdlReader.setExtensionRegistry(new WSVersionExtensionRegistry());
        serviceDefinition = wsdlReader.readWSDL(locator);
        Element versionElement = serviceDefinition
                .getDocumentationElement();
        if (!CTMGApiVersion.version.equals(versionElement.getTextContent())) {
            LOGGER.warn("Web service mismatches and the version value, expected: "
                    + CTMGApiVersion.version
                    + " and the one got from wsdl: "
                    + versionElement.getTextContent());
        }
    } catch (WSDLException e) {
        LOGGER.warn("Remote wsdl cannot be retrieved from CT_MG. [Cause: "
                + e.getMessage() + "]", e);
    }

}
 
开发者ID:servicecatalog,项目名称:development,代码行数:25,代码来源:BesDAO.java

示例2: addVersionInformation

import org.oscm.app.contants.CTMGApiVersion; //导入依赖的package包/类
/**
 * Helper method to add a version information into the header of the
 * outbound SOAP message. The version information is read from a property
 * file.
 * 
 * @param service
 * @return
 */
private Service addVersionInformation(Service service) {
    ClientVersionHandler versionHandler = new ClientVersionHandler(
            CTMGApiVersion.version);
    return versionHandler.addVersionInformationToClient(service);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:14,代码来源:BesDAO.java


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