當前位置: 首頁>>代碼示例>>Java>>正文


Java WSPortConnector.getPort方法代碼示例

本文整理匯總了Java中org.oscm.ws.WSPortConnector.getPort方法的典型用法代碼示例。如果您正苦於以下問題:Java WSPortConnector.getPort方法的具體用法?Java WSPortConnector.getPort怎麽用?Java WSPortConnector.getPort使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.oscm.ws.WSPortConnector的用法示例。


在下文中一共展示了WSPortConnector.getPort方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOperationServiceAdapter

import org.oscm.ws.WSPortConnector; //導入方法依賴的package包/類
public static OperationServiceAdapter getOperationServiceAdapter(
        TechnicalProductOperation operation, Integer wsTimeout,
        String username, String password) throws IOException,
        WSDLException, ParserConfigurationException {

    String target = operation.getActionUrl();
    if (Strings.isEmpty(target)) {
        throw new SaaSSystemException(
                String.format(
                        "Failed to retrieve service endpoint for service operation '%s', as the target is not defined.",
                        Long.valueOf(operation.getKey())));
    }
    WSPortConnector portConnector = new WSPortConnector(target, username,
            password);

    SupportedOperationVersions supportedVersion = getSupportedVersion(portConnector);
    OperationServiceAdapter adapter = getAdapterForVersion(supportedVersion);
    final Object port = portConnector.getPort(
            supportedVersion.getLocalWSDL(),
            supportedVersion.getServiceClass(), wsTimeout);
    adapter.setOperationService(port);
    return adapter;
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:24,代碼來源:OperationServiceAdapterFactory.java

示例2: getPort

import org.oscm.ws.WSPortConnector; //導入方法依賴的package包/類
@Override
public PaymentServiceProviderAdapter getPort(String wsdl)
        throws IOException, WSDLException, ParserConfigurationException {

    WSPortConnector portConnector = new WSPortConnector(wsdl, null, null);

    SupportedVersions supportedNS = getSupportedVersion(portConnector);
    PaymentServiceProviderAdapter adapter = getAdapterForNamespace(supportedNS);

    final Object port = portConnector.getPort(supportedNS.getLocalWSDL(),
            supportedNS.getServiceClass(), timeout);
    adapter.setPaymentServiceProviderService(port);

    return adapter;
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:16,代碼來源:PortLocatorBean.java

示例3: getNotificationServiceAdapter

import org.oscm.ws.WSPortConnector; //導入方法依賴的package包/類
public static INotificationServiceAdapter getNotificationServiceAdapter(
        TriggerDefinition td, Integer wsTimeout,
        ConfigurationServiceLocal cs, DataService ds) throws IOException,
        WSDLException, ParserConfigurationException {

    String target = td.getTarget();
    if (target == null) {
        throw new SaaSSystemException(
                String.format(
                        "Failed to retrieve service endpoint for trigger definition '%s', as the target is not defined.",
                        Long.valueOf(td.getKey())));
    }

    INotificationServiceAdapter adapter = null;

    switch (td.getTargetType()) {
    case WEB_SERVICE:
        WSPortConnector portConnector = new WSPortConnector(target, null,
                null);

        SupportedVersions supportedVersion = getSupportedVersion(portConnector);
        adapter = getAdapterForVersion(supportedVersion, ds);

        final Object port = portConnector.getPort(
                supportedVersion.getLocalWSDL(),
                supportedVersion.getServiceClass(), wsTimeout);
        initAdapter(cs, ds, adapter, port);
        break;
    case REST_SERVICE:

        Client c = ClientBuilder.newClient();
        WebTarget r = c.target(td.getTarget());

        adapter = new RestNotificationServiceAdapter();
        initAdapter(cs, ds, adapter, r);

        break;

    default:
        throw new SaaSSystemException(
                String.format(
                        "Failed to retrieve service endpoint for trigger definition '%s', as the target type is not defined.",
                        Long.valueOf(td.getKey())));
    }

    return adapter;
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:48,代碼來源:NotificationServiceAdapterFactory.java


注:本文中的org.oscm.ws.WSPortConnector.getPort方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。