This file contains 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
public boolean login(String userId, String password) { | |
try { | |
val content = soapMessageLoader.load("soap/login_message.xml", usernameOfCredential, passwordOfCredential, userId, password); | |
log.info("Login content: {}", content); | |
val soapConnectionFactory = SOAPConnectionFactory.newInstance(); | |
val endpoint = new URL(loginUrl); | |
val connection = soapConnectionFactory.createConnection(); | |
val factory = MessageFactory.newInstance(); | |
val message = factory.createMessage(new MimeHeaders(), new ByteArrayInputStream(content.getBytes())); | |
val response = connection.call(message, endpoint); |
OlderNewer