Examples of AuthenticateServiceLocator


Examples of org.jitterbit.integration.server.implementation.webservice.interchange.authenticate.client.AuthenticateServiceLocator

        ServerAddress address = credentials.getServerAddress();
        String userName = credentials.getUser();
        String password = credentials.getPasswordHash();
        String version = Versions.CURRENT.toString();
        // Configure the web service.
        AuthenticateServiceLocator locator = new AuthenticateServiceLocator();
        // We cannot call getConfiguration().configureWebservice() here,
        // because that would lead to infinite recursion since in order to configure
        // a web service, you need to login. So we simply build the url ourselves:
        StringBuilder url = credentials.isUsingHttps() ? new StringBuilder("https://") : new StringBuilder("http://");
        url.append(address.toString()).append(getConfiguration().getWsPath()).append(SERVICE_NAME);
    locator.setkonga_authenticateEndpointAddress(url.toString());

    try {
            WsKeyValuePairs keyValues = createKeyValuePairsToSendToServer();
            AuthenticateResult ws_res = locator.getkonga_authenticate().loginWithVersionAndKeyValues(
                            userName, password, version, keyValues);
            AuthenticateResultImpl result = new AuthenticateResultImpl(ws_res);
            keyValuesHandler.handle(new ServerInfo(result.serverGuid(), credentials.getServer()), result.keyValues());
            return result;
    } catch (RemoteException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.