當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。