Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgraded cxf library #172

Open
wants to merge 1 commit into
base: 0.12.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Add the following to your `pom.xml`:
<dependency>
<groupId>io.cloudsoft.windows</groupId>
<artifactId>winrm4j</artifactId>
<version>0.12.3</version> <!-- WINRM4J_VERSION -->
<version>0.12.4-SNAPSHOT</version> <!-- WINRM4J_VERSION -->
</dependency>
```

Expand Down
42 changes: 40 additions & 2 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,37 @@
<parent>
<groupId>io.cloudsoft.windows</groupId>
<artifactId>winrm4j-parent</artifactId>
<version>0.12.3</version> <!-- WINRM4J_VERSION -->
<version>0.12.4-SNAPSHOT</version> <!-- WINRM4J_VERSION -->
</parent>
<artifactId>winrm4j-client</artifactId>
<name>WinRM Client</name>

<dependencyManagement>
<dependencies>
<!-- required as cxf v4 still pulls old libraries (see release notes) -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
Expand Down Expand Up @@ -142,6 +168,18 @@
<artifactId>xmlunit-matchers</artifactId>
<version>${xmlunit.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -214,7 +252,7 @@
* Summary of conclusions: https://lists.apache.org/thread.html/f24c5833eb0ffda00021a57a606e143a4f5a2b7971df4e11406df1a6%40%3Cdev.brooklyn.apache.org%3E
-->
<Import-Package>
javax.xml.bind*;version=!,
jakarta.xml.bind*;version=!,
*
</Import-Package>
</instructions>
Expand Down
4 changes: 2 additions & 2 deletions client/src/jaxws/bindings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
<jaxws:bindings xmlns:jaxws="https://jakarta.ee/xml/ns/jaxws"
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.soap.SOAPFaultException;
import jakarta.xml.ws.WebServiceException;
import jakarta.xml.ws.soap.SOAPFaultException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;
import java.util.function.Predicate;

import javax.xml.ws.soap.SOAPFaultException;
import jakarta.xml.ws.soap.SOAPFaultException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import java.util.Set;

import javax.xml.namespace.QName;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import jakarta.xml.soap.SOAPBody;
import jakarta.xml.soap.SOAPElement;
import jakarta.xml.soap.SOAPEnvelope;
import jakarta.xml.soap.SOAPException;
import jakarta.xml.ws.handler.MessageContext;
import jakarta.xml.ws.handler.soap.SOAPHandler;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;

public class StripShellResponseHandler implements SOAPHandler<SOAPMessageContext> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import javax.security.auth.login.Configuration;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.Handler;
import jakarta.xml.ws.BindingProvider;
import jakarta.xml.ws.handler.Handler;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.xml.ws.spi.Provider;
import javax.xml.ws.spi.ServiceDelegate;
import jakarta.xml.ws.spi.Provider;
import jakarta.xml.ws.spi.ServiceDelegate;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.interceptor.Interceptor;
Expand Down Expand Up @@ -86,7 +86,7 @@ private static WinRm doCreateServiceWithReflectivelySetDelegate() {
WinRmService service = doCreateService_1_CreateMinimalServiceInstance();

try {
Field delegateField = javax.xml.ws.Service.class.getDeclaredField("delegate"); //ALLOW CXF SPECIFIC SERVICE DELEGATE ONLY!
Field delegateField = jakarta.xml.ws.Service.class.getDeclaredField("delegate"); //ALLOW CXF SPECIFIC SERVICE DELEGATE ONLY!
delegateField.setAccessible(true);
ServiceDelegate previousDelegate = (ServiceDelegate) delegateField.get(service);
if (!previousDelegate.getClass().getName().contains("cxf")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.cloudsoft.winrm4j.client.retry;

import javax.xml.ws.WebServiceException;
import jakarta.xml.ws.WebServiceException;

/**
* Policy to decide if a retry should be done.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Optional;
import java.util.concurrent.TimeUnit;

import javax.xml.ws.WebServiceException;
import jakarta.xml.ws.WebServiceException;

/**
* Retry policy that uses max number of retries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;

import javax.xml.ws.WebServiceException;
import jakarta.xml.ws.WebServiceException;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Expand Down
38 changes: 20 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.cloudsoft.windows</groupId>
<artifactId>winrm4j-parent</artifactId>
<version>0.12.3</version> <!-- WINRM4J_VERSION -->
<version>0.12.4-SNAPSHOT</version> <!-- WINRM4J_VERSION -->
<packaging>pom</packaging>
<name>WinRM Parent</name>
<description>
Expand Down Expand Up @@ -61,19 +61,21 @@
<includedTestGroups />
<excludedTestGroups>Integration,Acceptance,Live,WIP</excludedTestGroups>
<surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
<surefire.version>2.19.1</surefire.version>
<surefire.version>2.22.0</surefire.version>
<testng.version>6.9.10</testng.version>
<guava.version>18.0</guava.version>
<mockwebserver.version>3.5.0</mockwebserver.version>
<guava.version>27.1-jre</guava.version>
<mockwebserver.version>4.10.0</mockwebserver.version>

<!-- Production -->
<cxf.version>3.3.9</cxf.version>
<cxf.version>4.0.0</cxf.version>
<jakarta.version>4.0.2</jakarta.version>
<com.sun.xml.messaging.saaj.version>3.0.0</com.sun.xml.messaging.saaj.version>
<cxf.java2ws.plugin.version>${cxf.version}</cxf.java2ws.plugin.version>
<httpcomponents.httpcore.version>4.4.12</httpcomponents.httpcore.version>
<httpcomponents.httpasyncclient.version>4.1.4</httpcomponents.httpasyncclient.version>
<httpcomponents.httpclient.version>4.5.13</httpcomponents.httpclient.version>
<commons-io.version>2.4</commons-io.version>
<xmlunit.version>2.3.0</xmlunit.version>
<httpcomponents.httpcore.version>4.4.16</httpcomponents.httpcore.version>
<httpcomponents.httpasyncclient.version>4.1.5</httpcomponents.httpasyncclient.version>
<httpcomponents.httpclient.version>4.5.14</httpcomponents.httpclient.version>
<commons-io.version>2.11.0</commons-io.version>
<xmlunit.version>2.8.1</xmlunit.version>
</properties>

<modules>
Expand Down Expand Up @@ -169,7 +171,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand Down Expand Up @@ -210,7 +212,7 @@
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<version>3.0.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -219,23 +221,23 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.0</version>
<version>5.1.8</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.1</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<version>3.5.0</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
Expand All @@ -247,7 +249,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.5.0</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down
26 changes: 25 additions & 1 deletion service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,40 @@
<parent>
<groupId>io.cloudsoft.windows</groupId>
<artifactId>winrm4j-parent</artifactId>
<version>0.12.3</version> <!-- WINRM4J_VERSION -->
<version>0.12.4-SNAPSHOT</version> <!-- WINRM4J_VERSION -->
<relativePath>../pom.xml</relativePath>
</parent>

<dependencyManagement>
<dependencies>
<!-- required as cxf v4 still pulls old libraries (see release notes) -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>4.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
16 changes: 8 additions & 8 deletions service/src/main/java/io/cloudsoft/winrm4j/service/WinRm.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.Action;
import javax.xml.ws.BindingType;
import javax.xml.ws.RequestWrapper;
import jakarta.jws.WebMethod;
import jakarta.jws.WebParam;
import jakarta.jws.WebResult;
import jakarta.jws.WebService;
import jakarta.jws.soap.SOAPBinding;
import jakarta.xml.ws.Action;
import jakarta.xml.ws.BindingType;
import jakarta.xml.ws.RequestWrapper;

import io.cloudsoft.winrm4j.service.shell.Receive;
import io.cloudsoft.winrm4j.service.shell.ReceiveResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;


@XmlAccessorType(XmlAccessType.FIELD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
package io.cloudsoft.winrm4j.service.shell;

import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;


@XmlAccessorType(XmlAccessType.FIELD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

package io.cloudsoft.winrm4j.service.shell;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlValue;


@XmlAccessorType(XmlAccessType.FIELD)
Expand Down
Loading