Created
March 26, 2015 10:08
-
-
Save ivanursul/e4d4be66937474e8b54d to your computer and use it in GitHub Desktop.
DefaultLoginService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.is.lnu.edbo.service.login; | |
| import java.net.URL; | |
| import javax.annotation.PostConstruct; | |
| import javax.annotation.PreDestroy; | |
| import javax.xml.namespace.QName; | |
| import org.is.lnu.edbo.model.Authentification; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import ua.edboservice.EDBOGuides; | |
| import ua.edboservice.EDBOGuidesSoap; | |
| /** | |
| * Login service for edbo. | |
| * @author ivanursul | |
| * | |
| */ | |
| public class DefaultLoginService { | |
| private static final Logger LOG = LoggerFactory.getLogger(DefaultLoginService.class); | |
| public static void main(final String[] args) { | |
| // Given | |
| URL wsdlURL = EDBOGuides.WSDL_LOCATION; | |
| QName serviceName = new QName("http://edboservice.ua/", "EDBOGuides"); | |
| EDBOGuides ss = new EDBOGuides(wsdlURL, serviceName); | |
| EDBOGuidesSoap port = ss.getEDBOGuidesSoap(); | |
| String user = "***"; | |
| String password = "***"; | |
| int clearPreviewSession = 1; | |
| String applicationKey = "*****"; | |
| // When | |
| String sessionGUID = port.login(user, password, clearPreviewSession, applicationKey); | |
| System.out.println(sessionGUID); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment