moved to jakarta

This commit is contained in:
lucio 2024-03-12 17:27:07 +01:00
parent 2a555f3e86
commit d92b8d6b56
15 changed files with 60 additions and 61 deletions

View File

@ -18,11 +18,7 @@
<attribute name="test" value="true"/> <attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>

View File

@ -1,8 +1,11 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=11

18
pom.xml
View File

@ -17,9 +17,6 @@
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection> <developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url> <url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
</scm> </scm>
<properties>
<distroDirectory>distro</distroDirectory>
</properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
@ -40,19 +37,14 @@
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>common-security</artifactId> <artifactId>common-security</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api -->
<dependency> <dependency>
<groupId>javax.xml.bind</groupId> <groupId>jakarta.xml.bind</groupId>
<artifactId>jaxb-api</artifactId> <artifactId>jakarta.xml.bind-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.xml.bind</groupId> <groupId>jakarta.xml.ws</groupId>
<artifactId>jaxb-impl</artifactId> <artifactId>jakarta.xml.ws-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>rt</artifactId>
<version>2.3.3</version>
</dependency> </dependency>
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>

View File

@ -6,16 +6,17 @@ package org.gcube.common.clients.stubs.jaxws;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/** /**
* @author fabio * @author fabio
* *

View File

@ -5,13 +5,14 @@ import java.io.StringWriter;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import javax.xml.ws.EndpointReference;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import jakarta.xml.ws.EndpointReference;
/** /**
* Used internally by {@link StubFactory} to bridge {@link EndpointReference}s to gCore instances which comply with the * Used internally by {@link StubFactory} to bridge {@link EndpointReference}s to gCore instances which comply with the
* older Member Specification of WS-Addressing (e.g. as returned by a gCore factory service) with * older Member Specification of WS-Addressing (e.g. as returned by a gCore factory service) with

View File

@ -2,10 +2,10 @@ package org.gcube.common.clients.stubs.jaxws;
import java.util.Iterator; import java.util.Iterator;
import javax.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlRootElement;
import javax.xml.soap.DetailEntry; import jakarta.xml.soap.DetailEntry;
import javax.xml.soap.SOAPFault; import jakarta.xml.soap.SOAPFault;
import javax.xml.ws.soap.SOAPFaultException; import jakarta.xml.ws.soap.SOAPFaultException;
/** /**
* Library-wide utilities. * Library-wide utilities.

View File

@ -6,11 +6,11 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import javax.xml.ws.Service;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import jakarta.xml.ws.Service;
/** /**
* Privately used by a {@link StubFactory}, caches {@link Service} instances for services with given names. * Privately used by a {@link StubFactory}, caches {@link Service} instances for services with given names.
* <p> * <p>

View File

@ -1,6 +1,6 @@
package org.gcube.common.clients.stubs.jaxws; package org.gcube.common.clients.stubs.jaxws;
import static org.gcube.common.clients.stubs.jaxws.JAXWSUtils.*; import static org.gcube.common.clients.stubs.jaxws.JAXWSUtils.notNull;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -9,13 +9,6 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.ws.Binding;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
import org.gcube.common.clients.stubs.jaxws.StubFactoryDSL.AtClause; import org.gcube.common.clients.stubs.jaxws.StubFactoryDSL.AtClause;
import org.gcube.common.clients.stubs.jaxws.handlers.GCoreJAXWSHandler; import org.gcube.common.clients.stubs.jaxws.handlers.GCoreJAXWSHandler;
@ -23,6 +16,14 @@ import org.gcube.common.clients.stubs.jaxws.proxies.GenericProxyFactory;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import jakarta.xml.ws.Binding;
import jakarta.xml.ws.BindingProvider;
import jakarta.xml.ws.EndpointReference;
import jakarta.xml.ws.Service;
import jakarta.xml.ws.handler.Handler;
import jakarta.xml.ws.soap.AddressingFeature;
import jakarta.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
/** /**
* Generates JAXWS stubs for endpoints or instances of gCore service at given addresses. * Generates JAXWS stubs for endpoints or instances of gCore service at given addresses.
* *

View File

@ -2,7 +2,7 @@ package org.gcube.common.clients.stubs.jaxws;
import java.net.URI; import java.net.URI;
import javax.xml.ws.EndpointReference; import jakarta.xml.ws.EndpointReference;
/** /**
* Simple DSL for the {@link StubFactory} * Simple DSL for the {@link StubFactory}

View File

@ -1,12 +1,13 @@
package org.gcube.common.clients.stubs.jaxws.handlers; package org.gcube.common.clients.stubs.jaxws.handlers;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import jakarta.xml.soap.SOAPException;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
/** /**
* Adapter implementation of {@link CallHandler} for selective implementations (handle only outgoing calls, or only responses). * Adapter implementation of {@link CallHandler} for selective implementations (handle only outgoing calls, or only responses).
* *

View File

@ -1,13 +1,14 @@
package org.gcube.common.clients.stubs.jaxws.handlers; package org.gcube.common.clients.stubs.jaxws.handlers;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import org.gcube.common.security.providers.SecretManagerProvider; import org.gcube.common.security.providers.SecretManagerProvider;
import org.gcube.common.security.secrets.Secret; import org.gcube.common.security.secrets.Secret;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
public class AuthorizationHandler extends AbstractHandler { public class AuthorizationHandler extends AbstractHandler {
/** Namespace of scope-related headers */ /** Namespace of scope-related headers */

View File

@ -1,10 +1,10 @@
package org.gcube.common.clients.stubs.jaxws.handlers; package org.gcube.common.clients.stubs.jaxws.handlers;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
/** /**
* Handles outgoing calls and their responses. * Handles outgoing calls and their responses.
* *

View File

@ -3,13 +3,14 @@ package org.gcube.common.clients.stubs.jaxws.handlers;
import java.util.Set; import java.util.Set;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.ws.handler.MessageContext;
import jakarta.xml.ws.handler.soap.SOAPHandler;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
/** /**
* A {@link SOAPHandler} that adds gCube headers to outgoing calls. * A {@link SOAPHandler} that adds gCube headers to outgoing calls.
* *

View File

@ -3,12 +3,13 @@ package org.gcube.common.clients.stubs.jaxws.handlers;
import java.util.Iterator; import java.util.Iterator;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.soap.SOAPHeaderElement;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
/** /**
* A {@link CallHandler} that transforms WS-Addressing information in outgoing calls into MemberSubmission form. * A {@link CallHandler} that transforms WS-Addressing information in outgoing calls into MemberSubmission form.
* @author Fabio Simeoni * @author Fabio Simeoni

View File

@ -1,11 +1,12 @@
package org.gcube.common.clients.stubs.jaxws.handlers; package org.gcube.common.clients.stubs.jaxws.handlers;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.gcube.common.clients.stubs.jaxws.GCoreService; import org.gcube.common.clients.stubs.jaxws.GCoreService;
import jakarta.xml.soap.SOAPHeader;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;
/** /**
* A {@link CallHandler} that sets the coordinates of the target service on outgoing calls. * A {@link CallHandler} that sets the coordinates of the target service on outgoing calls.
* *