From 5451e396852387daefaa0a1273798c1fadfde423 Mon Sep 17 00:00:00 2001 From: "Vyacheslav N. Boyko" Date: Thu, 24 Jan 2019 07:00:21 +0300 Subject: [PATCH] SSL optional --- pom.xml | 2 +- .../ru/bvn13/licenseserverjclient/LicenseChecker.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 4a9ad5b..024822e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ru.bvn13 licenseserverjclient - 1.8.1 + 1.8.3 licenseserverjclient diff --git a/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java b/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java index 0094a09..e9fc915 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java @@ -19,17 +19,17 @@ public class LicenseChecker { @Getter private String clientId; - @WebServiceRef(wsdlLocation = "http://licenseserverj.cf/ws/checkLicense?WSDL") - private CheckLicenseWSService service; + //@WebServiceRef(wsdlLocation = "https://licenseserverj.cf/ws/checkLicense?WSDL") + //private CheckLicenseWSService service; public LicenseChecker(String clientId) { this.clientId = clientId; } - public CheckClientLicenseResponse.Response checkLicense(String properties) throws Exception { + public CheckClientLicenseResponse.Response checkLicense(String properties, boolean useHttps) throws Exception { // try { - URL url = new URL("http://licenseserverj.cf/ws/checkLicense?WSDL"); + URL url = new URL(String.format("http%s://licenseserverj.cf/ws/checkLicense?WSDL", (useHttps ? "s" : ""))); QName qname = new QName("http://checkLicenseJ.bvn13.ru", "CheckLicenseWSService");