From 96936d66586faccd4cc07c39c1d71170fbc0cdf6 Mon Sep 17 00:00:00 2001 From: "Vyacheslav N. Boyko" Date: Thu, 22 Jun 2017 14:02:38 +0300 Subject: [PATCH] working set --- pom.xml | 2 +- .../licenseserverjclient/LicenseChecker.java | 29 ++- .../soap/CheckClientLicense.java | 156 ++++++++++++ .../soap/CheckClientLicenseResponse.java | 208 ++++++++++++++++ .../soap/CheckLicenseJ.java | 38 --- .../soap/CheckLicenseRequest.java | 4 +- .../soap/CheckLicenseResponse.java | 232 +++++++----------- .../soap/CheckLicenseWS.java | 40 +++ .../soap/CheckLicenseWSService.java | 12 +- .../soap/ObjectFactory.java | 52 ++-- .../soap/package-info.java | 2 +- src/test/java/Test.java | 16 ++ 12 files changed, 559 insertions(+), 232 deletions(-) create mode 100644 src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicense.java create mode 100644 src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicenseResponse.java delete mode 100644 src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseJ.java create mode 100644 src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWS.java create mode 100644 src/test/java/Test.java diff --git a/pom.xml b/pom.xml index cb3a14b..738b7eb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ru.bvn13 licenseserverjclient - 1.1 + 1.2 LicenseServerJClient diff --git a/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java b/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java index e5051e2..7a7f621 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/LicenseChecker.java @@ -1,13 +1,12 @@ package ru.bvn13.licenseserverjclient; import lombok.Getter; -import ru.bvn13.licenseserverjclient.soap.CheckLicense; -import ru.bvn13.licenseserverjclient.soap.CheckLicenseJ; -import ru.bvn13.licenseserverjclient.soap.CheckLicenseResponse; -import ru.bvn13.licenseserverjclient.soap.CheckLicenseWSService; +import ru.bvn13.licenseserverjclient.soap.*; +import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import javax.xml.ws.Service; +import javax.xml.ws.WebServiceRef; import java.net.MalformedURLException; import java.net.URL; @@ -19,6 +18,9 @@ public class LicenseChecker { @Getter private String clientId; + @WebServiceRef(wsdlLocation = "http://licenseserverj.cf/ws/checkLicense?WSDL") + private CheckLicenseWSService service; + public LicenseChecker(String clientId) { this.clientId = clientId; } @@ -27,24 +29,25 @@ public class LicenseChecker { URL url = null; try { - new URL("http://licenseserverj.cf/ws/checkLicense?WSDL"); + url = new URL("http://licenseserverj.cf/ws/checkLicense?WSDL"); } catch (MalformedURLException e) { e.printStackTrace(); return false; } - QName qname = new QName("http://checkLicenseJ.bvn13.ru", "checkLicense"); - CheckLicenseWSService service = (CheckLicenseWSService) CheckLicenseWSService.create(url, qname); + QName qname = new QName("http://checkLicenseJ.bvn13.ru", "CheckLicenseWSService"); - CheckLicenseJ proxy = service.getSOAPOverHTTP(); + Service service = Service.create(url, qname); - CheckLicense params = new CheckLicense(); - params.getArg0().setClientId(clientId); - params.getArg0().setProperties(properties); + CheckLicenseWS checkLicenseWS = service.getPort(CheckLicenseWS.class); - CheckLicenseResponse result = (CheckLicenseResponse) proxy.checkLicense(params); + CheckClientLicense.Request params = new CheckClientLicense.Request(); + params.setClientId(clientId); + params.setProperties(properties); - return result.getReturn().isIsValid(); + CheckClientLicenseResponse.Response result = checkLicenseWS.checkClientLicense(params); + + return result.isIsValid(); } } diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicense.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicense.java new file mode 100644 index 0000000..6007ff2 --- /dev/null +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicense.java @@ -0,0 +1,156 @@ + +package ru.bvn13.licenseserverjclient.soap; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for checkClientLicense complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="checkClientLicense">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="request" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+ *                   <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "checkClientLicense", propOrder = { + "request" +}) +public class CheckClientLicense { + + @XmlElement(namespace = "") + protected CheckClientLicense.Request request; + + /** + * Gets the value of the request property. + * + * @return + * possible object is + * {@link CheckClientLicense.Request } + * + */ + public CheckClientLicense.Request getRequest() { + return request; + } + + /** + * Sets the value of the request property. + * + * @param value + * allowed object is + * {@link CheckClientLicense.Request } + * + */ + public void setRequest(CheckClientLicense.Request value) { + this.request = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+     *         <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "clientId", + "properties" + }) + public static class Request { + + @XmlElement(required = true) + protected String clientId; + @XmlElement(required = true) + protected String properties; + + /** + * Gets the value of the clientId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClientId() { + return clientId; + } + + /** + * Sets the value of the clientId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClientId(String value) { + this.clientId = value; + } + + /** + * Gets the value of the properties property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperties() { + return properties; + } + + /** + * Sets the value of the properties property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperties(String value) { + this.properties = value; + } + + } + +} diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicenseResponse.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicenseResponse.java new file mode 100644 index 0000000..8e0e0bf --- /dev/null +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckClientLicenseResponse.java @@ -0,0 +1,208 @@ + +package ru.bvn13.licenseserverjclient.soap; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for checkClientLicenseResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="checkClientLicenseResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="response" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+ *                   <element name="date" type="{http://www.w3.org/2001/XMLSchema}date" form="qualified"/>
+ *                   <element name="isValid" type="{http://www.w3.org/2001/XMLSchema}boolean" form="qualified"/>
+ *                   <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "checkClientLicenseResponse", propOrder = { + "response" +}) +public class CheckClientLicenseResponse { + + @XmlElement(namespace = "") + protected CheckClientLicenseResponse.Response response; + + /** + * Gets the value of the response property. + * + * @return + * possible object is + * {@link CheckClientLicenseResponse.Response } + * + */ + public CheckClientLicenseResponse.Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value + * allowed object is + * {@link CheckClientLicenseResponse.Response } + * + */ + public void setResponse(CheckClientLicenseResponse.Response value) { + this.response = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+     *         <element name="date" type="{http://www.w3.org/2001/XMLSchema}date" form="qualified"/>
+     *         <element name="isValid" type="{http://www.w3.org/2001/XMLSchema}boolean" form="qualified"/>
+     *         <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "clientId", + "date", + "isValid", + "properties" + }) + public static class Response { + + @XmlElement(required = true) + protected String clientId; + @XmlElement(required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar date; + protected boolean isValid; + @XmlElement(required = true) + protected String properties; + + /** + * Gets the value of the clientId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClientId() { + return clientId; + } + + /** + * Sets the value of the clientId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClientId(String value) { + this.clientId = value; + } + + /** + * Gets the value of the date property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDate() { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDate(XMLGregorianCalendar value) { + this.date = value; + } + + /** + * Gets the value of the isValid property. + * + */ + public boolean isIsValid() { + return isValid; + } + + /** + * Sets the value of the isValid property. + * + */ + public void setIsValid(boolean value) { + this.isValid = value; + } + + /** + * Gets the value of the properties property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperties() { + return properties; + } + + /** + * Sets the value of the properties property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperties(String value) { + this.properties = value; + } + + } + +} diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseJ.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseJ.java deleted file mode 100644 index c53baff..0000000 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseJ.java +++ /dev/null @@ -1,38 +0,0 @@ - -package ru.bvn13.licenseserverjclient.soap; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; -import javax.xml.bind.annotation.XmlSeeAlso; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.9-b130926.1035 - * Generated source version: 2.2 - * - */ -@WebService(name = "checkLicenseJ", targetNamespace = "http://checkLicenseJ.bvn13.ru") -@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface CheckLicenseJ { - - - /** - * - * @param parameters - * @return - * returns java.lang.Object - */ - @WebMethod - @WebResult(name = "checkLicenseResponse", targetNamespace = "http://checkLicenseJ.bvn13.ru", partName = "parameters") - public Object checkLicense( - @WebParam(name = "checkLicense", targetNamespace = "http://checkLicenseJ.bvn13.ru", partName = "parameters") - CheckLicense parameters); - -} diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseRequest.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseRequest.java index fba85f5..59836ee 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseRequest.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseRequest.java @@ -18,8 +18,8 @@ import javax.xml.bind.annotation.XmlType; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string"/> + * <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/> + * <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/> * </sequence> * </restriction> * </complexContent> diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseResponse.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseResponse.java index e251d9a..007e89e 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseResponse.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseResponse.java @@ -4,35 +4,26 @@ package ru.bvn13.licenseserverjclient.soap; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** - *

Java class for checkLicenseResponse complex type. + *

Java class for anonymous complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

- * <complexType name="checkLicenseResponse">
+ * <complexType>
  *   <complexContent>
  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       <sequence>
- *         <element name="return" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *                   <element name="date" type="{http://www.w3.org/2001/XMLSchema}date"/>
- *                   <element name="isValid" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- *                   <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
+ *         <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
+ *         <element name="date" type="{http://www.w3.org/2001/XMLSchema}date" form="qualified"/>
+ *         <element name="isValid" type="{http://www.w3.org/2001/XMLSchema}boolean" form="qualified"/>
+ *         <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string" form="qualified"/>
  *       </sequence>
  *     </restriction>
  *   </complexContent>
@@ -42,167 +33,110 @@ import javax.xml.datatype.XMLGregorianCalendar;
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "checkLicenseResponse", propOrder = {
-    "_return"
+@XmlType(name = "", propOrder = {
+    "clientId",
+    "date",
+    "isValid",
+    "properties"
 })
+@XmlRootElement(name = "checkLicenseResponse")
 public class CheckLicenseResponse {
 
-    @XmlElement(name = "return")
-    protected CheckLicenseResponse.Return _return;
+    @XmlElement(required = true)
+    protected String clientId;
+    @XmlElement(required = true)
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar date;
+    protected boolean isValid;
+    @XmlElement(required = true)
+    protected String properties;
 
     /**
-     * Gets the value of the return property.
+     * Gets the value of the clientId property.
      * 
      * @return
      *     possible object is
-     *     {@link CheckLicenseResponse.Return }
+     *     {@link String }
      *     
      */
-    public CheckLicenseResponse.Return getReturn() {
-        return _return;
+    public String getClientId() {
+        return clientId;
     }
 
     /**
-     * Sets the value of the return property.
+     * Sets the value of the clientId property.
      * 
      * @param value
      *     allowed object is
-     *     {@link CheckLicenseResponse.Return }
+     *     {@link String }
      *     
      */
-    public void setReturn(CheckLicenseResponse.Return value) {
-        this._return = value;
+    public void setClientId(String value) {
+        this.clientId = value;
     }
 
+    /**
+     * Gets the value of the date property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getDate() {
+        return date;
+    }
 
     /**
-     * 

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <element name="clientId" type="{http://www.w3.org/2001/XMLSchema}string"/>
-     *         <element name="date" type="{http://www.w3.org/2001/XMLSchema}date"/>
-     *         <element name="isValid" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
-     *         <element name="properties" type="{http://www.w3.org/2001/XMLSchema}string"/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
+ * Sets the value of the date property. * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDate(XMLGregorianCalendar value) { + this.date = value; + } + + /** + * Gets the value of the isValid property. * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "clientId", - "date", - "isValid", - "properties" - }) - public static class Return { + public boolean isIsValid() { + return isValid; + } - @XmlElement(required = true) - protected String clientId; - @XmlElement(required = true) - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar date; - protected boolean isValid; - @XmlElement(required = true) - protected String properties; + /** + * Sets the value of the isValid property. + * + */ + public void setIsValid(boolean value) { + this.isValid = value; + } - /** - * Gets the value of the clientId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getClientId() { - return clientId; - } - - /** - * Sets the value of the clientId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setClientId(String value) { - this.clientId = value; - } - - /** - * Gets the value of the date property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDate() { - return date; - } - - /** - * Sets the value of the date property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDate(XMLGregorianCalendar value) { - this.date = value; - } - - /** - * Gets the value of the isValid property. - * - */ - public boolean isIsValid() { - return isValid; - } - - /** - * Sets the value of the isValid property. - * - */ - public void setIsValid(boolean value) { - this.isValid = value; - } - - /** - * Gets the value of the properties property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProperties() { - return properties; - } - - /** - * Sets the value of the properties property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProperties(String value) { - this.properties = value; - } + /** + * Gets the value of the properties property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperties() { + return properties; + } + /** + * Sets the value of the properties property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperties(String value) { + this.properties = value; } } diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWS.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWS.java new file mode 100644 index 0000000..142ef3b --- /dev/null +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWS.java @@ -0,0 +1,40 @@ + +package ru.bvn13.licenseserverjclient.soap; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.9-b130926.1035 + * Generated source version: 2.2 + * + */ +@WebService(name = "CheckLicenseWS", targetNamespace = "http://checkLicenseJ.bvn13.ru") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface CheckLicenseWS { + + + /** + * + * @param request + * @return + * returns ru.bvn13.licenseserverjclient.soap.CheckClientLicenseResponse.Response + */ + @WebMethod + @WebResult(name = "response", targetNamespace = "") + @RequestWrapper(localName = "checkClientLicense", targetNamespace = "http://checkLicenseJ.bvn13.ru", className = "ru.bvn13.licenseserverjclient.soap.CheckClientLicense") + @ResponseWrapper(localName = "checkClientLicenseResponse", targetNamespace = "http://checkLicenseJ.bvn13.ru", className = "ru.bvn13.licenseserverjclient.soap.CheckClientLicenseResponse") + public ru.bvn13.licenseserverjclient.soap.CheckClientLicenseResponse.Response checkClientLicense( + @WebParam(name = "request", targetNamespace = "") + ru.bvn13.licenseserverjclient.soap.CheckClientLicense.Request request); + +} diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWSService.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWSService.java index 7b63659..00979c5 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWSService.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/CheckLicenseWSService.java @@ -65,11 +65,11 @@ public class CheckLicenseWSService /** * * @return - * returns CheckLicenseJ + * returns CheckLicenseWS */ @WebEndpoint(name = "SOAPOverHTTP") - public CheckLicenseJ getSOAPOverHTTP() { - return super.getPort(new QName("http://checkLicenseJ.bvn13.ru", "SOAPOverHTTP"), CheckLicenseJ.class); + public CheckLicenseWS getSOAPOverHTTP() { + return super.getPort(new QName("http://checkLicenseJ.bvn13.ru", "SOAPOverHTTP"), CheckLicenseWS.class); } /** @@ -77,11 +77,11 @@ public class CheckLicenseWSService * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. * @return - * returns CheckLicenseJ + * returns CheckLicenseWS */ @WebEndpoint(name = "SOAPOverHTTP") - public CheckLicenseJ getSOAPOverHTTP(WebServiceFeature... features) { - return super.getPort(new QName("http://checkLicenseJ.bvn13.ru", "SOAPOverHTTP"), CheckLicenseJ.class, features); + public CheckLicenseWS getSOAPOverHTTP(WebServiceFeature... features) { + return super.getPort(new QName("http://checkLicenseJ.bvn13.ru", "SOAPOverHTTP"), CheckLicenseWS.class, features); } private static URL __getWsdlLocation() { diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/ObjectFactory.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/ObjectFactory.java index 854b383..fbd2b6c 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/ObjectFactory.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/ObjectFactory.java @@ -24,8 +24,8 @@ import javax.xml.namespace.QName; @XmlRegistry public class ObjectFactory { - private final static QName _CheckLicense_QNAME = new QName("http://checkLicenseJ.bvn13.ru", "checkLicense"); - private final static QName _CheckLicenseResponse_QNAME = new QName("http://checkLicenseJ.bvn13.ru", "checkLicenseResponse"); + private final static QName _CheckClientLicense_QNAME = new QName("http://checkLicenseJ.bvn13.ru", "checkClientLicense"); + private final static QName _CheckClientLicenseResponse_QNAME = new QName("http://checkLicenseJ.bvn13.ru", "checkClientLicenseResponse"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: ru.bvn13.licenseserverjclient.soap @@ -35,19 +35,19 @@ public class ObjectFactory { } /** - * Create an instance of {@link CheckLicenseResponse } + * Create an instance of {@link CheckClientLicenseResponse } * */ - public CheckLicenseResponse createCheckLicenseResponse() { - return new CheckLicenseResponse(); + public CheckClientLicenseResponse createCheckClientLicenseResponse() { + return new CheckClientLicenseResponse(); } /** - * Create an instance of {@link CheckLicense } + * Create an instance of {@link CheckClientLicense } * */ - public CheckLicense createCheckLicense() { - return new CheckLicense(); + public CheckClientLicense createCheckClientLicense() { + return new CheckClientLicense(); } /** @@ -59,37 +59,45 @@ public class ObjectFactory { } /** - * Create an instance of {@link CheckLicenseResponse.Return } + * Create an instance of {@link CheckLicenseResponse } * */ - public CheckLicenseResponse.Return createCheckLicenseResponseReturn() { - return new CheckLicenseResponse.Return(); + public CheckLicenseResponse createCheckLicenseResponse() { + return new CheckLicenseResponse(); } /** - * Create an instance of {@link CheckLicense.Arg0 } + * Create an instance of {@link CheckClientLicenseResponse.Response } * */ - public CheckLicense.Arg0 createCheckLicenseArg0() { - return new CheckLicense.Arg0(); + public CheckClientLicenseResponse.Response createCheckClientLicenseResponseResponse() { + return new CheckClientLicenseResponse.Response(); } /** - * Create an instance of {@link JAXBElement }{@code <}{@link CheckLicense }{@code >}} + * Create an instance of {@link CheckClientLicense.Request } * */ - @XmlElementDecl(namespace = "http://checkLicenseJ.bvn13.ru", name = "checkLicense") - public JAXBElement createCheckLicense(CheckLicense value) { - return new JAXBElement(_CheckLicense_QNAME, CheckLicense.class, null, value); + public CheckClientLicense.Request createCheckClientLicenseRequest() { + return new CheckClientLicense.Request(); } /** - * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}} + * Create an instance of {@link JAXBElement }{@code <}{@link CheckClientLicense }{@code >}} * */ - @XmlElementDecl(namespace = "http://checkLicenseJ.bvn13.ru", name = "checkLicenseResponse") - public JAXBElement createCheckLicenseResponse(Object value) { - return new JAXBElement(_CheckLicenseResponse_QNAME, Object.class, null, value); + @XmlElementDecl(namespace = "http://checkLicenseJ.bvn13.ru", name = "checkClientLicense") + public JAXBElement createCheckClientLicense(CheckClientLicense value) { + return new JAXBElement(_CheckClientLicense_QNAME, CheckClientLicense.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CheckClientLicenseResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://checkLicenseJ.bvn13.ru", name = "checkClientLicenseResponse") + public JAXBElement createCheckClientLicenseResponse(CheckClientLicenseResponse value) { + return new JAXBElement(_CheckClientLicenseResponse_QNAME, CheckClientLicenseResponse.class, null, value); } } diff --git a/src/main/java/ru/bvn13/licenseserverjclient/soap/package-info.java b/src/main/java/ru/bvn13/licenseserverjclient/soap/package-info.java index 6b35061..4980428 100644 --- a/src/main/java/ru/bvn13/licenseserverjclient/soap/package-info.java +++ b/src/main/java/ru/bvn13/licenseserverjclient/soap/package-info.java @@ -1,2 +1,2 @@ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://checkLicenseJ.bvn13.ru") +@javax.xml.bind.annotation.XmlSchema(namespace = "http://checkLicenseJ.bvn13.ru", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package ru.bvn13.licenseserverjclient.soap; diff --git a/src/test/java/Test.java b/src/test/java/Test.java new file mode 100644 index 0000000..01beb94 --- /dev/null +++ b/src/test/java/Test.java @@ -0,0 +1,16 @@ +import ru.bvn13.licenseserverjclient.LicenseChecker; + +/** + * Created by bvn13 on 21.06.2017. + */ +public class Test { + + public static void main(String[] args) { + System.out.println("test"); + + LicenseChecker ch = new LicenseChecker("AutoPartsBonifacio"); + System.out.println(ch.checkLicense("")); + + } + +}