From 2e6b0a8ca79ef70cc6aefbc62e47d5c78050154a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caro=20Hautama=CC=88ki?= Date: Mon, 10 Jan 2022 10:33:24 +0200 Subject: [PATCH 01/73] Bump version to 0.5.0-SNAPSHOT --- example-adapter/pom.xml | 4 ++-- src/client/pom.xml | 8 ++++---- src/common/pom.xml | 4 ++-- src/pom.xml | 2 +- src/rest/pom.xml | 6 +++--- src/server/pom.xml | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index 9bff1fb..948a358 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.niis example-adapter - 0.0.5 + 0.0.6-SNAPSHOT Example Adapter for X-Road version 6 2018 @@ -257,7 +257,7 @@ true - 0.4.0 + 0.5.0-SNAPSHOT example.xroad-6.4.wsdl diff --git a/src/client/pom.xml b/src/client/pom.xml index 61428cd..955fe96 100644 --- a/src/client/pom.xml +++ b/src/client/pom.xml @@ -5,11 +5,11 @@ xrd4j org.niis - 0.4.0 + 0.5.0-SNAPSHOT org.niis.xrd4j client - 0.4.0 + 0.5.0-SNAPSHOT jar XRd4J :: Client @@ -24,12 +24,12 @@ org.niis.xrd4j common - 0.4.0 + 0.5.0-SNAPSHOT org.niis.xrd4j rest - 0.4.0 + 0.5.0-SNAPSHOT diff --git a/src/common/pom.xml b/src/common/pom.xml index 16656cf..03523ad 100644 --- a/src/common/pom.xml +++ b/src/common/pom.xml @@ -5,11 +5,11 @@ xrd4j org.niis - 0.4.0 + 0.5.0-SNAPSHOT org.niis.xrd4j common - 0.4.0 + 0.5.0-SNAPSHOT jar XRd4J :: Common diff --git a/src/pom.xml b/src/pom.xml index c60db00..f569f2a 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.niis xrd4j - 0.4.0 + 0.5.0-SNAPSHOT pom XRd4J 2018 diff --git a/src/rest/pom.xml b/src/rest/pom.xml index 9929efd..a28cce6 100644 --- a/src/rest/pom.xml +++ b/src/rest/pom.xml @@ -5,11 +5,11 @@ xrd4j org.niis - 0.4.0 + 0.5.0-SNAPSHOT org.niis.xrd4j rest - 0.4.0 + 0.5.0-SNAPSHOT jar XRd4J :: Rest @@ -39,7 +39,7 @@ org.niis.xrd4j common - 0.4.0 + 0.5.0-SNAPSHOT test diff --git a/src/server/pom.xml b/src/server/pom.xml index 2e40865..fc8f71b 100644 --- a/src/server/pom.xml +++ b/src/server/pom.xml @@ -5,11 +5,11 @@ xrd4j org.niis - 0.4.0 + 0.5.0-SNAPSHOT org.niis.xrd4j server - 0.4.0 + 0.5.0-SNAPSHOT jar XRd4J :: Server @@ -30,7 +30,7 @@ org.niis.xrd4j common - 0.4.0 + 0.5.0-SNAPSHOT From 7a85db82647f154cbebdaa542e48dc0943243133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petteri=20Kivim=C3=A4ki?= Date: Sat, 29 Jan 2022 15:07:53 +0200 Subject: [PATCH 02/73] Update Slack invitation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7958ae1..ef1952f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # X-Road Library for Java (XRd4J) [![Go to X-Road Community Slack](https://img.shields.io/badge/Go%20to%20Community%20Slack-grey.svg)](https://jointxroad.slack.com/) -[![Get invited](https://img.shields.io/badge/No%20Slack-Get%20invited-green.svg)](https://x-road.global/join-the-xroad-community) +[![Get invited](https://img.shields.io/badge/No%20Slack-Get%20invited-green.svg)](https://x-road.global/community) X-Road Library for Java (XRd4J) provides a Java library for building X-Road v6 Adapter servers and clients. The library implements X-Road v6 [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) v4.0 and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. From 00570baf9d30398992cde3a64e330ee73f4c0fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petteri=20Kivim=C3=A4ki?= Date: Sat, 29 Jan 2022 16:57:41 +0200 Subject: [PATCH 03/73] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ef1952f..a151b39 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ [![Go to X-Road Community Slack](https://img.shields.io/badge/Go%20to%20Community%20Slack-grey.svg)](https://jointxroad.slack.com/) [![Get invited](https://img.shields.io/badge/No%20Slack-Get%20invited-green.svg)](https://x-road.global/community) -X-Road Library for Java (XRd4J) provides a Java library for building X-Road v6 Adapter servers and clients. The library implements X-Road v6 [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) v4.0 and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. +X-Road Library for Java (XRd4J) provides a Java library for building X-Road Adapter servers and clients. The library implements X-Road [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) v4.0 and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. ## Library Modules -* `client` : SOAP client that generates X-Road v6 SOAP messages that can be sent to X-Road Security Server. Includes request serializer and response deserializer. +* `client` : SOAP client that generates X-Road SOAP messages that can be sent to X-Road Security Server. Includes request serializer and response deserializer. * `server` : Provides an abstract servlet that can be used as a base class for Adapter Server implementations. Includes a request deserializer and a response serializer. -* `common` : General purpose utilities for processing SOAP messages and X-Road v6 message data models. +* `common` : General purpose utilities for processing SOAP messages and X-Road message data models. * `rest` : HTTP clients that can be used for sending requests to web services from Adapter Server. ## Maven Repositories From 9974d494231e59139f868963782f9b5e44ae2317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petteri=20Kivim=C3=A4ki?= Date: Sat, 29 Jan 2022 16:58:32 +0200 Subject: [PATCH 04/73] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a151b39..0171bf6 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ X-Road Library for Java (XRd4J) provides a Java library for building X-Road Adapter servers and clients. The library implements X-Road [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) v4.0 and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. +The library is compatible with X-Road 6 and 7. + ## Library Modules * `client` : SOAP client that generates X-Road SOAP messages that can be sent to X-Road Security Server. Includes request serializer and response deserializer. From 82eb4c5d0dbd9bd67c0ca588f381ccdcfa344795 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Fri, 24 Feb 2023 15:31:11 +0200 Subject: [PATCH 05/73] Add JDK11 support and update dependencies --- src/CHANGELOG.md | 4 ++++ src/pom.xml | 8 +++++--- src/rest/pom.xml | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index a5fd368..fe6dc89 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.5.0-SNAPSHOT 2023-02-24 +- Add JDK 11 support +- Update dependencies +- ## 0.4.0 - 2022-01-05 - XRDDEV-1874 Release version 0.4.0 diff --git a/src/pom.xml b/src/pom.xml index f569f2a..fa7e0e2 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -37,7 +37,6 @@ com.sun.xml.messaging.saaj saaj-impl 1.3.28 - runtime @@ -115,7 +114,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.17 + 3.0.0-M9 @@ -123,6 +122,9 @@ test-log4j.xml + 3 + true + -Xmx1024m @@ -180,7 +182,7 @@ org.owasp dependency-check-maven - 6.5.0 + 8.1.0 24 false diff --git a/src/rest/pom.xml b/src/rest/pom.xml index a28cce6..77857d5 100644 --- a/src/rest/pom.xml +++ b/src/rest/pom.xml @@ -24,17 +24,17 @@ org.apache.httpcomponents httpclient - 4.5.13 + 4.5.14 org.apache.httpcomponents httpcore - 4.4.13 + 4.4.16 org.json json - 20200518 + 20220924 org.niis.xrd4j From 0bd71741788d88b2c8cc726c6bf0a9a2cca89dfa Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sun, 26 Feb 2023 08:57:27 +0200 Subject: [PATCH 06/73] Change to spring boot - Example Adapter is run as a self-contained Java application, with an embedded web container. - Change the context path from to . - Add support for Java 11. - Update documentation. --- example-adapter/README.md | 133 ++++++++++-------- .../Setting-up-Development-Environment.md | 58 +------- .../{xroad-6.4 => }/getRandomRequest.xml | 0 .../{xroad-6.4 => }/getRandomResponse.xml | 0 .../{xroad-6.4 => }/helloServiceRequest.xml | 0 .../{xroad-6.4 => }/helloServiceResponse.xml | 0 .../{xroad-6.4 => }/listPeopleRequest.xml | 0 .../{xroad-6.4 => }/listPeopleResponse.xml | 0 .../{xroad-6.4 => }/personDetailsRequest.xml | 0 .../{xroad-6.4 => }/personDetailsResponse.xml | 0 example-adapter/pom.xml | 110 +++++++-------- .../xrd4j/exampleadapter/Application.java | 49 +++++++ .../xrd4j/exampleadapter/ExampleAdapter.java | 13 +- .../src/main/resources/application.properties | 4 + ...le.xroad-6.4.wsdl => example-adapter.wsdl} | 0 .../WEB-INF/classes => resources}/log4j.dtd | 0 .../WEB-INF/classes => resources}/log4j.xml | 6 +- .../src/main/resources/xrd-servlet.properties | 2 +- .../src/main/webapp/META-INF/context.xml | 2 +- .../src/main/webapp/WEB-INF/jsp/index.jsp | 11 ++ .../src/main/webapp/WEB-INF/web.xml | 20 --- example-adapter/src/main/webapp/index.jsp | 4 - 22 files changed, 198 insertions(+), 214 deletions(-) rename example-adapter/examples/{xroad-6.4 => }/getRandomRequest.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/getRandomResponse.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/helloServiceRequest.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/helloServiceResponse.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/listPeopleRequest.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/listPeopleResponse.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/personDetailsRequest.xml (100%) rename example-adapter/examples/{xroad-6.4 => }/personDetailsResponse.xml (100%) create mode 100644 example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java create mode 100644 example-adapter/src/main/resources/application.properties rename example-adapter/src/main/resources/{example.xroad-6.4.wsdl => example-adapter.wsdl} (100%) rename example-adapter/src/main/{webapp/WEB-INF/classes => resources}/log4j.dtd (100%) rename example-adapter/src/main/{webapp/WEB-INF/classes => resources}/log4j.xml (88%) create mode 100644 example-adapter/src/main/webapp/WEB-INF/jsp/index.jsp delete mode 100644 example-adapter/src/main/webapp/WEB-INF/web.xml delete mode 100644 example-adapter/src/main/webapp/index.jsp diff --git a/example-adapter/README.md b/example-adapter/README.md index bc07de0..9f15a60 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -1,144 +1,153 @@ # X-Road Adapter Example -This project provides an example implementation of a web service that is compatible with the X-Road v6 adapter server protocol version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). The implementation is based on the [XRd4J](https://github.com/nordic-institute/xrd4j) library. The example adapter contains a single class that -implements two services: +X-Road Adapter Example provides an example implementation of a web service that is compatible with the X-Road 6 and X-Road 7. The +Adapter Example support the X-Road Message Protocol for SOAP version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). + +The implementation is based on the [XRd4J](https://github.com/nordic-institute/xrd4j) library. The Example Adapter contains +a single class that implements four services: * `getRandom` : returns a random number between 1-100 * `helloService` : returns a hello message with the given name * `listPeople` : returns a list of mock people * `personDetails` : returns a mock person based on the given `SSN` -The example adapter is meant to illustrate the basic level usage of the XRd4J library in processing X-Road messages. +The Example Adapter is meant to illustrate the basic level usage of the XRd4J library in processing X-Road messages. ## Try It Out -### Docker - -The `example-adapter` directory contains a Dockerfile that can be used to create a container for running the example. Requires Docker to be installed and configured. - -Clone the repository to get access to the sources: +The fastest and easiest way to try out the application is by using the Spring Boot Maven plugin. +To do this, you need to have a working installation of [Maven](https://maven.apache.org/). ``` -git clone https://github.com/nordic-institute/xrd4j.git +mvn spring-boot:run ``` - -The example adapter project root is under the `example-adapter` directory. - -Build the project from the project root with: +After that the application is accessible at: ``` -mvn clean install +http://localhost:8080/example-adapter/Endpoint ``` -After a successful build, at project root directory run: +The WSDL description is accessible at: ``` -docker build -t example-adapter . +http://localhost:8080/example-adapter/Endpoint?wsdl ``` -This will create a new docker image named `example-adapter`. A container based on the image can be run with: +## Software Requirements -``` -docker run -p 8080:8080 example-adapter -``` +* Java 8 or Java 11 +* Maven 3.x +* Docker (*optional*) -This will start the container and listen to port `8080`. On Linux, the container should be available at `localhost`. On Windows use `docker-machine ip` command to get Docker host’s IP address. +## Development Environment -The example service can now be found at `http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint` where `x.x.x` needs to be replaced by the version that can be verified from the maven project file, or the archives produced by the build. -Example requests can be found in the `examples` directory. +Setting up an environment for example-related development is explained [here](Setting-up-Development-Environment.md). -See [Usage section](#usage) for further instructions. +## Installation -### Software Requirements +X-Road Example Adapter can be installed and run in the following ways: -* Java 8 -* Tomcat 6 or later +* Deploying `example-adapter-x.x.x.war` into a web container such as Tomcat. +* Using Docker to run X-Road Example Adapter. -### Development Environment +### Web container -Setting up an environment for example-related development is explained [here](Setting-up-Development-Environment.md). +Build X-Road Example Adapter and deploy it to a Java application server, e.g., Tomcat. -### Installation +* Build the project and produce ```example-adapter-x.x.x.war``` file. +* Copy the file ```tomcat.home/webapps``` folder. +* Start/restart Tomcat. +* +### Docker -**N.B.** If you intend to connect the services to an X-Road Security Server you must update your server's IP address / host name to the WSDL file. Look for the below line and replace the default URL with your server's IP / host name. +You can create a Docker image to run X-Road Example Adapter inside a container, using the provided Dockerfile. +Before building the image, you must build the war file. -```XML - +``` +mvn clean install +``` +If you have not built the war, building the Docker image will fail with message +``` +Step 2 : ADD src/target/example-adapter-*.war example-adapter.war +No source files were specified ``` -#### JAR +While you are in the project root directory, build the image using the `docker build` command. The `-t` parameter gives your image a tag, so you can run it more easily later. Don’t forget the `.` command, which tells the `docker build` command to look in the current directory for a file called Dockerfile. -* Build the project and produce `example-adapter-x.x.x-SNAPSHOT.jar` file (`x.x.x` being replaced by the actual version). -* Run the application: `$ java -jar example-adapter-x.x.x-SNAPSHOT.jar`. +``` +docker build -t example-adapter . +``` -#### WAR +After building the image, you can run X-Road Test Service using it. -* Build the project and produce `example-adapter-x.x.x-SNAPSHOT.war` file. -* Copy the file to `tomcat.home/webapps` folder. -* Start/restart Tomcat. +``` +docker run -p 8080:8080 example-adapter +``` + +See [Usage section](#usage) for further instructions. -### Access the application +## Access the application -After installation (both JAR and WAR) the application is accessible at: +After installation the application is accessible at: ``` -http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint +http://localhost:8080/example-adapter/Endpoint ``` The WSDL description is accessible at: ``` -http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint?wsdl +http://localhost:8080/example-adapter/Endpoint?wsdl ``` -### Usage +## Usage -This section provides examples for calling the service after it is deployed and running. The example commands require curl to be installed. +This section provides examples for calling the service after it is deployed and running. The example commands require `curl` to be installed. -#### getRandom +### getRandom -An example [SOAP request](examples/xroad-6.4/getRandomRequest.xml) (available in the `examples` directory). +An example [SOAP request](examples/getRandomRequest.xml) (available in the `examples` directory). Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `getRandom` service: ```bash -curl -d @examples/xroad-6.4/getRandomRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint +curl -d @examples/getRandomRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/xroad-6.4/getRandomResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/getRandomResponse.xml) (available in the `examples` directory). -#### helloService +### helloService -An example [SOAP request](examples/xroad-6.4/helloServiceRequest.xml) (available in the `examples` directory). +An example [SOAP request](examples/helloServiceRequest.xml) (available in the `examples` directory). Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `helloService`: ```bash -curl -d @examples/xroad-6.4/helloServiceRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint +curl -d @examples/helloServiceRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/xroad-6.4/helloServiceResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/helloServiceResponse.xml) (available in the `examples` directory). -#### listPeople +### listPeople -An example [SOAP request](examples/xroad-6.4/listPeopleRequest.xml) (available in the `examples` directory). +An example [SOAP request](examples/listPeopleRequest.xml) (available in the `examples` directory). Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `listPeople`: ```bash -curl -d @examples/xroad-6.4/listPeopleRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint +curl -d @examples/listPeopleRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/xroad-6.4/listPeopleResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/listPeopleResponse.xml) (available in the `examples` directory). -#### personDetails +### personDetails -An example [SOAP request](examples/xroad-6.4/personDetailsRequest.xml) (available in the `examples` directory). +An example [SOAP request](examples/personDetailsRequest.xml) (available in the `examples` directory). Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `personDetails`: ```bash -curl -d @examples/xroad-6.4/personDetailsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint +curl -d @examples/personDetailsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/xroad-6.4/personDetailsResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/personDetailsResponse.xml) (available in the `examples` directory). diff --git a/example-adapter/Setting-up-Development-Environment.md b/example-adapter/Setting-up-Development-Environment.md index fa5cb8a..96e5495 100644 --- a/example-adapter/Setting-up-Development-Environment.md +++ b/example-adapter/Setting-up-Development-Environment.md @@ -2,24 +2,24 @@ This document describes how a developer's workstation can be setup. ### Software Requirements -* Linux or Windows -* Java 7 -* Tomcat 6 or 7 or 8 +* Linux / Windows / MacOS +* Java 8 or Java 11 * Maven 3.x +* Docker (*optional*) ### Getting the code -The example adapter project is a part of the XRd4J git repository. You can access the source code by cloning it: +The Example Adapter project is a part of the XRd4J git repository. You can access the source code by cloning it: ``` git clone https://github.com/nordic-institute/xrd4j.git ``` -The example adapter is a separate Maven project and can be found under the `example-adapter` directory. +The Example Adapter is a separate Maven project and can be found under the `example-adapter` directory. ### Building the code -Example adapter uses Maven as the build management tool. In order to build the whole project and generate the WAR-file (`example-adapter-x.x.x-SNAPSHOT.war`), you must run the maven command below from the project root directory. +Example Adapter uses Maven as the build management tool. In order to build the whole project and generate the WAR-file (`example-adapter-x.x.x-SNAPSHOT.war`), you must run the maven command below from the project root directory. ``` mvn clean install @@ -30,49 +30,3 @@ Running the above maven command generates the WAR-file under the directory prese ``` target/example-adapter-x.x.x-SNAPSHOT.war ``` - -#### Error on building the code - -If running `mvn clean install` generates the error - -``` -[ERROR] Failed to execute goal on project example-adapter: Could not resolve dependencies for project com.pkrete.xrd4j.tools:example-adapter:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.pkrete.xrd4j:common:jar:0.0.1: Failed to read artifact descriptor for com.pkrete.xrd4j:common:jar:0.0.1: Could not transfer artifact com.pkrete.xrd4j:common:pom:0.0.1 from/to NIIS-repo (https://artifactory.niis.org/xroad-maven-releases): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] -``` - -try one of two solutions: - -##### Solution 1 - -Skip certificate validation: - -``` -mvn install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -``` - -##### Solution 2 - -Import NIIS's Maven repository's certificate as a trusted certificate into `cacerts` keystore. See full [instructions](../documentation/Import-a-Certificate-as-a-Trusted-Certificate.md). NIIS Maven repository's URL is `https://artifactory.niis.org`. - -### IDE Setup - -The project can be imported into different IDEs, but currently this section covers only Netbeans. Some modifications are required regardless of the IDE that's being used. - -#### Netbeans - -Opening the project in Netbeans. - -* File -> Open Project -> path of the project folder -> Click Open Project button - -Adding a new Tomcat server. - -* Tools -> Servers -> Add Server - -### Running the application - -Below there's the default URL of the application. - -[http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint](http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint) - -**N.B.!** If `example-adapter-x.x.x-SNAPSHOT.war` file is manually copied in Tomcat's webapp folder, then the application can be accessed at: - -[http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint](http://localhost:8080/example-adapter-x.x.x-SNAPSHOT/Endpoint) diff --git a/example-adapter/examples/xroad-6.4/getRandomRequest.xml b/example-adapter/examples/getRandomRequest.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/getRandomRequest.xml rename to example-adapter/examples/getRandomRequest.xml diff --git a/example-adapter/examples/xroad-6.4/getRandomResponse.xml b/example-adapter/examples/getRandomResponse.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/getRandomResponse.xml rename to example-adapter/examples/getRandomResponse.xml diff --git a/example-adapter/examples/xroad-6.4/helloServiceRequest.xml b/example-adapter/examples/helloServiceRequest.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/helloServiceRequest.xml rename to example-adapter/examples/helloServiceRequest.xml diff --git a/example-adapter/examples/xroad-6.4/helloServiceResponse.xml b/example-adapter/examples/helloServiceResponse.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/helloServiceResponse.xml rename to example-adapter/examples/helloServiceResponse.xml diff --git a/example-adapter/examples/xroad-6.4/listPeopleRequest.xml b/example-adapter/examples/listPeopleRequest.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/listPeopleRequest.xml rename to example-adapter/examples/listPeopleRequest.xml diff --git a/example-adapter/examples/xroad-6.4/listPeopleResponse.xml b/example-adapter/examples/listPeopleResponse.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/listPeopleResponse.xml rename to example-adapter/examples/listPeopleResponse.xml diff --git a/example-adapter/examples/xroad-6.4/personDetailsRequest.xml b/example-adapter/examples/personDetailsRequest.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/personDetailsRequest.xml rename to example-adapter/examples/personDetailsRequest.xml diff --git a/example-adapter/examples/xroad-6.4/personDetailsResponse.xml b/example-adapter/examples/personDetailsResponse.xml similarity index 100% rename from example-adapter/examples/xroad-6.4/personDetailsResponse.xml rename to example-adapter/examples/personDetailsResponse.xml diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index 948a358..2944ccb 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -15,14 +15,44 @@ https://github.com/nordic-institute/xrd4j/tree/master/example-adapter war + + org.springframework.boot + spring-boot-starter-parent + 2.7.9 + - 1.7.30 - 2.17.1 + 0.4.0 + 2.0.6 1.8 UTF-8 UTF-8 + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + org.yaml + snakeyaml + 1.33 + org.niis.xrd4j common @@ -33,11 +63,18 @@ server ${xrd4j.version} + + - javax.servlet - servlet-api - 2.5 - provided + com.sun.xml.messaging.saaj + saaj-impl + 1.3.28 + + + + javax.activation + activation + 1.1.1 @@ -50,16 +87,10 @@ org.slf4j - slf4j-log4j12 + slf4j-reload4j ${slf4j.version} - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - junit junit @@ -112,6 +143,10 @@ + + org.springframework.boot + spring-boot-maven-plugin + maven-resources-plugin 3.2.0 @@ -142,23 +177,6 @@ - - org.apache.maven.plugins - maven-war-plugin - 2.4 - - - - true - src/main/webapp - - **/META-INF/context.xml - - - - src/main/webapp/WEB-INF/web.xml - - org.apache.maven.plugins maven-compiler-plugin @@ -169,26 +187,6 @@ ${project.build.sourceEncoding} - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.0 - - - tomcat-run - - exec-war - - package - - - - /${project.artifactId}-${project.version} - false - ${project.artifactId}-${project.version}.jar - utf-8 - - com.mycila license-maven-plugin @@ -250,16 +248,4 @@ - - - xroad-6.4 - - true - - - 0.5.0-SNAPSHOT - example.xroad-6.4.wsdl - - - diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java new file mode 100644 index 0000000..c52df4b --- /dev/null +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -0,0 +1,49 @@ +/** + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package org.niis.xrd4j.exampleadapter; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * X-Road Example Adapter application entry point + */ +@Configuration +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + + @Bean + public ServletRegistrationBean endpointBean() { + ServletRegistrationBean bean = new ServletRegistrationBean(new ExampleAdapter(), "/Endpoint"); + bean.setLoadOnStartup(1); + return bean; + } +} diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index 8f9f4e5..ffe3046 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -47,10 +47,10 @@ import org.slf4j.LoggerFactory; /** - * This class implements two simple X-Road v6 compatible services: "getRandom" - * and "helloService". Service descriptions are defined in "example.wsdl" file - * that's located in WEB-INF/classes folder. The name of the WSDL file and the - * namespace is configured in WEB-INF/classes/xrd-servlet.properties file. + * This class implements four simple X-Road 6 and X-Road 7 compatible services: + * "getRandom", "helloService", "listPeople" and "personDetails". Service descriptions + * are defined in "example-adapter.wsdl" file that's located in resources/ folder. + * The name of the WSDL file and the namespace is configured in resources/xrd-servlet.properties file. * * @author Petteri Kivimäki * @author Raido Kaju @@ -151,11 +151,6 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // Create a new response serializer that serializes the response // to SOAP serializer = new ListPeopleResponseSerializer(); - // Create a custom request deserializer that parses the request - // data from the SOAP request - CustomRequestDeserializer customDeserializer = new CustomRequestDeserializerImpl(); - // Parse the request data from the request - customDeserializer.deserialize(request, this.namespaceDeserialize); // Create a new ServiceResponse object ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); // Set namespace of the SOAP response diff --git a/example-adapter/src/main/resources/application.properties b/example-adapter/src/main/resources/application.properties new file mode 100644 index 0000000..1eddd50 --- /dev/null +++ b/example-adapter/src/main/resources/application.properties @@ -0,0 +1,4 @@ +server.servlet.context-path=/example-adapter +server.port=8080 +spring.mvc.view.prefix: /WEB-INF/jsp/ +spring.mvc.view.suffix: .jsp diff --git a/example-adapter/src/main/resources/example.xroad-6.4.wsdl b/example-adapter/src/main/resources/example-adapter.wsdl similarity index 100% rename from example-adapter/src/main/resources/example.xroad-6.4.wsdl rename to example-adapter/src/main/resources/example-adapter.wsdl diff --git a/example-adapter/src/main/webapp/WEB-INF/classes/log4j.dtd b/example-adapter/src/main/resources/log4j.dtd similarity index 100% rename from example-adapter/src/main/webapp/WEB-INF/classes/log4j.dtd rename to example-adapter/src/main/resources/log4j.dtd diff --git a/example-adapter/src/main/webapp/WEB-INF/classes/log4j.xml b/example-adapter/src/main/resources/log4j.xml similarity index 88% rename from example-adapter/src/main/webapp/WEB-INF/classes/log4j.xml rename to example-adapter/src/main/resources/log4j.xml index 896ccce..22a6a4c 100644 --- a/example-adapter/src/main/webapp/WEB-INF/classes/log4j.xml +++ b/example-adapter/src/main/resources/log4j.xml @@ -8,7 +8,7 @@ - + @@ -19,7 +19,7 @@ --> - - + + diff --git a/example-adapter/src/main/resources/xrd-servlet.properties b/example-adapter/src/main/resources/xrd-servlet.properties index 1cb0bd7..e573835 100644 --- a/example-adapter/src/main/resources/xrd-servlet.properties +++ b/example-adapter/src/main/resources/xrd-servlet.properties @@ -1,4 +1,4 @@ -wsdl.path=example.xroad-6.4.wsdl +wsdl.path=example-adapter.wsdl # Namespace for ServiceResponse namespace.serialize=http://test.x-road.global/producer namespace.prefix.serialize=ts1 diff --git a/example-adapter/src/main/webapp/META-INF/context.xml b/example-adapter/src/main/webapp/META-INF/context.xml index 997368b..9936aac 100644 --- a/example-adapter/src/main/webapp/META-INF/context.xml +++ b/example-adapter/src/main/webapp/META-INF/context.xml @@ -1,2 +1,2 @@ - + diff --git a/example-adapter/src/main/webapp/WEB-INF/jsp/index.jsp b/example-adapter/src/main/webapp/WEB-INF/jsp/index.jsp new file mode 100644 index 0000000..5985c6d --- /dev/null +++ b/example-adapter/src/main/webapp/WEB-INF/jsp/index.jsp @@ -0,0 +1,11 @@ + + + X-Road Example Adapter + + +

X-Road Example Adapter

+

+ X-Road Example Adapter on GitHub. +

+ + \ No newline at end of file diff --git a/example-adapter/src/main/webapp/WEB-INF/web.xml b/example-adapter/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index fa83207..0000000 --- a/example-adapter/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - ExampleAdapter - org.niis.xrd4j.exampleadapter.ExampleAdapter - 1 - - - ExampleAdapter - /Endpoint - - - - 30 - - - - index.jsp - - diff --git a/example-adapter/src/main/webapp/index.jsp b/example-adapter/src/main/webapp/index.jsp deleted file mode 100644 index 6d56757..0000000 --- a/example-adapter/src/main/webapp/index.jsp +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 2fd493cc382053f385fd758b4c4ba6f3858c161c Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sun, 26 Feb 2023 09:01:02 +0200 Subject: [PATCH 07/73] Update readme --- example-adapter/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example-adapter/README.md b/example-adapter/README.md index 9f15a60..2d46c4b 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -1,7 +1,7 @@ -# X-Road Adapter Example +# X-Road Example Adapter -X-Road Adapter Example provides an example implementation of a web service that is compatible with the X-Road 6 and X-Road 7. The -Adapter Example support the X-Road Message Protocol for SOAP version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). +X-Road Example Adapter provides an example implementation of a web service that is compatible with the X-Road 6 and X-Road 7. The +Example Adapter support the X-Road Message Protocol for SOAP version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). The implementation is based on the [XRd4J](https://github.com/nordic-institute/xrd4j) library. The Example Adapter contains a single class that implements four services: From 17af1dc3e0fc6709a936e3eed7524267bf4610fe Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sun, 26 Feb 2023 09:02:59 +0200 Subject: [PATCH 08/73] Update readme --- example-adapter/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example-adapter/README.md b/example-adapter/README.md index 2d46c4b..c3d2a83 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -108,7 +108,7 @@ This section provides examples for calling the service after it is deployed and An example [SOAP request](examples/getRandomRequest.xml) (available in the `examples` directory). -Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `getRandom` service: +At the project root, the following command will call `getRandom` service: ```bash curl -d @examples/getRandomRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint @@ -120,7 +120,7 @@ An example of the corresponding [SOAP response](examples/getRandomResponse.xml) An example [SOAP request](examples/helloServiceRequest.xml) (available in the `examples` directory). -Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `helloService`: +At the project root, the following command will call `helloService`: ```bash curl -d @examples/helloServiceRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint @@ -132,7 +132,7 @@ An example of the corresponding [SOAP response](examples/helloServiceResponse.xm An example [SOAP request](examples/listPeopleRequest.xml) (available in the `examples` directory). -Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `listPeople`: +At the project root, the following command will call `listPeople`: ```bash curl -d @examples/listPeopleRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint @@ -144,7 +144,7 @@ An example of the corresponding [SOAP response](examples/listPeopleResponse.xml) An example [SOAP request](examples/personDetailsRequest.xml) (available in the `examples` directory). -Be sure to replace `x.x.x` in the command with the actual version. If at the project root, the following command will call `personDetails`: +At the project root, the following command will call `personDetails`: ```bash curl -d @examples/personDetailsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint From 709f2b7043f0b995eac5a7b551e7a0694685c6b2 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sun, 26 Feb 2023 09:10:29 +0200 Subject: [PATCH 09/73] Add Dependency Check Maven plugin --- .../dependency-check-suppressions.xml | 19 +++++++++++++++++ example-adapter/pom.xml | 21 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 example-adapter/dependency-check-suppressions.xml diff --git a/example-adapter/dependency-check-suppressions.xml b/example-adapter/dependency-check-suppressions.xml new file mode 100644 index 0000000..aaa7660 --- /dev/null +++ b/example-adapter/dependency-check-suppressions.xml @@ -0,0 +1,19 @@ + + + + + ^pkg:maven/org\.yaml/snakeyaml@.*$ + + CVE-2022-1471 + + + + ^pkg:maven/org\.springframework/spring\-web@.*$ + + CVE-2016-1000027 + + diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index 2944ccb..ea09b14 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -211,6 +211,27 @@ + + org.owasp + dependency-check-maven + 8.1.0 + + 24 + false + false + false + + dependency-check-suppressions.xml + + + + + + check + + + + package From d417234ec2d5e2c82f54a6143b011d68a9b8920d Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Mon, 6 Mar 2023 12:36:18 +0200 Subject: [PATCH 10/73] Updates based on review comments --- example-adapter/README.md | 10 +++++----- example-adapter/Setting-up-Development-Environment.md | 6 +++--- example-adapter/pom.xml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/example-adapter/README.md b/example-adapter/README.md index c3d2a83..03eb787 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -63,24 +63,24 @@ Build X-Road Example Adapter and deploy it to a Java application server, e.g., T You can create a Docker image to run X-Road Example Adapter inside a container, using the provided Dockerfile. Before building the image, you must build the war file. -``` -mvn clean install +```bash +mvn clean verify ``` If you have not built the war, building the Docker image will fail with message -``` +```bash Step 2 : ADD src/target/example-adapter-*.war example-adapter.war No source files were specified ``` While you are in the project root directory, build the image using the `docker build` command. The `-t` parameter gives your image a tag, so you can run it more easily later. Don’t forget the `.` command, which tells the `docker build` command to look in the current directory for a file called Dockerfile. -``` +```bash docker build -t example-adapter . ``` After building the image, you can run X-Road Test Service using it. -``` +```bash docker run -p 8080:8080 example-adapter ``` diff --git a/example-adapter/Setting-up-Development-Environment.md b/example-adapter/Setting-up-Development-Environment.md index 96e5495..8621027 100644 --- a/example-adapter/Setting-up-Development-Environment.md +++ b/example-adapter/Setting-up-Development-Environment.md @@ -11,7 +11,7 @@ This document describes how a developer's workstation can be setup. The Example Adapter project is a part of the XRd4J git repository. You can access the source code by cloning it: -``` +```bash git clone https://github.com/nordic-institute/xrd4j.git ``` @@ -21,8 +21,8 @@ The Example Adapter is a separate Maven project and can be found under the `exam Example Adapter uses Maven as the build management tool. In order to build the whole project and generate the WAR-file (`example-adapter-x.x.x-SNAPSHOT.war`), you must run the maven command below from the project root directory. -``` -mvn clean install +```bash +mvn clean verify ``` Running the above maven command generates the WAR-file under the directory presented below (`x.x.x` being replaced by the version): diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index ea09b14..99ff94c 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -214,7 +214,7 @@ org.owasp dependency-check-maven - 8.1.0 + 8.1.2 24 false From 9d2e54f58e3b0010a946ad70d74e822de7c7c9c5 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Tue, 24 Oct 2023 11:58:25 +0300 Subject: [PATCH 11/73] Update Docker file --- example-adapter/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example-adapter/Dockerfile b/example-adapter/Dockerfile index dfb5eaf..fce0ea0 100644 --- a/example-adapter/Dockerfile +++ b/example-adapter/Dockerfile @@ -2,10 +2,10 @@ FROM eclipse-temurin:11-jre # Add Rest Gateway jar to container -ADD target/example-adapter-*.jar example-adapter.jar +ADD target/example-adapter-*.war example-adapter.war # Entry in json format -ENTRYPOINT ["java", "-jar", "/example-adapter.jar"] +ENTRYPOINT ["java", "-jar", "/example-adapter.war"] # Expose Tomcat EXPOSE 8080 From 6907d3b89753c26d3387fdc83215905316488538 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Mon, 29 Jan 2024 10:36:49 +0200 Subject: [PATCH 12/73] Add ORT configuration file --- .ort.yml | 55 ++++++++++++++++++++++++++++++++++++++++ example-adapter/.ort.yml | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 .ort.yml create mode 100644 example-adapter/.ort.yml diff --git a/.ort.yml b/.ort.yml new file mode 100644 index 0000000..2effb66 --- /dev/null +++ b/.ort.yml @@ -0,0 +1,55 @@ +--- +excludes: + paths: + - pattern: "3RD-PARTY-NOTICES.txt" + reason: "OTHER" + comment: "File including 3rd party license notices." + + - pattern: "example-adapter/**" + reason: "EXAMPLE_OF" + comment: "This directory contains an example app that's not distributed." + + - pattern: "examples/**" + reason: "EXAMPLE_OF" + comment: "This directory contains examples that are not distributed." + + - pattern: "documentation/**" + reason: "DOCUMENTATION_OF" + comment: "This directory contains documentation that's not distributed." + + scopes: + - pattern: "checkstyle" + reason: "BUILD_DEPENDENCY_OF" + comment: "Packages for code styling checks (testing) only." + + - pattern: "devDependencies" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "jacocoAgent" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for code coverage (testing) only." + + - pattern: "jacocoAnt" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for code coverage (testing) only." + + - pattern: "test.*" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for testing only." + + - pattern: "annotationProcessor" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "compileClasspath" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "compileOnly" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "provided" + reason: "RUNTIME_DEPENDENCY_OF" + comment: "Packages that are provided by the runtime." diff --git a/example-adapter/.ort.yml b/example-adapter/.ort.yml new file mode 100644 index 0000000..593b461 --- /dev/null +++ b/example-adapter/.ort.yml @@ -0,0 +1,55 @@ +--- +excludes: + paths: + - pattern: "3RD-PARTY-NOTICES.txt" + reason: "OTHER" + comment: "File including 3rd party license notices." + + - pattern: "src/**" + reason: "OTHER" + comment: "This directory contains the library which use this example app demonstrates." + + - pattern: "examples/**" + reason: "EXAMPLE_OF" + comment: "This directory contains examples that are not distributed." + + - pattern: "documentation/**" + reason: "DOCUMENTATION_OF" + comment: "This directory contains documentation that's not distributed." + + scopes: + - pattern: "checkstyle" + reason: "BUILD_DEPENDENCY_OF" + comment: "Packages for code styling checks (testing) only." + + - pattern: "devDependencies" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "jacocoAgent" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for code coverage (testing) only." + + - pattern: "jacocoAnt" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for code coverage (testing) only." + + - pattern: "test.*" + reason: "TEST_DEPENDENCY_OF" + comment: "Packages for testing only." + + - pattern: "annotationProcessor" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "compileClasspath" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "compileOnly" + reason: "DEV_DEPENDENCY_OF" + comment: "Packages for development only." + + - pattern: "provided" + reason: "RUNTIME_DEPENDENCY_OF" + comment: "Packages that are provided by the runtime." From b6817eb225df86f3f1c3581e8bf94fe03d068caf Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 29 Jan 2024 17:27:56 +0100 Subject: [PATCH 13/73] build(Maven): Fix SCM metadata in the parent POM The `connection` is only supposed to require read-access and ideally can be used anonymously, so use HTTPS instead SSH as a Git transport. The `url` should point to "A publicly browsable repository", not a Git clone URL, so fix this as well. See [1] for context. [1]: https://maven.apache.org/pom.html#SCM Signed-off-by: Sebastian Schuberth --- src/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pom.xml b/src/pom.xml index fa7e0e2..62e8234 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -75,9 +75,9 @@ - scm:git:git@github.com:nordic-institute/xrd4j.git + scm:git:https://github.com/nordic-institute/xrd4j.git scm:git:git@github.com:nordic-institute/xrd4j.git - git@github.com:nordic-institute/xrd4j.git + https://github.com/nordic-institute/xrd4j From 6700f1ead191ae07d87cd8ae691fee457cfee110 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sat, 3 Feb 2024 09:06:20 +0200 Subject: [PATCH 14/73] Update 3rd party dependencies file --- 3RD-PARTY-NOTICES.txt | 4705 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 4578 insertions(+), 127 deletions(-) diff --git a/3RD-PARTY-NOTICES.txt b/3RD-PARTY-NOTICES.txt index 3b9a3c1..9738883 100644 --- a/3RD-PARTY-NOTICES.txt +++ b/3RD-PARTY-NOTICES.txt @@ -1,90 +1,3350 @@ -This project contains or depends on third-party software components pursuant to the following licenses: +This software includes external packages and source code. +The applicable license information is listed below: ---- -Copyright (c) 2002 Kevin Atkinson (kevina@gnu.org) -Copyright 1999-2020 The Apache Software Foundation - -The Apache Software License, Version 1.1 - -Copyright (c) 2000 The Apache Software Foundation. All rights -reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -3. The end-user documentation included with the redistribution, - if any, must include the following acknowledgment: - "This product includes software developed by the - Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, - if and wherever such third-party acknowledgments normally appear. - -4. The names "Apache" and "Apache Software Foundation" must - not be used to endorse or promote products derived from this - software without prior written permission. For written - permission, please contact apache@apache.org. - -5. Products derived from this software may not be called "Apache", - nor may "Apache" appear in their name, without prior written - permission of the Apache Software Foundation. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + -- + +Copyright (c) 2018 Nordic Institute for Interoperability Solutions (NIIS) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---- + +This software depends on external packages and source code. +The applicable license information is listed below: + +---- + +Package: com.sun.xml.messaging.saaj:saaj-impl:1.3.28 + +The following copyrights and licenses were found in the source code of this package: + +Copyright (c) 1997-2017 Oracle and/or its affiliates + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 + +1. Definitions. + +1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications. +1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. +1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. +1.4. "Executable" means the Covered Software in any form other than Source Code. +1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License. +1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. +1.7. "License" means this document. +1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. +1.9. "Modifications" means the Source Code and Executable form of any of the following: +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; +B. Any new file that contains any part of the Original Software or previous Modification; or +C. Any new file that is contributed or otherwise made available under the terms of this License. +1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License. +1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. +1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. +1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. +3. Distribution Obligations. + +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. +4. Versions of the License. + +4.1. New Versions. +Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. +6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. +6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + + -- + +Copyright (c) 1997-2017 Oracle and/or its affiliates + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +Linking this library statically or dynamically with other modules is making a +combined work based on this library. Thus, the terms and conditions of the GNU +General Public License cover the whole combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent modules, and to +copy and distribute the resulting executable under terms of your choice, +provided that you also meet, for each linked independent module, the terms and +conditions of the license of that module. An independent module is a module +which is not derived from or based on this library. If you modify this library, +you may extend this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this exception statement +from your version. + +---- + +Package: commons-codec:commons-codec:1.11 + +The following copyrights and licenses were found in the source code of this package: + +Copyright (c) 2004-2006 Intel Corportation + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + -- + +Copyright (c) 2004-2006 Intel Corportation + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of the ORGANIZATION nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---- + +Package: commons-logging:commons-logging:1.2 + +The following copyrights and licenses were found in the source code of this package: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---- + +Package: javax.activation:activation:1.1 + +The following copyrights and licenses were found in the source code of this package: + +Copyright 1997-2005 Sun Microsystems, Inc. + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; B. Any new file that contains any part of the Original Software or previous Modification; or C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof); + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License; + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. + +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. + +4.3. Modified Versions. When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + +---- + +Package: javax.xml.soap:javax.xml.soap-api:1.3.8 + +The following copyrights and licenses were found in the source code of this package: + +Copyright (c) 1989, 1991 Free Software Foundation, Inc. +copyrighted by the Free Software Foundation + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; B. Any new file that contains any part of the Original Software or previous Modification; or C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof); + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License; + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. + +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. + +4.3. Modified Versions. When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + +Copyright (c) 2004-2016 Oracle and/or its affiliates + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 + +1. Definitions. + +1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications. +1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. +1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. +1.4. "Executable" means the Covered Software in any form other than Source Code. +1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License. +1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. +1.7. "License" means this document. +1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. +1.9. "Modifications" means the Source Code and Executable form of any of the following: +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; +B. Any new file that contains any part of the Original Software or previous Modification; or +C. Any new file that is contributed or otherwise made available under the terms of this License. +1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License. +1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. +1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. +1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. +3. Distribution Obligations. + +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. +4. Versions of the License. + +4.1. New Versions. +Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. +6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. +6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + +Copyright (c) 1989, 1991 Free Software Foundation, Inc. +Copyright (c) 2004-2016 Oracle and/or its affiliates +copyrighted by the Free Software Foundation + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +Linking this library statically or dynamically with other modules is making a +combined work based on this library. Thus, the terms and conditions of the GNU +General Public License cover the whole combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent modules, and to +copy and distribute the resulting executable under terms of your choice, +provided that you also meet, for each linked independent module, the terms and +conditions of the license of that module. An independent module is a module +which is not derived from or based on this library. If you modify this library, +you may extend this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this exception statement +from your version. + +---- + +Package: javax.xml.stream:stax-api:1.0-2 + +The following copyrights and licenses were found in the source code of this package: + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; B. Any new file that contains any part of the Original Software or previous Modification; or C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof); + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License; + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. + +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. + +4.3. Modified Versions. When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + +---- + +Package: org.apache.httpcomponents:httpclient:4.5.14 + +The following copyrights and licenses were found in the source code of this package: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---- + +Package: org.apache.httpcomponents:httpcore:4.4.16 + +The following copyrights and licenses were found in the source code of this package: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. ---- -Copyright (C) Ant Elder -Copyright (C) Apache -Copyright (C) Asankha C. Perera -Copyright (C) Brian Stansberry -Copyright (C) Daniel Rall -Copyright (C) David Graham -Copyright (C) Erik Abele -Copyright (C) Francois-Xavier Bonnet -Copyright (C) Gary Gregory -Copyright (C) Henri Yandell -Copyright (C) Jon S. Stevens -Copyright (C) Jonathan Moore -Copyright (C) Julius Davies -Copyright (C) Juozas Baliuka -Copyright (C) Karl Wright -Copyright (C) Oleg Kalnichevski -Copyright (C) Ortwin Glueck -Copyright (C) Paul Fremantle -Copyright (C) Peter Donald -Copyright (C) Rodney Waldhoff -Copyright (C) Roland Weber -Copyright (C) Sam Berlin -Copyright (C) Scott Sanders -Copyright (C) Sean C. Sullivan -Copyright (C) Sebastian Bazley -Copyright (C) The Apache Software Foundation -Copyright (C) Thomas Neidhart -Copyright (C) Tim OBrien -Copyright (C) William Speirs -Copyright (c) 2002 Kevin Atkinson (kevina@gnu.org) -Copyright (c) 2008 Alexander Beider & Stephen P. Morse -Copyright 1999-2020 The Apache Software Foundation +Package: org.json:json:20220924 + +The following copyrights and licenses were found in the source code of this package: + +Copyright 2015 the original author or authors Apache License Version 2.0, January 2004 @@ -290,68 +3550,1259 @@ Copyright 1999-2020 The Apache Software Foundation ---- -Copyright (c) 2004-2006 Intel Corportation +Package: org.jvnet.mimepull:mimepull:1.9.7 -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +The following copyrights and licenses were found in the source code of this package: -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. +Copyright (c) 1997-2015 Oracle and/or its affiliates -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 -Neither the name of the ORGANIZATION nor the names of its contributors may be -used to endorse or promote products derived from this software without specific -prior written permission. +1. Definitions. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications. +1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. +1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. +1.4. "Executable" means the Covered Software in any form other than Source Code. +1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License. +1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. +1.7. "License" means this document. +1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. +1.9. "Modifications" means the Source Code and Executable form of any of the following: +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; +B. Any new file that contains any part of the Original Software or previous Modification; or +C. Any new file that is contributed or otherwise made available under the terms of this License. +1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License. +1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. +1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. +1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. +3. Distribution Obligations. + +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. +4. Versions of the License. + +4.1. New Versions. +Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. +6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. +6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + +Copyright (c) 1997-2015 Oracle and/or its affiliates + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +Linking this library statically or dynamically with other modules is making a +combined work based on this library. Thus, the terms and conditions of the GNU +General Public License cover the whole combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent modules, and to +copy and distribute the resulting executable under terms of your choice, +provided that you also meet, for each linked independent module, the terms and +conditions of the license of that module. An independent module is a module +which is not derived from or based on this library. If you modify this library, +you may extend this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this exception statement +from your version. ---- -Copyright (C) Douglas Crockford -Copyright (c) 2002, 2006, 2008, 2015, 2018 JSON.org +Package: org.jvnet.staxex:stax-ex:1.7.8 -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +The following copyrights and licenses were found in the source code of this package: -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. +Copyright (c) 1997-2015 Oracle and/or its affiliates -The Software shall be used for Good, not Evil. +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +1. Definitions. + +1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications. +1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. +1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. +1.4. "Executable" means the Covered Software in any form other than Source Code. +1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License. +1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. +1.7. "License" means this document. +1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. +1.9. "Modifications" means the Source Code and Executable form of any of the following: +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; +B. Any new file that contains any part of the Original Software or previous Modification; or +C. Any new file that is contributed or otherwise made available under the terms of this License. +1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License. +1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. +1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. +1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. +3. Distribution Obligations. + +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. +4. Versions of the License. + +4.1. New Versions. +Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. +6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. +6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + -- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + + -- + +Copyright (c) 1997-2015 Oracle and/or its affiliates + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +Linking this library statically or dynamically with other modules is making a +combined work based on this library. Thus, the terms and conditions of the GNU +General Public License cover the whole combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent modules, and to +copy and distribute the resulting executable under terms of your choice, +provided that you also meet, for each linked independent module, the terms and +conditions of the license of that module. An independent module is a module +which is not derived from or based on this library. If you modify this library, +you may extend this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this exception statement +from your version. ---- -Copyright (C) Ceki Gulcu -Copyright (C) Nordic Institute for Interoperability Solutions (NIIS) -Copyright (C) Petteri Kivimäki -Copyright (C) Population Register Centre (VRK) -Copyright (C) QOS.ch +Package: org.slf4j:slf4j-api:1.7.30 + +The following copyrights and licenses were found in the source code of this package: + Copyright (c) 2004-2011 QOS.ch -Copyright (c) 2018 Nordic Institute for Interoperability Solutions (NIIS) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 48eb1f8efca671c303b70f561627cfa6cb24ea28 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Wed, 14 Feb 2024 09:44:11 +0200 Subject: [PATCH 15/73] Update ORT configuration --- .ort.yml | 13 +++++++++++++ example-adapter/.ort.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.ort.yml b/.ort.yml index 2effb66..c1a27a0 100644 --- a/.ort.yml +++ b/.ort.yml @@ -53,3 +53,16 @@ excludes: - pattern: "provided" reason: "RUNTIME_DEPENDENCY_OF" comment: "Packages that are provided by the runtime." + +license_choices: + repository_license_choices: + - given: "GPL-2.0-only OR Apache-2.0" + choice: "Apache-2.0" + - given: "GPL-2.0-only OR BSD-3-Clause" + choice: "BSD-3-Clause" + - given: "GPL-2.0-only OR CDDL-1.1" + choice: "CDDL-1.1" + - given: "CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0" + choice: "CDDL-1.1" + - given: "GPL-2.0-only OR CDDL-1.0" + choice: "CDDL-1.0" \ No newline at end of file diff --git a/example-adapter/.ort.yml b/example-adapter/.ort.yml index 593b461..f97f1a4 100644 --- a/example-adapter/.ort.yml +++ b/example-adapter/.ort.yml @@ -53,3 +53,16 @@ excludes: - pattern: "provided" reason: "RUNTIME_DEPENDENCY_OF" comment: "Packages that are provided by the runtime." + +license_choices: + repository_license_choices: + - given: "GPL-2.0-only OR Apache-2.0" + choice: "Apache-2.0" + - given: "GPL-2.0-only OR BSD-3-Clause" + choice: "BSD-3-Clause" + - given: "GPL-2.0-only OR CDDL-1.1" + choice: "CDDL-1.1" + - given: "CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0" + choice: "CDDL-1.1" + - given: "GPL-2.0-only OR CDDL-1.0" + choice: "CDDL-1.0" \ No newline at end of file From 583de2038d44dfdfe6f82e623b78bad3dfabd97f Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Wed, 13 Mar 2024 18:56:36 +0200 Subject: [PATCH 16/73] Update ORT configuration --- .ort.yml | 7 ++++++- example-adapter/.ort.yml | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.ort.yml b/.ort.yml index c1a27a0..d8e9a15 100644 --- a/.ort.yml +++ b/.ort.yml @@ -65,4 +65,9 @@ license_choices: - given: "CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0" choice: "CDDL-1.1" - given: "GPL-2.0-only OR CDDL-1.0" - choice: "CDDL-1.0" \ No newline at end of file + choice: "CDDL-1.0" + +- id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" + curations: + comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "CDDL-1.1" \ No newline at end of file diff --git a/example-adapter/.ort.yml b/example-adapter/.ort.yml index f97f1a4..2d18740 100644 --- a/example-adapter/.ort.yml +++ b/example-adapter/.ort.yml @@ -65,4 +65,13 @@ license_choices: - given: "CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0" choice: "CDDL-1.1" - given: "GPL-2.0-only OR CDDL-1.0" - choice: "CDDL-1.0" \ No newline at end of file + choice: "CDDL-1.0" + +- id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" + curations: + comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "CDDL-1.1" +- id: "pkg:maven/org.yaml/snakeyaml@1.33" + curations: + comment: "The Apache-2.0 licensed package has a file which also offers a choice of multiple other licenses and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "Apache-2.0" \ No newline at end of file From 0f1bbba20550f1842bcfa364ee9cb674cfbd5613 Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Thu, 14 Mar 2024 11:34:23 +0200 Subject: [PATCH 17/73] Update ORT configuration --- .ort.yml | 10 ++++++---- example-adapter/.ort.yml | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.ort.yml b/.ort.yml index d8e9a15..7729868 100644 --- a/.ort.yml +++ b/.ort.yml @@ -67,7 +67,9 @@ license_choices: - given: "GPL-2.0-only OR CDDL-1.0" choice: "CDDL-1.0" -- id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" - curations: - comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." - concluded_license: "CDDL-1.1" \ No newline at end of file +curations: + packages: + - id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" + curations: + comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "CDDL-1.1" \ No newline at end of file diff --git a/example-adapter/.ort.yml b/example-adapter/.ort.yml index 2d18740..287acec 100644 --- a/example-adapter/.ort.yml +++ b/example-adapter/.ort.yml @@ -67,11 +67,13 @@ license_choices: - given: "GPL-2.0-only OR CDDL-1.0" choice: "CDDL-1.0" -- id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" - curations: - comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." - concluded_license: "CDDL-1.1" -- id: "pkg:maven/org.yaml/snakeyaml@1.33" - curations: - comment: "The Apache-2.0 licensed package has a file which also offers a choice of multiple other licenses and we use the curation to override the choice mechanism due to a pending issue in ORT." - concluded_license: "Apache-2.0" \ No newline at end of file +curations: + packages: + - id: "Maven:com.sun.xml.messaging.saaj:saaj-impl:1.3.28" + curations: + comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "CDDL-1.1" + - id: "pkg:maven/org.yaml/snakeyaml@1.33" + curations: + comment: "The Apache-2.0 licensed package has a file which also offers a choice of multiple other licenses and we use the curation to override the choice mechanism due to a pending issue in ORT." + concluded_license: "Apache-2.0" \ No newline at end of file From 7c23a76224c3492f402433ef7e5abd1feed9aacb Mon Sep 17 00:00:00 2001 From: "petteri.kivimaki" Date: Sat, 16 Mar 2024 15:22:15 +0200 Subject: [PATCH 18/73] Update ORT configuration --- example-adapter/.ort.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example-adapter/.ort.yml b/example-adapter/.ort.yml index 287acec..da11838 100644 --- a/example-adapter/.ort.yml +++ b/example-adapter/.ort.yml @@ -73,7 +73,7 @@ curations: curations: comment: "The package offers GPL-2.0-only OR CDDL-1.1 and we use the curation to override the choice mechanism due to a pending issue in ORT." concluded_license: "CDDL-1.1" - - id: "pkg:maven/org.yaml/snakeyaml@1.33" + - id: "Maven:org.yaml:snakeyaml:1.33" curations: comment: "The Apache-2.0 licensed package has a file which also offers a choice of multiple other licenses and we use the curation to override the choice mechanism due to a pending issue in ORT." concluded_license: "Apache-2.0" \ No newline at end of file From bb712ce71534e391fb163a7273eed7d54b5762ae Mon Sep 17 00:00:00 2001 From: justasnortal <113103740+justasnortal@users.noreply.github.com> Date: Thu, 6 Jun 2024 05:25:58 -0700 Subject: [PATCH 19/73] Added operations to example-adapter for soap attachments testing (#32) * fix cloning the soap message when the source message contains attachments * add operations to example-adapter for attachment testing * getAttachments and storeAttachments examples --- example-adapter/README.md | 24 ++++ .../examples/getAttachmentsRequest.xml | 28 ++++ .../examples/getAttachmentsResponse.txt | 54 ++++++++ .../examples/storeAttachmentsRequest.txt | 47 +++++++ .../examples/storeAttachmentsResponse.xml | 33 +++++ example-adapter/pom.xml | 2 +- .../xrd4j/exampleadapter/ExampleAdapter.java | 128 +++++++++++++++++- .../src/main/resources/example-adapter.wsdl | 118 ++++++++++++++++ .../niis/xrd4j/common/util/SOAPHelper.java | 13 +- 9 files changed, 431 insertions(+), 16 deletions(-) create mode 100644 example-adapter/examples/getAttachmentsRequest.xml create mode 100644 example-adapter/examples/getAttachmentsResponse.txt create mode 100644 example-adapter/examples/storeAttachmentsRequest.txt create mode 100644 example-adapter/examples/storeAttachmentsResponse.xml diff --git a/example-adapter/README.md b/example-adapter/README.md index 03eb787..8e0ee92 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -151,3 +151,27 @@ curl -d @examples/personDetailsRequest.xml --header "Content-Type: text/xml" -X ``` An example of the corresponding [SOAP response](examples/personDetailsResponse.xml) (available in the `examples` directory). + +### storeAttachments + +An example [multipart MIME request](examples/storeAttachmentsRequest.txt) (available in the `examples` directory). + +At the project root, the following command will call `storeAttachments`: + +```bash +curl -X POST -H "Content-Type: multipart/related; start=\"\"; boundary=MIME_boundary" --data-binary @examples/storeAttachmentsRequest.txt -X POST http://localhost:8080/example-adapter/Endpoint +``` + +An example of the corresponding [SOAP response](examples/storeAttachmentsResponse.xml) (available in the `examples` directory). + +### getAttachments + +An example [SOAP request](examples/getAttachmentsRequest.xml) (available in the `examples` directory). + +At the project root, the following command will call `getAttachments`: + +```bash +curl -d @examples/getAttachmentsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint +``` + +The response is multipart MIME message containing SOAP response and attachments. An example of the corresponding [response](examples/getAttachmentsResponse.txt) (available in the `examples` directory). \ No newline at end of file diff --git a/example-adapter/examples/getAttachmentsRequest.xml b/example-adapter/examples/getAttachmentsRequest.xml new file mode 100644 index 0000000..d52936f --- /dev/null +++ b/example-adapter/examples/getAttachmentsRequest.xml @@ -0,0 +1,28 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + getAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + 100 + 50 + + + diff --git a/example-adapter/examples/getAttachmentsResponse.txt b/example-adapter/examples/getAttachmentsResponse.txt new file mode 100644 index 0000000..63b0eb0 --- /dev/null +++ b/example-adapter/examples/getAttachmentsResponse.txt @@ -0,0 +1,54 @@ +HTTP/1.1 200 +Content-Type: multipart/related;type="text/xml";boundary="----=_Part_1_1233349898.1717673591032";charset=UTF-8 +Content-Length: 1926 +Date: Thu, 06 Jun 2024 11:33:11 GMT +Keep-Alive: timeout=60 +Connection: keep-alive + +------=_Part_1_1233349898.1717673591032 +Content-Type: text/xml; charset=utf-8 + + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + getAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + attachment_0_100 + 100 + + + attachment_1_50 + 50 + + + + +------=_Part_1_1233349898.1717673591032 +Content-Type: application/octet-stream +Content-ID: attachment_0_100 + +gtwunexdnrkgpyywdflxsfvuvsbgzmwwwllgwlutnqxpgkurdokgvreypgbkbnwdepsvbbqqnofydkwoinlwmlxejttvcmrpcwkb +------=_Part_1_1233349898.1717673591032 +Content-Type: application/octet-stream +Content-ID: attachment_1_50 + +juyjrkrizxziugllsjujasxwyadymwssrbndulsojmxvpjcqws +------=_Part_1_1233349898.1717673591032-- diff --git a/example-adapter/examples/storeAttachmentsRequest.txt b/example-adapter/examples/storeAttachmentsRequest.txt new file mode 100644 index 0000000..32aca46 --- /dev/null +++ b/example-adapter/examples/storeAttachmentsRequest.txt @@ -0,0 +1,47 @@ +--MIME_boundary +Content-Type: text/xml; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-ID: + + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + storeAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + + +--MIME_boundary +Content-Type: application/octet-stream; name=attachment-1 +Content-Transfer-Encoding: binary +Content-ID: attachment-1 +Content-Disposition: attachment; name="attachment-1"; filename="attachment-1" + +attachment 1 content + +--MIME_boundary +Content-Type: application/octet-stream; name=attachment-2 +Content-Transfer-Encoding: binary +Content-ID: attachment-2 +Content-Disposition: attachment; name="attachment-2"; filename="attachment-2" + +attachment 2 + +--MIME_boundary-- diff --git a/example-adapter/examples/storeAttachmentsResponse.xml b/example-adapter/examples/storeAttachmentsResponse.xml new file mode 100644 index 0000000..68dfe73 --- /dev/null +++ b/example-adapter/examples/storeAttachmentsResponse.xml @@ -0,0 +1,33 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + storeAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + attachment-1 + 21 + + + attachment-2 + 13 + + + + \ No newline at end of file diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index 99ff94c..198f570 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -21,7 +21,7 @@ 2.7.9 - 0.4.0 + 0.5.0-SNAPSHOT 2.0.6 1.8 UTF-8 diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index ffe3046..7d000ae 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * @@ -35,9 +35,14 @@ import org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer; import org.niis.xrd4j.server.serializer.ServiceResponseSerializer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Random; +import javax.xml.soap.AttachmentPart; import javax.xml.soap.Node; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; @@ -170,7 +175,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep logger.info("Process \"personDetails\" service."); // Create a new response serializer that serializes the response // to SOAP - serializer = new PersonDetailsResponseSerializere(); + serializer = new PersonDetailsResponseSerializer(); // Create a custom request deserializer that parses the request // data from the SOAP request CustomRequestDeserializer customDeserializer = new PersonDetailsRequestDeserializer(); @@ -201,6 +206,67 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // Return the response - AbstractAdapterServlet takes care of // the rest return response; + } else if ("getAttachments".equals(request.getProducer().getServiceCode())) { + logger.info("Process \"getAttachments\" service."); + // Create a new response serializer that serializes the response + // to SOAP + serializer = new AttachmentsResponseSerializer(); + // Create a custom request deserializer that parses the request + // data from the SOAP request + CustomRequestDeserializer customDeserializer = new GetAttachmentsRequestDeserializer(); + // Parse the request data from the request + customDeserializer.deserialize(request, this.namespaceDeserialize); + // Create a new ServiceResponse object + ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + // Set namespace of the SOAP response + response.getProducer().setNamespaceUrl(this.namespaceSerialize); + response.getProducer().setNamespacePrefix(this.prefix); + logger.debug("Do message prosessing..."); + + Map attachments = new HashMap<>(); + List requestedSizes = (List) request.getRequestData(); + for (int i = 0; i < requestedSizes.size(); i++) { + attachments.put(String.format("attachment_%d_%d", i, requestedSizes.get(i)), requestedSizes.get(i)); + } + response.setResponseData(attachments); + + logger.debug("Message prosessing done!"); + // Serialize the response to SOAP + serializer.serialize(response, request); + // add the attachment parts + for (Map.Entry file: attachments.entrySet()) { + AttachmentPart attachmentPart = response.getSoapMessage().createAttachmentPart(generateCharacters(file.getValue()), + "application/octet-stream"); + attachmentPart.setContentId(file.getKey()); + response.getSoapMessage().addAttachmentPart(attachmentPart); + } + return response; + } else if ("storeAttachments".equals(request.getProducer().getServiceCode())) { + logger.info("Process \"storeAttachments\" service."); + // Create a new response serializer that serializes the response + // to SOAP + serializer = new AttachmentsResponseSerializer(); + // Create a new ServiceResponse object + ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + // Set namespace of the SOAP response + response.getProducer().setNamespaceUrl(this.namespaceSerialize); + response.getProducer().setNamespacePrefix(this.prefix); + logger.debug("Do message prosessing..."); + + Map attachments = new HashMap<>(); + Iterator it = request.getSoapMessage().getAttachments(); + if (it != null) { + while (it.hasNext()) { + AttachmentPart attachment = (AttachmentPart) it.next(); + attachments.put(attachment.getContentId(), attachment.getSize()); + } + } + response.setResponseData(attachments); + + logger.debug("Message prosessing done!"); + // Serialize the response to SOAP + serializer.serialize(response, request); + return response; } // No service matching the service code in the request was found - // and error is returned @@ -212,13 +278,23 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep return response; } + private String generateCharacters(Integer size) { + Random random = new Random(); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < size; i++) { + // Generate a random ASCII code of character between 'a' and 'z' + char randomChar = (char) ('a' + random.nextInt('z' - 'a' + 1)); + sb.append(randomChar); + } + return sb.toString(); + } + /** * This class is responsible for serializing response data of getRandom * service responses. */ private class ServiceResponseSerializerImpl extends AbstractServiceResponseSerializer { - @Override /** * Serializes the response data. * @@ -228,6 +304,7 @@ private class ServiceResponseSerializerImpl extends AbstractServiceResponseSeria * element is added * @param envelope SOAPMessage's SOAPEnvelope object */ + @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { // Add "data" element SOAPElement data = soapResponse.addChildElement(envelope.createName("data")); @@ -242,7 +319,6 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse */ private class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { - @Override /** * Serializes the response data. * @@ -252,6 +328,7 @@ private class HelloServiceResponseSerializer extends AbstractServiceResponseSeri * element is added * @param envelope SOAPMessage's SOAPEnvelope object */ + @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { // Add "message" element SOAPElement data = soapResponse.addChildElement(envelope.createName("message")); @@ -299,7 +376,6 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) throw */ private class ListPeopleResponseSerializer extends AbstractServiceResponseSerializer { - @Override /** * Serializes the response data. * @@ -309,6 +385,7 @@ private class ListPeopleResponseSerializer extends AbstractServiceResponseSerial * element is added * @param envelope SOAPMessage's SOAPEnvelope object */ + @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { // Add "message" element SOAPElement data = soapResponse.addChildElement(envelope.createName("people")); @@ -343,9 +420,8 @@ private void serializePerson(final SOAPEnvelope envelope, final SOAPElement pare * This class is responsible for serializing the response data of the personDetails * service. */ - private class PersonDetailsResponseSerializere extends AbstractServiceResponseSerializer { + private class PersonDetailsResponseSerializer extends AbstractServiceResponseSerializer { - @Override /** * Serializes the response data. * @@ -355,6 +431,7 @@ private class PersonDetailsResponseSerializere extends AbstractServiceResponseSe * element is added * @param envelope SOAPMessage's SOAPEnvelope object */ + @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { // Add "message" element SOAPElement data = soapResponse.addChildElement(envelope.createName("person")); @@ -434,4 +511,41 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) throw return null; } } + + private class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { + + @Override + protected List deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { + if (requestNode == null) { + logger.warn("\"requestNode\" is null. Null is returned."); + return null; + } + List sizes = new ArrayList<>(); + for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { + org.w3c.dom.Node node = requestNode.getChildNodes().item(i); + if (node.getNodeType() == Node.ELEMENT_NODE && "size".equals(node.getLocalName())) { + sizes.add(Integer.parseInt(node.getTextContent())); + } + } + return sizes; + } + } + + private class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { + + @Override + protected void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { + Map attachments = (Map) response.getResponseData(); + for (Map.Entry file : attachments.entrySet()) { + SOAPElement fileElement = soapResponse.addChildElement(envelope.createName("attachment")); + + SOAPElement name = fileElement.addChildElement(envelope.createName("name")); + name.addTextNode(file.getKey()); + + SOAPElement size = fileElement.addChildElement(envelope.createName("size")); + size.addTextNode(Long.toString(file.getValue())); + } + } + } + } diff --git a/example-adapter/src/main/resources/example-adapter.wsdl b/example-adapter/src/main/resources/example-adapter.wsdl index 5727a3d..0f049ab 100644 --- a/example-adapter/src/main/resources/example-adapter.wsdl +++ b/example-adapter/src/main/resources/example-adapter.wsdl @@ -215,6 +215,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -253,6 +283,18 @@ + + + + + + + + + + + + @@ -291,6 +333,14 @@ + + + + + + + + @@ -408,6 +458,74 @@ part="protocolVersion" use="literal"/> + + + v1 + + + + + + + + + + + + + + + + + + + + + + v1 + + + + + + + + + + + + + + + + + + + diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index eb6be69..eabe16f 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * @@ -699,14 +699,11 @@ private static void getXRdPackages(NodeList packages, Map result * @return cloned SOAP message with empty SOAP body */ public static SOAPMessage cloneSOAPMsgWithoutBody(SOAPMessage source) { - SOAPMessage target = toSOAP(toString(source)); - if (target == null) { - LOGGER.debug("Cloned SOAP message is null."); - return null; - } try { - target.getSOAPBody().removeContents(); - return target; + SOAPMessage msg = createSOAPMessage(); + msg.getSOAPPart().setContent(source.getSOAPPart().getContent()); + msg.getSOAPBody().removeContents(); + return msg; } catch (SOAPException ex) { LOGGER.error(ex.getMessage(), ex); return null; From b8d43910f6d59d4f312e8897b6787f8fb4ffaa86 Mon Sep 17 00:00:00 2001 From: justasnortal <113103740+justasnortal@users.noreply.github.com> Date: Thu, 6 Jun 2024 06:05:04 -0700 Subject: [PATCH 20/73] Update README.md (#33) --- example-adapter/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example-adapter/README.md b/example-adapter/README.md index 8e0ee92..dd2eea3 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -10,6 +10,8 @@ a single class that implements four services: * `helloService` : returns a hello message with the given name * `listPeople` : returns a list of mock people * `personDetails` : returns a mock person based on the given `SSN` +* `storeAttachments` : accepts the request with attachments and returns name and size of each attachment +* `getAttachments` : returns the response with attachments. The number of attachments and their size are given in request. The Example Adapter is meant to illustrate the basic level usage of the XRd4J library in processing X-Road messages. @@ -174,4 +176,4 @@ At the project root, the following command will call `getAttachments`: curl -d @examples/getAttachmentsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -The response is multipart MIME message containing SOAP response and attachments. An example of the corresponding [response](examples/getAttachmentsResponse.txt) (available in the `examples` directory). \ No newline at end of file +The response is multipart MIME message containing SOAP response and attachments. An example of the corresponding [response](examples/getAttachmentsResponse.txt) (available in the `examples` directory). From f73342083f29be82aa0f12c05309abcbf8de5809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ri=C4=8Dardas?= Date: Thu, 25 Jul 2024 11:21:27 +0300 Subject: [PATCH 21/73] feat: MTOM endpoint for testing (#35) --- example-adapter/Dockerfile | 2 +- example-adapter/pom.xml | 27 +++ .../xrd4j/exampleadapter/Application.java | 22 ++- .../exampleadapter/mtom/AttachmentSource.java | 57 ++++++ .../exampleadapter/mtom/LazyCollection.java | 68 +++++++ .../xrd4j/exampleadapter/mtom/LazyStream.java | 64 ++++++ .../mtom/MessageMtomGeneratorImpl.java | 112 +++++++++++ .../src/main/resources/identifiers.xsd | 185 ++++++++++++++++++ .../src/main/resources/mtomservice.wsdl | 121 ++++++++++++ example-adapter/src/main/resources/xroad.xsd | 114 +++++++++++ 10 files changed, 768 insertions(+), 4 deletions(-) create mode 100644 example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java create mode 100644 example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java create mode 100644 example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java create mode 100644 example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java create mode 100644 example-adapter/src/main/resources/identifiers.xsd create mode 100644 example-adapter/src/main/resources/mtomservice.wsdl create mode 100644 example-adapter/src/main/resources/xroad.xsd diff --git a/example-adapter/Dockerfile b/example-adapter/Dockerfile index fce0ea0..e5aae94 100644 --- a/example-adapter/Dockerfile +++ b/example-adapter/Dockerfile @@ -5,7 +5,7 @@ FROM eclipse-temurin:11-jre ADD target/example-adapter-*.war example-adapter.war # Entry in json format -ENTRYPOINT ["java", "-jar", "/example-adapter.war"] +ENTRYPOINT ["java", "-Xms64m", "-Xmx256m", "-jar", "/example-adapter.war"] # Expose Tomcat EXPOSE 8080 diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml index 198f570..c7def3d 100644 --- a/example-adapter/pom.xml +++ b/example-adapter/pom.xml @@ -24,6 +24,7 @@ 0.5.0-SNAPSHOT 2.0.6 1.8 + 3.6.3 UTF-8 UTF-8 @@ -36,6 +37,11 @@ org.springframework.boot spring-boot-starter-aop
+ + org.apache.cxf + cxf-spring-boot-starter-jaxws + ${cxf.version} + org.springframework.boot spring-boot-starter-tomcat @@ -232,6 +238,27 @@ + + org.apache.cxf + cxf-codegen-plugin + ${cxf.version} + + + generate-sources + generate-sources + + wsdl2java + + + + + ${project.basedir}/src/main/resources/mtomservice.wsdl + + + + + + package diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java index c52df4b..5b4a706 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -1,17 +1,17 @@ /** * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) - * + *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + *

* The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + *

* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,6 +22,9 @@ */ package org.niis.xrd4j.exampleadapter; +import org.apache.cxf.Bus; +import org.apache.cxf.transport.servlet.CXFServlet; +import org.niis.xrd4j.exampleadapter.mtom.MessageMtomGeneratorImpl; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletRegistrationBean; @@ -29,6 +32,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import javax.xml.ws.Endpoint; + /** * X-Road Example Adapter application entry point */ @@ -46,4 +51,15 @@ public ServletRegistrationBean endpointBean() { bean.setLoadOnStartup(1); return bean; } + + @Bean + public ServletRegistrationBean servletRegistrationBean() { + return new ServletRegistrationBean(new CXFServlet(), "/cxf/*"); + } + + @Bean + public Endpoint messageMtomGeneratorService(Bus bus) { + return Endpoint.publish("/mtomgenerator", new MessageMtomGeneratorImpl()); + + } } diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java new file mode 100644 index 0000000..aaebfb1 --- /dev/null +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java @@ -0,0 +1,57 @@ +/** + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package org.niis.xrd4j.exampleadapter.mtom; + +import javax.activation.DataSource; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +public class AttachmentSource implements DataSource { + + final private InputStream in; + + public AttachmentSource(long size) { + this.in = new LazyStream(size); + } + + @Override + public InputStream getInputStream() throws IOException { + return in; + } + + @Override + public OutputStream getOutputStream() throws IOException { + throw new UnsupportedOperationException("Source does not have output stream"); + } + + @Override + public String getContentType() { + return "application/octet-stream"; + } + + @Override + public String getName() { + return "attachment"; + } +} diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java new file mode 100644 index 0000000..8383586 --- /dev/null +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java @@ -0,0 +1,68 @@ +/** + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package org.niis.xrd4j.exampleadapter.mtom; + +import java.util.AbstractCollection; +import java.util.Iterator; +import java.util.NoSuchElementException; + +public class LazyCollection extends AbstractCollection { + + private final int size; + + public LazyCollection(int size) { + this.size = size; + } + + @Override + public Iterator iterator() { + return new StringProducingIterator(size); + } + + @Override + public int size() { + return size; + } + + private static class StringProducingIterator implements Iterator { + private int size; + + public StringProducingIterator(int size) { + this.size = size; + } + + @Override + public boolean hasNext() { + return size > 0; + } + + @Override + public String next() { + if (size > 0) { + size--; + return String.valueOf(size % 10); + } + throw new NoSuchElementException(); + } + } +} diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java new file mode 100644 index 0000000..cc5ce32 --- /dev/null +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java @@ -0,0 +1,64 @@ +/** + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package org.niis.xrd4j.exampleadapter.mtom; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Random; + +public class LazyStream extends InputStream { + private volatile long size; + private Random rnd = new Random(); + + public LazyStream(long size) { + this.size = size; + } + + @Override + public int read() throws IOException { + if (size > 0) { + size--; + return rnd.nextInt(256); + } + + return -1; + } + + @Override + public int read(byte[] b, int off, int len) throws IOException { + if ( size < 1 ) return -1; + + final int bytesAvailable = ( len > size ) ? (int)size : len; + size -= bytesAvailable; + + if ( off == 0 && bytesAvailable == b.length ) { + // fast path + rnd.nextBytes(b); + } else { + for ( int i = off; i < off + bytesAvailable; i++) { + b[i] = (byte)rnd.nextInt(256); + } + } + return bytesAvailable; + } +} diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java new file mode 100644 index 0000000..637d428 --- /dev/null +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java @@ -0,0 +1,112 @@ +/** + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + *

+ * The MIT License + * ... + */ +/** + * The MIT License + * ... + */ +package org.niis.xrd4j.exampleadapter.mtom; + +import com.niis.test.test.messagegen.*; +import org.apache.cxf.headers.Header; + +import javax.activation.DataHandler; +import javax.annotation.Resource; +import javax.jws.WebService; +import javax.xml.ws.Holder; +import javax.xml.ws.WebServiceContext; +import javax.xml.ws.soap.MTOM; +import java.util.List; + +@WebService(targetNamespace = "http://test.niis.com/test/messagegen", wsdlLocation = "mtomservice.wsdl") +@MTOM +public class MessageMtomGeneratorImpl implements MessageMtomGenerator { + private static final ObjectFactory FACTORY = new ObjectFactory(); + @Resource + private WebServiceContext ctx; + + @Override + public void generateMtom(int payloadSize, int attachmentSize, Integer delay, Holder attachment, Holder message) throws ErrorResponse { + +// GenerateMtomResponseType response = new GenerateMtomResponseType(); + + if (delay != null) { + if (delay < 0) { + createError("Delay must be a positive integer"); + } + + try { + Thread.sleep(delay); + } catch (InterruptedException e) { + // Ignore, but keep status + Thread.currentThread().interrupt(); + } + } + + if (attachment.value != null) { +// response.setAttachment(attachment.value); + /* + try (final InputStream attachmentStream = attachment.value.getInputStream()) { + byte[] buf = new byte[4096]; + while (attachmentStream.read(buf) > 0); + } catch (IOException e) { + createError(e.getMessage()); + } + */ + } + + // Convert bytes to items + final int items = payloadSize / (2 * "".length() + 1 + 1); + + if (payloadSize > 0 && items == 0) { + createError("Unable to create payload, try increasing the size"); + } + + if (items > 0) { + MessageType.Items itemsType = FACTORY.createMessageTypeItems(); + itemsType.getItem().addAll(new LazyCollection(items)); + MessageType messageType = FACTORY.createMessageType(); + messageType.setItems(itemsType); + message.value = messageType; + } + + if (attachmentSize > 0) { + attachment.value = new DataHandler(new AttachmentSource(attachmentSize)); + } + + // Trick to echo all headers back (CXF only) + final List

headers = (List
) ctx.getMessageContext().get(Header.HEADER_LIST); + for (Header header : headers) { + header.setDirection(Header.Direction.DIRECTION_INOUT); + } + + } + + private void createError(String message) throws ErrorResponse { + final ErrorResponseType e = new ErrorResponseType(); + e.setError(message); + throw new ErrorResponse("Error", e); + } +} diff --git a/example-adapter/src/main/resources/identifiers.xsd b/example-adapter/src/main/resources/identifiers.xsd new file mode 100644 index 0000000..968b7c6 --- /dev/null +++ b/example-adapter/src/main/resources/identifiers.xsd @@ -0,0 +1,185 @@ + + + + + Globally unique identifier in the X-Road system. + Identifier consists of object type specifier and list of + hierarchical codes (starting with code that identifiers + the X-Road instance). + + + + + + + + + + + + + + + + + Enumeration for X-Road identifier + types. + + + + + + + + + + + + + + + Identifies the X-Road instance. This field is + applicable to all identifier types. + + + + + Type of the member (company, government + institution, private person, etc.) + + + + + Code that uniquely identifies a member of given + member type. + + + + + Code that uniquely identifies a subsystem of + given X-Road member. + + + + + Code that uniquely identifies a global group in + given X-Road instance. + + + + + Code that uniquely identifies a service offered by + given X-Road member or subsystem. + + + + + Version of the service. + + + + + Code that uniquely identifies security category in + a given X-Road instance. + + + + + Code that uniquely identifies security server + offered by a given X-Road member or + subsystem. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example-adapter/src/main/resources/mtomservice.wsdl b/example-adapter/src/main/resources/mtomservice.wsdl new file mode 100644 index 0000000..7a0c871 --- /dev/null +++ b/example-adapter/src/main/resources/mtomservice.wsdl @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example-adapter/src/main/resources/xroad.xsd b/example-adapter/src/main/resources/xroad.xsd new file mode 100644 index 0000000..7b6a7f4 --- /dev/null +++ b/example-adapter/src/main/resources/xroad.xsd @@ -0,0 +1,114 @@ + + + + + + + + + Identies service client + + + + + Identies the service + that is invoked by the request + + + + + Identies the central service + that is invoked by the request. + + + + + Unique identier + for this message + + + + + User whose action initiated + the request + + + + + Base64 encoded hash of + the SOAP request message + + + + + + + Identies hash algorithm + that was used to calculate the value + of the requestHash field. + + + + + + + + + Identies received application, issue or document + that was the cause of the service request. + + + + + X-Road message protocol version + + + + + + + Version of the service + + + + + Title of the service + + + + + + + + + + + + Notes for user + + + + + + + + + + + + Notes for technical stuff + + + + + + + + + + From 7de81bb858b883e1086492024ed12214ffce82b8 Mon Sep 17 00:00:00 2001 From: justasnortal <113103740+justasnortal@users.noreply.github.com> Date: Thu, 25 Jul 2024 01:22:43 -0700 Subject: [PATCH 22/73] chore: wsdl documention and keeping attachments order in test services (#34) * chore: keeping the order of attachments in test service * docs: wsdl documentation for storeAttachments, getAttachments operations --- .../xrd4j/exampleadapter/ExampleAdapter.java | 24 +++++++++---------- .../src/main/resources/example-adapter.wsdl | 10 ++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index 7d000ae..871adba 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -34,22 +34,22 @@ import org.niis.xrd4j.server.deserializer.CustomRequestDeserializer; import org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer; import org.niis.xrd4j.server.serializer.ServiceResponseSerializer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Random; import javax.xml.soap.AttachmentPart; import javax.xml.soap.Node; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Random; /** * This class implements four simple X-Road 6 and X-Road 7 compatible services: @@ -223,10 +223,10 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep response.getProducer().setNamespacePrefix(this.prefix); logger.debug("Do message prosessing..."); - Map attachments = new HashMap<>(); + Map attachments = new LinkedHashMap<>(); List requestedSizes = (List) request.getRequestData(); for (int i = 0; i < requestedSizes.size(); i++) { - attachments.put(String.format("attachment_%d_%d", i, requestedSizes.get(i)), requestedSizes.get(i)); + attachments.put(String.format("attachment_%d", i), requestedSizes.get(i)); } response.setResponseData(attachments); @@ -253,7 +253,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep response.getProducer().setNamespacePrefix(this.prefix); logger.debug("Do message prosessing..."); - Map attachments = new HashMap<>(); + Map attachments = new LinkedHashMap<>(); Iterator it = request.getSoapMessage().getAttachments(); if (it != null) { while (it.hasNext()) { diff --git a/example-adapter/src/main/resources/example-adapter.wsdl b/example-adapter/src/main/resources/example-adapter.wsdl index 0f049ab..9eac376 100644 --- a/example-adapter/src/main/resources/example-adapter.wsdl +++ b/example-adapter/src/main/resources/example-adapter.wsdl @@ -334,10 +334,20 @@ message="tns:personDetailsResponse"/> + + Store attachments service + This service accepts attachments in request and returns name and size in the response. + No attachments are actually stored. + + + + Get attachments service + This service generates and returns random attachments with the provided sizes. + From 2a1b88b64ba52c868c6c6c985693d9c371537040 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 11 Jun 2024 15:21:24 +0300 Subject: [PATCH 23/73] build: initial maven to gradle migration Refs: XRDDEV-2628 --- .gitignore | 2 + src/build.gradle.kts | 0 src/buildSrc/build.gradle.kts | 9 + .../kotlin/xrd4j.java-conventions.gradle.kts | 38 +++ src/client/build.gradle.kts | 12 + src/common/build.gradle.kts | 6 + src/gradle/libs.versions.toml | 14 + src/gradle/wrapper/gradle-wrapper.properties | 7 + src/gradlew | 249 ++++++++++++++++++ src/gradlew.bat | 92 +++++++ src/rest/build.gradle.kts | 13 + src/server/build.gradle.kts | 11 + src/settings.gradle.kts | 6 + 13 files changed, 459 insertions(+) create mode 100644 src/build.gradle.kts create mode 100644 src/buildSrc/build.gradle.kts create mode 100644 src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts create mode 100644 src/client/build.gradle.kts create mode 100644 src/common/build.gradle.kts create mode 100644 src/gradle/libs.versions.toml create mode 100644 src/gradle/wrapper/gradle-wrapper.properties create mode 100755 src/gradlew create mode 100644 src/gradlew.bat create mode 100644 src/rest/build.gradle.kts create mode 100644 src/server/build.gradle.kts create mode 100644 src/settings.gradle.kts diff --git a/.gitignore b/.gitignore index 32c2a78..8c64f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.class +.gradle/ +build/ # Mobile Tools for Java (J2ME) .mtj.tmp/ diff --git a/src/build.gradle.kts b/src/build.gradle.kts new file mode 100644 index 0000000..e69de29 diff --git a/src/buildSrc/build.gradle.kts b/src/buildSrc/build.gradle.kts new file mode 100644 index 0000000..50cec87 --- /dev/null +++ b/src/buildSrc/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + // Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. + `kotlin-dsl` +} + +repositories { + // Use the plugin portal to apply community plugins in convention plugins. + gradlePluginPortal() +} diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts new file mode 100644 index 0000000..7e44c27 --- /dev/null +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -0,0 +1,38 @@ +plugins { + `java-library` + `maven-publish` +} + +repositories { + mavenLocal() + maven { + url = uri("https://repo.maven.apache.org/maven2/") + } +} + +dependencies { + api("com.sun.xml.messaging.saaj:saaj-impl:1.3.28") + api("org.slf4j:slf4j-api:1.7.30") + + testImplementation("org.slf4j:slf4j-log4j12:1.7.30") + testImplementation("org.apache.logging.log4j:log4j-core:2.17.1") + testImplementation("junit:junit:4.13.1") +} + +group = "org.niis" +version = "0.5.0-SNAPSHOT" +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +publishing { + publications.create("maven") { + from(components["java"]) + } +} + +tasks.withType() { + options.encoding = "UTF-8" +} + +tasks.withType() { + options.encoding = "UTF-8" +} diff --git a/src/client/build.gradle.kts b/src/client/build.gradle.kts new file mode 100644 index 0000000..a72fc2c --- /dev/null +++ b/src/client/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + id("xrd4j.java-conventions") +} + +dependencies { + api(project(":common")) + api(project(":rest")) +} + +group = "org.niis.xrd4j" +description = "XRd4J :: Client" + diff --git a/src/common/build.gradle.kts b/src/common/build.gradle.kts new file mode 100644 index 0000000..c53e9a3 --- /dev/null +++ b/src/common/build.gradle.kts @@ -0,0 +1,6 @@ +plugins { + id("xrd4j.java-conventions") +} + +group = "org.niis.xrd4j" +description = "XRd4J :: Common" diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml new file mode 100644 index 0000000..4d00c27 --- /dev/null +++ b/src/gradle/libs.versions.toml @@ -0,0 +1,14 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +javax-servlet-servlet-api = "2.5" +org-apache-httpcomponents-httpclient = "4.5.14" +org-apache-httpcomponents-httpcore = "4.4.16" +org-json-json = "20220924" + +[libraries] +javax-servlet-servlet-api = { module = "javax.servlet:servlet-api", version.ref = "javax-servlet-servlet-api" } +org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } +org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } +org-json-json = { module = "org.json:json", version.ref = "org-json-json" } diff --git a/src/gradle/wrapper/gradle-wrapper.properties b/src/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..a441313 --- /dev/null +++ b/src/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/src/gradlew b/src/gradlew new file mode 100755 index 0000000..b740cf1 --- /dev/null +++ b/src/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/src/gradlew.bat b/src/gradlew.bat new file mode 100644 index 0000000..7101f8e --- /dev/null +++ b/src/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/rest/build.gradle.kts b/src/rest/build.gradle.kts new file mode 100644 index 0000000..10c2376 --- /dev/null +++ b/src/rest/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("xrd4j.java-conventions") +} + +dependencies { + api(libs.org.apache.httpcomponents.httpclient) + api(libs.org.apache.httpcomponents.httpcore) + api(libs.org.json.json) + testImplementation(project(":common")) +} + +group = "org.niis.xrd4j" +description = "XRd4J :: Rest" diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts new file mode 100644 index 0000000..b0f16fa --- /dev/null +++ b/src/server/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("xrd4j.java-conventions") +} + +dependencies { + api(project(":common")) + compileOnly(libs.javax.servlet.servlet.api) +} + +group = "org.niis.xrd4j" +description = "XRd4J :: Server" diff --git a/src/settings.gradle.kts b/src/settings.gradle.kts new file mode 100644 index 0000000..b783e6f --- /dev/null +++ b/src/settings.gradle.kts @@ -0,0 +1,6 @@ +rootProject.name = "XRd4J" + +include(":rest") +include(":client") +include(":server") +include(":common") From 801b365a269b5b097cf7dad9adfcaed66980aea3 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 27 Jun 2024 14:11:20 +0300 Subject: [PATCH 24/73] build: produce source and javadoc jars Refs: XRDDEV-2628 --- .../src/main/kotlin/xrd4j.java-conventions.gradle.kts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 7e44c27..88d20b4 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -21,7 +21,12 @@ dependencies { group = "org.niis" version = "0.5.0-SNAPSHOT" -java.sourceCompatibility = JavaVersion.VERSION_1_8 + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + withJavadocJar() + withSourcesJar() +} publishing { publications.create("maven") { From fd8c17b81e2663dd9306fb21707ade01b8275f1a Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 27 Jun 2024 14:59:13 +0300 Subject: [PATCH 25/73] build: checkstyle Refs: XRDDEV-2628 --- .../kotlin/xrd4j.java-conventions.gradle.kts | 7 + src/config/checkstyle/checkstyle.xml | 149 ++++++++++++++++++ src/config/checkstyle/suppressions.xml | 7 + 3 files changed, 163 insertions(+) create mode 100644 src/config/checkstyle/checkstyle.xml create mode 100644 src/config/checkstyle/suppressions.xml diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 88d20b4..e637e67 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -1,6 +1,7 @@ plugins { `java-library` `maven-publish` + checkstyle } repositories { @@ -41,3 +42,9 @@ tasks.withType() { tasks.withType() { options.encoding = "UTF-8" } + +checkstyle { + // TODO: update to latest version + toolVersion = "6.11.2" + +} diff --git a/src/config/checkstyle/checkstyle.xml b/src/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..4a1e977 --- /dev/null +++ b/src/config/checkstyle/checkstyle.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/checkstyle/suppressions.xml b/src/config/checkstyle/suppressions.xml new file mode 100644 index 0000000..1006880 --- /dev/null +++ b/src/config/checkstyle/suppressions.xml @@ -0,0 +1,7 @@ + + + + + + From 977e9915aadde5470762d2fef63f3e11068f2fe7 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 28 Jun 2024 09:28:25 +0300 Subject: [PATCH 26/73] build: dependency-check Refs: XRDDEV-2628 --- src/build.gradle.kts | 15 ++ src/checkstyle-config.xml | 149 ------------------ src/checkstyle-suppressions.xml | 7 - .../dependency-check-suppressions.xml | 0 src/{ => config}/eclipse.importorder | 0 src/gradle/libs.versions.toml | 4 +- 6 files changed, 18 insertions(+), 157 deletions(-) delete mode 100644 src/checkstyle-config.xml delete mode 100644 src/checkstyle-suppressions.xml rename src/{ => config}/dependency-check-suppressions.xml (100%) rename src/{ => config}/eclipse.importorder (100%) diff --git a/src/build.gradle.kts b/src/build.gradle.kts index e69de29..113c0f2 100644 --- a/src/build.gradle.kts +++ b/src/build.gradle.kts @@ -0,0 +1,15 @@ +plugins { + alias(libs.plugins.dependencyCheck) +} + + +dependencyCheck { + suppressionFile = "config/dependency-check-suppressions.xml" + formats = listOf("HTML", "XML") + nvd.validForHours = 24 + skipConfigurations = listOf("checkstyle") + + if (project.hasProperty("nvdApiKey")) { + nvd.apiKey = project.property("nvdApiKey") as String + } +} diff --git a/src/checkstyle-config.xml b/src/checkstyle-config.xml deleted file mode 100644 index 20de797..0000000 --- a/src/checkstyle-config.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/checkstyle-suppressions.xml b/src/checkstyle-suppressions.xml deleted file mode 100644 index 1006880..0000000 --- a/src/checkstyle-suppressions.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/src/dependency-check-suppressions.xml b/src/config/dependency-check-suppressions.xml similarity index 100% rename from src/dependency-check-suppressions.xml rename to src/config/dependency-check-suppressions.xml diff --git a/src/eclipse.importorder b/src/config/eclipse.importorder similarity index 100% rename from src/eclipse.importorder rename to src/config/eclipse.importorder diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 4d00c27..bdde770 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -1,4 +1,3 @@ -# This file was generated by the Gradle 'init' task. # https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format [versions] @@ -12,3 +11,6 @@ javax-servlet-servlet-api = { module = "javax.servlet:servlet-api", version.ref org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } + +[plugins] +dependencyCheck = { id = "org.owasp.dependencycheck", version = "9.2.0" } From 5a534b6fdfbb5427203eca9d32d7ceaa0bee8868 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 23 Jul 2024 14:49:01 +0300 Subject: [PATCH 27/73] build: license format Refs: XRDDEV-2628 --- src/buildSrc/build.gradle.kts | 5 ++++- src/buildSrc/settings.gradle.kts | 7 +++++++ .../src/main/kotlin/xrd4j.java-conventions.gradle.kts | 7 +++++++ src/gradle/libs.versions.toml | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/buildSrc/settings.gradle.kts diff --git a/src/buildSrc/build.gradle.kts b/src/buildSrc/build.gradle.kts index 50cec87..2703a00 100644 --- a/src/buildSrc/build.gradle.kts +++ b/src/buildSrc/build.gradle.kts @@ -4,6 +4,9 @@ plugins { } repositories { - // Use the plugin portal to apply community plugins in convention plugins. gradlePluginPortal() } + +dependencies { + implementation(libs.licenseGradlePlugin) +} diff --git a/src/buildSrc/settings.gradle.kts b/src/buildSrc/settings.gradle.kts new file mode 100644 index 0000000..b5a0fab --- /dev/null +++ b/src/buildSrc/settings.gradle.kts @@ -0,0 +1,7 @@ +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index e637e67..4c9ad64 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -2,6 +2,7 @@ plugins { `java-library` `maven-publish` checkstyle + id("com.github.hierynomus.license") } repositories { @@ -48,3 +49,9 @@ checkstyle { toolVersion = "6.11.2" } + +license { + header = rootProject.file("../LICENSE") + include("**/*.java") + mapping("java", "SLASHSTAR_STYLE") +} diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index bdde770..aef677c 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -11,6 +11,7 @@ javax-servlet-servlet-api = { module = "javax.servlet:servlet-api", version.ref org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } +licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } [plugins] dependencyCheck = { id = "org.owasp.dependencycheck", version = "9.2.0" } From 16f7c0c309eca788b67ee5dd9afedc8f0d69b7d8 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 23 Jul 2024 15:08:01 +0300 Subject: [PATCH 28/73] build: include LICENSE and 3RD-PARTY-NOTICES in jar Refs: XRDDEV-2628 --- .../src/main/kotlin/xrd4j.java-conventions.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 4c9ad64..fd1a794 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -44,6 +44,12 @@ tasks.withType() { options.encoding = "UTF-8" } +tasks.withType() { + from(rootProject.files("../LICENSE", "../3RD-PARTY-NOTICES.txt")) { + into("META-INF") + } +} + checkstyle { // TODO: update to latest version toolVersion = "6.11.2" From 82503bd614d300fdb393eefa893a91e65698c6c9 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 25 Jul 2024 09:59:08 +0300 Subject: [PATCH 29/73] build: maven publishing Refs: XRDDEV-2628 --- .../kotlin/xrd4j.java-conventions.gradle.kts | 40 ++++++++++++++++++- src/client/build.gradle.kts | 7 +++- src/common/build.gradle.kts | 6 ++- src/gradle.properties | 1 + src/rest/build.gradle.kts | 6 ++- src/server/build.gradle.kts | 6 ++- 6 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 src/gradle.properties diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index fd1a794..ddba724 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -21,8 +21,7 @@ dependencies { testImplementation("junit:junit:4.13.1") } -group = "org.niis" -version = "0.5.0-SNAPSHOT" +group = "org.niis.xrd4j" java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -30,9 +29,46 @@ java { withSourcesJar() } +interface PomSettings { + val name: Property + val description: Property +} +val pomSettingsExtension = project.extensions.create("pomSettings") + publishing { publications.create("maven") { from(components["java"]) + + pom { + url = "https://github.com/nordic-institute/xrd4j" + licenses { + license { + name = "MIT License" + url = "http://www.opensource.org/licenses/mit-license.php" + } + } + + scm { + connection = "scm:git:https://github.com/nordic-institute/xrd4j.git" + developerConnection = "scm:git:git@github.com:nordic-institute/xrd4j.git" + url = "https://github.com/nordic-institute/xrd4j" + } + } + + afterEvaluate { + pom { + name = pomSettingsExtension.name + description = pomSettingsExtension.description + } + } + } + + repositories { + maven { + val releasesRepoUrl = uri("https://artifactory.niis.org/xroad-maven-releases/") + val snapshotsRepoUrl = uri("https://artifactory.niis.org/xroad-maven-snapshots/") + url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + } } } diff --git a/src/client/build.gradle.kts b/src/client/build.gradle.kts index a72fc2c..1acdb52 100644 --- a/src/client/build.gradle.kts +++ b/src/client/build.gradle.kts @@ -7,6 +7,9 @@ dependencies { api(project(":rest")) } -group = "org.niis.xrd4j" -description = "XRd4J :: Client" + +pomSettings { + name = "XRd4J :: Client" + description = "This module provides a SOAP client that generates X-Road v6 SOAP messages that can be sent to X-Road Security Server." +} diff --git a/src/common/build.gradle.kts b/src/common/build.gradle.kts index c53e9a3..c4cb3bd 100644 --- a/src/common/build.gradle.kts +++ b/src/common/build.gradle.kts @@ -2,5 +2,7 @@ plugins { id("xrd4j.java-conventions") } -group = "org.niis.xrd4j" -description = "XRd4J :: Common" +pomSettings { + name = "XRd4J :: Common" + description = "This module provides general purpose utilities for processing SOAP messages and it also contains X-Road v6 message data models." +} diff --git a/src/gradle.properties b/src/gradle.properties new file mode 100644 index 0000000..1dd0e26 --- /dev/null +++ b/src/gradle.properties @@ -0,0 +1 @@ +version=0.5.0-SNAPSHOT diff --git a/src/rest/build.gradle.kts b/src/rest/build.gradle.kts index 10c2376..53ea5cc 100644 --- a/src/rest/build.gradle.kts +++ b/src/rest/build.gradle.kts @@ -9,5 +9,7 @@ dependencies { testImplementation(project(":common")) } -group = "org.niis.xrd4j" -description = "XRd4J :: Rest" +pomSettings { + name = "XRd4J :: Rest" + description = "This module provides HTTP clients that can be used for sending requests to web services from Adapter Server." +} diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index b0f16fa..9099892 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -7,5 +7,7 @@ dependencies { compileOnly(libs.javax.servlet.servlet.api) } -group = "org.niis.xrd4j" -description = "XRd4J :: Server" +pomSettings { + name = "XRd4J :: Server" + description = "This module provides an abstract servlet that can be use as a base class for Adapter Server implementation." +} From bc303ee74ba1f9cf40e58ea3c2d743122e5ce798 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 25 Jul 2024 13:12:51 +0300 Subject: [PATCH 30/73] build: dependencies cleanup Refs: XRDDEV-2628 --- .../main/kotlin/xrd4j.java-conventions.gradle.kts | 10 +--------- src/client/build.gradle.kts | 2 ++ src/common/build.gradle.kts | 7 +++++++ src/gradle/libs.versions.toml | 12 +++++++++++- src/rest/build.gradle.kts | 3 +++ src/server/build.gradle.kts | 4 +++- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index ddba724..cc83b48 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -12,19 +12,11 @@ repositories { } } -dependencies { - api("com.sun.xml.messaging.saaj:saaj-impl:1.3.28") - api("org.slf4j:slf4j-api:1.7.30") - - testImplementation("org.slf4j:slf4j-log4j12:1.7.30") - testImplementation("org.apache.logging.log4j:log4j-core:2.17.1") - testImplementation("junit:junit:4.13.1") -} - group = "org.niis.xrd4j" java { sourceCompatibility = JavaVersion.VERSION_1_8 + toolchain.languageVersion = JavaLanguageVersion.of(8) withJavadocJar() withSourcesJar() } diff --git a/src/client/build.gradle.kts b/src/client/build.gradle.kts index 1acdb52..4275da9 100644 --- a/src/client/build.gradle.kts +++ b/src/client/build.gradle.kts @@ -5,6 +5,8 @@ plugins { dependencies { api(project(":common")) api(project(":rest")) + + testImplementation(libs.bundles.testImplementation) } diff --git a/src/common/build.gradle.kts b/src/common/build.gradle.kts index c4cb3bd..78a860f 100644 --- a/src/common/build.gradle.kts +++ b/src/common/build.gradle.kts @@ -2,6 +2,13 @@ plugins { id("xrd4j.java-conventions") } +dependencies { + api(libs.com.sun.xml.messaging.saaj.saajImpl) + api(libs.org.slf4j.slf4jApi) + + testImplementation(libs.bundles.testImplementation) +} + pomSettings { name = "XRd4J :: Common" description = "This module provides general purpose utilities for processing SOAP messages and it also contains X-Road v6 message data models." diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index aef677c..662ed7b 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -7,11 +7,21 @@ org-apache-httpcomponents-httpcore = "4.4.16" org-json-json = "20220924" [libraries] -javax-servlet-servlet-api = { module = "javax.servlet:servlet-api", version.ref = "javax-servlet-servlet-api" } +com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "1.3.28" } +javax-servlet-servletApi = { module = "javax.servlet:servlet-api", version.ref = "javax-servlet-servlet-api" } org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } +org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version = "1.7.30" } +org-slf4j-slf4jLog4j12 = {module = "org.slf4j:slf4j-log4j12", version = "1.7.30" } +org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version = "2.17.1" } +junit-junit = { module = "junit:junit", version = "4.13.1" } + licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } +[bundles] +testImplementation = [ "junit-junit", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] + + [plugins] dependencyCheck = { id = "org.owasp.dependencycheck", version = "9.2.0" } diff --git a/src/rest/build.gradle.kts b/src/rest/build.gradle.kts index 53ea5cc..b4dafe3 100644 --- a/src/rest/build.gradle.kts +++ b/src/rest/build.gradle.kts @@ -6,6 +6,9 @@ dependencies { api(libs.org.apache.httpcomponents.httpclient) api(libs.org.apache.httpcomponents.httpcore) api(libs.org.json.json) + api(libs.org.slf4j.slf4jApi) + + testImplementation(libs.bundles.testImplementation) testImplementation(project(":common")) } diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index 9099892..f0066ec 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -4,7 +4,9 @@ plugins { dependencies { api(project(":common")) - compileOnly(libs.javax.servlet.servlet.api) + compileOnly(libs.javax.servlet.servletApi) + + testImplementation(libs.bundles.testImplementation) } pomSettings { From 4da47691e9e0d4b460210ce622e1b8c5eed50271 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 25 Jul 2024 13:36:10 +0300 Subject: [PATCH 31/73] build: removed maven build files Refs: XRDDEV-2628 --- src/client/pom.xml | 87 -------------- src/common/pom.xml | 75 ------------ src/pom.xml | 286 --------------------------------------------- src/rest/pom.xml | 98 ---------------- src/server/pom.xml | 88 -------------- 5 files changed, 634 deletions(-) delete mode 100644 src/client/pom.xml delete mode 100644 src/common/pom.xml delete mode 100644 src/pom.xml delete mode 100644 src/rest/pom.xml delete mode 100644 src/server/pom.xml diff --git a/src/client/pom.xml b/src/client/pom.xml deleted file mode 100644 index 955fe96..0000000 --- a/src/client/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - - xrd4j - org.niis - 0.5.0-SNAPSHOT - - org.niis.xrd4j - client - 0.5.0-SNAPSHOT - jar - XRd4J :: Client - - This module provides a SOAP client that generates X-Road v6 SOAP - messages that can be sent to X-Road Security Server. - - https://github.com/nordic-institute/xrd4j - - UTF-8 - - - - org.niis.xrd4j - common - 0.5.0-SNAPSHOT - - - org.niis.xrd4j - rest - 0.5.0-SNAPSHOT - - - - package - - - src/main/resources - true - - - - - maven-resources-plugin - 3.2.0 - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/classes/META-INF - - - ../../ - - 3RD-PARTY-NOTICES.txt - LICENSE - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.13 - - - - checkstyle - - - - - - - diff --git a/src/common/pom.xml b/src/common/pom.xml deleted file mode 100644 index 03523ad..0000000 --- a/src/common/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - xrd4j - org.niis - 0.5.0-SNAPSHOT - - org.niis.xrd4j - common - 0.5.0-SNAPSHOT - jar - XRd4J :: Common - - This module provides general purpose utilities for processing - SOAP messages and it also contains X-Road v6 message data models. - - https://github.com/nordic-institute/xrd4j - - UTF-8 - - - package - - - src/main/resources - true - - - - - maven-resources-plugin - 3.2.0 - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/classes/META-INF - - - ../../ - - 3RD-PARTY-NOTICES.txt - LICENSE - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.13 - - - - checkstyle - - - - - - - diff --git a/src/pom.xml b/src/pom.xml deleted file mode 100644 index 62e8234..0000000 --- a/src/pom.xml +++ /dev/null @@ -1,286 +0,0 @@ - - - 4.0.0 - org.niis - xrd4j - 0.5.0-SNAPSHOT - pom - XRd4J - 2018 - - XRd4J is a Java library for building X-Road v6 Adapter Servers - and clients. The library implements X-Road v6 SOAP profile. - The library takes care of serialization and deserialization of - SOAP messages: built-in support for standard X-Road SOAP headers, - only processing of application specific request and response - elements must be implemented. - - https://github.com/nordic-institute/xrd4j - - common - client - server - rest - - - 1.7.30 - 2.17.1 - 3.8.1 - 1.8 - UTF-8 - UTF-8 - common/target/surefire-reports,client/target/surefire-reports,rest/target/surefire-reports,server/target/surefire-reports - - - - - com.sun.xml.messaging.saaj - saaj-impl - 1.3.28 - - - - - org.slf4j - slf4j-api - ${slf4j.version} - - - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - test - - - - org.apache.logging.log4j - log4j-core - ${log4j.version} - test - - - - junit - junit - 4.13.1 - test - - - - - MIT License - http://www.opensource.org/licenses/mit-license.php - - - - scm:git:https://github.com/nordic-institute/xrd4j.git - scm:git:git@github.com:nordic-institute/xrd4j.git - https://github.com/nordic-institute/xrd4j - - - - niis - Nordic Institute for Interoperability Solutions (NIIS) - - architect - developer - - +2 - - - vrk - Population Register Centre (VRK) - - architect - developer - - +2 - - - petkivim - Petteri Kivimäki - dinky_jackson@hotmail.com - - architect - developer - - +2 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M9 - - - - log4j.configuration - test-log4j.xml - - - 3 - true - -Xmx1024m - - - - org.apache.maven.plugins - maven-jar-plugin - 2.5 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.2 - - ${jdk.version} - ${jdk.version} - ${project.build.sourceEncoding} - - - - com.mycila - license-maven-plugin - 3.0 - -
com/mycila/maven/plugin/license/templates/MIT.txt
- - Nordic Institute for Interoperability Solutions (NIIS) - - true - - **/*.java - -
- - - license-headers - process-sources - - format - - - -
- - org.jacoco - jacoco-maven-plugin - 0.7.9 - - - prepare-agent - - prepare-agent - - - - - - org.owasp - dependency-check-maven - 8.1.0 - - 24 - false - false - false - - dependency-check-suppressions.xml - - - HTML - XML - - - - - - check - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - - - validate - - check - - validate - - checkstyle-config.xml - UTF-8 - true - true - true - - - - -
- - - src/test/resources - - test-log4j.xml - - - -
- - - release - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - - attach-sources - verify - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - attach-javadocs - - jar - - - - - - - - - - niis-snapshots - https:/artifactory.niis.org/xroad-maven-snapshots/ - - - niis-releases - https://artifactory.niis.org/xroad-maven-releases/ - - - - -
diff --git a/src/rest/pom.xml b/src/rest/pom.xml deleted file mode 100644 index 77857d5..0000000 --- a/src/rest/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - 4.0.0 - - xrd4j - org.niis - 0.5.0-SNAPSHOT - - org.niis.xrd4j - rest - 0.5.0-SNAPSHOT - jar - XRd4J :: Rest - - This module provides HTTP clients that can be used for sending - requests to web services from Adapter Server. - - https://github.com/nordic-institute/xrd4j - - UTF-8 - - - - org.apache.httpcomponents - httpclient - 4.5.14 - - - org.apache.httpcomponents - httpcore - 4.4.16 - - - org.json - json - 20220924 - - - org.niis.xrd4j - common - 0.5.0-SNAPSHOT - test - - - - package - - - src/main/resources - true - - - - - maven-resources-plugin - 3.2.0 - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/classes/META-INF - - - ../../ - - 3RD-PARTY-NOTICES.txt - LICENSE - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.13 - - - - checkstyle - - - - - - - diff --git a/src/server/pom.xml b/src/server/pom.xml deleted file mode 100644 index fc8f71b..0000000 --- a/src/server/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - 4.0.0 - - xrd4j - org.niis - 0.5.0-SNAPSHOT - - org.niis.xrd4j - server - 0.5.0-SNAPSHOT - jar - XRd4J :: Server - - This module provides an abstract servlet that can be use as a base - class for Adapter Server implementation. - - https://github.com/nordic-institute/xrd4j - - UTF-8 - - - - javax.servlet - servlet-api - 2.5 - provided - - - org.niis.xrd4j - common - 0.5.0-SNAPSHOT - - - - package - - - src/main/resources - true - - - - - maven-resources-plugin - 3.2.0 - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/classes/META-INF - - - ../../ - - 3RD-PARTY-NOTICES.txt - LICENSE - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.13 - - - - checkstyle - - - - - - - From 717cf6369ebd86298eef4d03afdc0dea8c19a0db Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 25 Jul 2024 14:16:58 +0300 Subject: [PATCH 32/73] build: junit5 dependency Refs: XRDDEV-2628 --- .../main/kotlin/xrd4j.java-conventions.gradle.kts | 14 ++++++++++++-- src/gradle/libs.versions.toml | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index cc83b48..29c325c 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -1,6 +1,7 @@ plugins { `java-library` `maven-publish` + jacoco checkstyle id("com.github.hierynomus.license") } @@ -15,12 +16,17 @@ repositories { group = "org.niis.xrd4j" java { - sourceCompatibility = JavaVersion.VERSION_1_8 - toolchain.languageVersion = JavaLanguageVersion.of(8) + sourceCompatibility = JavaVersion.VERSION_11 + toolchain.languageVersion = JavaLanguageVersion.of(11) withJavadocJar() withSourcesJar() } +dependencies { + testRuntimeOnly("org.junit.vintage:junit-vintage-engine") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") +} + interface PomSettings { val name: Property val description: Property @@ -78,6 +84,10 @@ tasks.withType() { } } +tasks.withType() { + useJUnitPlatform() +} + checkstyle { // TODO: update to latest version toolVersion = "6.11.2" diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 662ed7b..fce8f27 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -16,11 +16,12 @@ org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version = "1.7.30" } org-slf4j-slf4jLog4j12 = {module = "org.slf4j:slf4j-log4j12", version = "1.7.30" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version = "2.17.1" } junit-junit = { module = "junit:junit", version = "4.13.1" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version = "5.10.3" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } [bundles] -testImplementation = [ "junit-junit", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] +testImplementation = [ "junit-junit", "junit-jupiter", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] [plugins] From e5581184aa5fc773d7e1e6face8745e56eb9c9d6 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 25 Jul 2024 14:45:00 +0300 Subject: [PATCH 33/73] test: migrate tests to junit 5 Refs: XRDDEV-2628 --- .../kotlin/xrd4j.java-conventions.gradle.kts | 1 - .../LoadBalancedSOAPClientImplTest.java | 19 ++- .../org/niis/xrd4j/client/SOAPClientTest.java | 24 ++-- ...ServerMetricsResponseDeserializerTest.java | 12 +- ...ntralServicesResponseDeserializerTest.java | 18 ++- .../ListClientsResponseDeserializerTest.java | 21 ++-- .../ListServicesResponseDeserializerTest.java | 44 ++++--- .../ServiceResponseDeserializerTest.java | 90 +++++++++----- .../DefaultServiceRequestSerializerTest.java | 23 ++-- .../ServiceRequestSerializerTest.java | 75 +++++++---- .../common/member/ConsumerMemberTest.java | 71 +++++++---- .../common/member/ProducerMemberTest.java | 116 +++++++++++------- .../common/member/SecurityServerTest.java | 46 ++++--- .../common/message/ServiceRequestTest.java | 38 +++--- .../common/message/ServiceResponseTest.java | 36 ++++-- .../security/AsymmetricEncrypterTest.java | 12 +- .../common/security/CryptoHelperTest.java | 19 ++- .../security/SymmetricEncrypterTest.java | 12 +- .../common/util/ConfigurationHelperTest.java | 12 +- .../xrd4j/common/util/MessageHelperTest.java | 9 +- .../xrd4j/common/util/SOAPHelperTest.java | 40 ++++-- src/gradle/libs.versions.toml | 3 +- .../converter/JSONToXMLConverterTest.java | 52 +++++--- .../converter/XMLToJSONConverterTest.java | 55 ++++++--- .../niis/xrd4j/rest/util/ClientUtilTest.java | 90 +++++++++----- .../CustomRequestDeserializerTest.java | 36 ++++-- .../ServiceRequestDeserializerTest.java | 55 ++++++--- .../ServiceResponseSerializerTest.java | 112 +++++++++++------ 28 files changed, 750 insertions(+), 391 deletions(-) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 29c325c..c66661c 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -23,7 +23,6 @@ java { } dependencies { - testRuntimeOnly("org.junit.vintage:junit-vintage-engine") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } diff --git a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java index 9946fb9..aea6c8a 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java @@ -22,26 +22,30 @@ */ package org.niis.xrd4j.client; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for LoadBalancedSOAPClientImpl class. Test cases cover only cases * where SOAP server is not needed. * * @author Petteri Kivimäki */ -public class LoadBalancedSOAPClientImplTest extends TestCase { +class LoadBalancedSOAPClientImplTest { /** * Test that reading target url throws exception when given empty url list * @throws SOAPException */ - public void test1() throws SOAPException { + @Test + void test1() throws SOAPException { List urls = new ArrayList<>(); LoadBalancedSOAPClientImpl client = new LoadBalancedSOAPClientImpl(urls); try { @@ -58,7 +62,8 @@ public void test1() throws SOAPException { * Test that reading target url keeps giving the same url * @throws SOAPException */ - public void test2() throws SOAPException { + @Test + void test2() throws SOAPException { List urls = new ArrayList<>(); urls.add("http://server1.myhost.com"); LoadBalancedSOAPClientImpl client = new LoadBalancedSOAPClientImpl(urls); @@ -71,7 +76,8 @@ public void test2() throws SOAPException { * Test that reading target url load balances between given urls * @throws SOAPException */ - public void test3() throws SOAPException { + @Test + void test3() throws SOAPException { List urls = new ArrayList<>(); urls.add("http://server1.myhost.com"); urls.add("http://server2.myhost.com"); @@ -87,7 +93,8 @@ public void test3() throws SOAPException { * Test that reading target url load balances between given urls * @throws SOAPException */ - public void test4() throws SOAPException { + @Test + void test4() throws SOAPException { List urls = new ArrayList<>(); urls.add("http://server1.myhost.com"); urls.add("http://server2.myhost.com"); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java index 30113f2..2455b48 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java @@ -30,7 +30,8 @@ import org.niis.xrd4j.common.member.ProducerMember; import org.niis.xrd4j.common.message.ServiceRequest; -import junit.framework.TestCase; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import javax.xml.soap.Node; import javax.xml.soap.SOAPElement; @@ -38,13 +39,15 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for SOAPClientImpl class. Test cases cover only cases where SOAP * server is not needed. * * @author Petteri Kivimäki */ -public class SOAPClientTest extends TestCase { +class SOAPClientTest { private ServiceRequest request; private ServiceRequestSerializer serializer; @@ -55,9 +58,8 @@ public class SOAPClientTest extends TestCase { * * @throws Exception */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @BeforeEach + void setUp() throws Exception { ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); producer.setNamespacePrefix("ns1"); @@ -77,7 +79,8 @@ protected void setUp() throws Exception { * * @throws SOAPException */ - public void testException1() throws SOAPException { + @Test + void testException1() throws SOAPException { try { SOAPClient client = new SOAPClientImpl(); client.send(request.getSoapMessage(), "test.com"); @@ -92,7 +95,8 @@ public void testException1() throws SOAPException { * * @throws SOAPException */ - public void testException2() throws SOAPException { + @Test + void testException2() throws SOAPException { try { SOAPClient client = new SOAPClientImpl(); client.send(request.getSoapMessage(), ""); @@ -108,7 +112,8 @@ public void testException2() throws SOAPException { * @throws RuntimeException * @throws SOAPException */ - public void testException3() throws RuntimeException, SOAPException { + @Test + void testException3() throws RuntimeException, SOAPException { try { SOAPClient client = new SOAPClientImpl(); client.send(request.getSoapMessage(), null); @@ -123,7 +128,8 @@ public void testException3() throws RuntimeException, SOAPException { * * @throws SOAPException */ - public void testException4() throws SOAPException { + @Test + void testException4() throws SOAPException { try { SOAPClient client = new SOAPClientImpl(); client.send(request.getSoapMessage(), "htp://test.com"); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java index 7e92744..972a14b 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java @@ -27,7 +27,7 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; import javax.xml.soap.SOAPException; @@ -35,12 +35,14 @@ import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for GetSecurityServerMetricsResponseDeserializer class. * * @author Petteri Kivimäki */ -public class GetSecurityServerMetricsResponseDeserializerTest extends TestCase { +class GetSecurityServerMetricsResponseDeserializerTest { /** * getSecurityServerMetrics - installed X-Road packages and their versions @@ -48,7 +50,8 @@ public class GetSecurityServerMetricsResponseDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2servicegetSecurityServerMetricsFICOMMEMBER2server1userID-12345678904.0r8gQxR++e6E5WAI9CNfy2t/87vwyhBKtlbKlYWXs5bGxYrGmJZXk3xjvUb62vB936g/TDVwXCWD+iKIgUgHRPw==SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroadPackagesaccountsservice0.6.35-0ubuntu7.3acpid1:2.0.21-1ubuntu2xroad-addon-messagelog6.9.0-1.20170104084337gitb8fe14axroad-addon-metaservices6.9.0-1.20170104084337gitb8fe14axroad-addon-proxymonitor6.9.0-1.20170104084337gitb8fe14axroad-addon-wsdlvalidator6.9.0-1.20170104084337gitb8fe14axroad-common6.9.0-1.20170104084337gitb8fe14axroad-jetty96.9.0-1.20170104084337gitb8fe14axroad-monitor6.9.0-1.20170104084337gitb8fe14axroad-proxy6.9.0-1.20170104084337gitb8fe14axroad-securityserver6.9.0-1.20170104084337gitb8fe14axroad-securityserver-fi6.9.0-1.20170104084337gitb8fe14axz-utils5.1.1alpha+20120614-2ubuntu2zerofree1.0.2-1ubuntu1zlib1g1:1.2.8.dfsg-1ubuntu1"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -102,7 +105,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2servicegetSecurityServerMetricsFICOMMEMBER2server1userID-12345678904.0r8gQxR++e6E5WAI9CNfy2t/87vwyhBKtlbKlYWXs5bGxYrGmJZXk3xjvUb62vB936g/TDVwXCWD+iKIgUgHRPw==SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroad"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java index f5d32bf..a38400d 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java @@ -26,18 +26,20 @@ import org.niis.xrd4j.common.member.ObjectType; import org.niis.xrd4j.common.member.ProducerMember; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ListCentralServicesResponseDeserializer class. * * @author Petteri Kivimäki */ -public class ListCentralServicesResponseDeserializerTest extends TestCase { +class ListCentralServicesResponseDeserializerTest { /** * Central service list with 1 service @@ -45,7 +47,8 @@ public class ListCentralServicesResponseDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FItestService"; List list = new ListCentralServicesResponseDeserializer().deserializeProducerList(soapString); @@ -64,7 +67,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FItestServiceFIdemoFIservice"; List list = new ListCentralServicesResponseDeserializer().deserializeProducerList(soapString); @@ -99,7 +103,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = ""; List list = new ListCentralServicesResponseDeserializer().deserializeProducerList(soapString); @@ -112,7 +117,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = ""; List list = new ListCentralServicesResponseDeserializer().deserializeProducerList(soapString); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java index ce5ee65..caef2ec 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java @@ -26,18 +26,20 @@ import org.niis.xrd4j.common.member.ConsumerMember; import org.niis.xrd4j.common.member.ObjectType; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ListClientsResponseDeserializer class. * * @author Petteri Kivimäki */ -public class ListClientsResponseDeserializerTest extends TestCase { +class ListClientsResponseDeserializerTest { /** * Client list with 2 members (MEMBER, SUBSYSTEM) @@ -45,7 +47,8 @@ public class ListClientsResponseDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOV12345Test orgFI-DEVCOM54321subsystemAnother org"; List list = new ListClientsResponseDeserializer().deserializeConsumerList(soapString); @@ -68,7 +71,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FIGOV12345Org 1FICOM54321subsystemOrg 2FIPRI00000-1testSystemOrg 3"; List list = new ListClientsResponseDeserializer().deserializeConsumerList(soapString); @@ -97,7 +101,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = "FI-DEV63GOV7654321-0Org 1FI-DEV63GOV1234567-8Org 2FI-DEV63GOV1234567-8TestClientOrg 2FI-DEV63GOV1234567-8TestServiceOrg 2"; List list = new ListClientsResponseDeserializer().deserializeConsumerList(soapString); @@ -132,7 +137,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = ""; List list = new ListClientsResponseDeserializer().deserializeConsumerList(soapString); @@ -145,7 +151,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String soapString = ""; List list = new ListClientsResponseDeserializer().deserializeConsumerList(soapString); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java index ebc9b28..bea8553 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java @@ -29,20 +29,22 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ListServicesResponseDeserializer class. * * @author Petteri Kivimäki */ -public class ListServicesResponseDeserializerTest extends TestCase { - +class ListServicesResponseDeserializerTest { + /** * ListMethods: Subsystem - Service (under subsystem). Response: 1 service @@ -50,7 +52,8 @@ public class ListServicesResponseDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemlistMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -95,7 +98,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FICOMMEMBER2subsystemlistMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1FIPRI12345-7subsystem1testService1FIPRI12345-8testService2v1FIPRI12345-9testService3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -164,7 +168,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FICOMMEMBER2listMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1FIPRI12345-7subsystem1testService1FIPRI12345-8testService2v1FIPRI12345-9testService3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -234,7 +239,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemallowedMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -279,7 +285,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FICOMMEMBER2subsystemallowedMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1FIPRI12345-7subsystem1testService1FIPRI12345-8testService2v1FIPRI12345-9testService3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -348,7 +355,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test6() throws XRd4JException, SOAPException { + @Test + void test6() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FICOMMEMBER2allowedMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1FIPRI12345-7subsystem1testService1FIPRI12345-8testService2v1FIPRI12345-9testService3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -417,7 +425,8 @@ public void test6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test7() throws XRd4JException, SOAPException { + @Test + void test7() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemlistMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw=="; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -456,7 +465,8 @@ public void test7() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test8() throws XRd4JException, SOAPException { + @Test + void test8() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemlistMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw=="; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -496,7 +506,8 @@ public void test8() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test9() throws XRd4JException, SOAPException { + @Test + void test9() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemallowedMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw=="; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -536,7 +547,8 @@ public void test9() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test10() throws XRd4JException, SOAPException { + @Test + void test10() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemallowedMethodsEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw=="; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -575,7 +587,8 @@ public void test10() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test11() throws XRd4JException, SOAPException { + @Test + void test11() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1clientFICOMMEMBER2subsystemlistMethodsFIGOVMEMBER1server1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==FIPRI12345-6subsystemtestServicev1"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -624,7 +637,8 @@ public void test11() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError1() throws XRd4JException, SOAPException { + @Test + void testTechError1() throws XRd4JException, SOAPException { String soapString = "Server.ClientProxy.LoggingFailed.TimestamperFailedCannot time-stamp messagesTimestamperFailed"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java index 6926c24..f4b1dae 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java @@ -28,7 +28,7 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.Node; import javax.xml.soap.SOAPException; @@ -36,12 +36,14 @@ import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ServiceRequestDeserializerImpl class. * * @author Petteri Kivimäki */ -public class ServiceResponseDeserializerTest extends TestCase { +class ServiceResponseDeserializerTest { /** * Response to subsystem -> service level service call @@ -49,7 +51,8 @@ public class ServiceResponseDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -87,7 +90,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithWrappers() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==12345678909876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -125,7 +129,8 @@ public void test1WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithoutWrappers() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -163,7 +168,8 @@ public void test1WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -200,7 +206,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFIgetRandomEE1234567890ID-12345678906.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -237,7 +244,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FIgetRandomEE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -274,7 +282,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FICOMMEMBER2subsystemgetRandomFIGOVMEMBER1server1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -315,7 +324,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test6() throws XRd4JException, SOAPException { + @Test + void test6() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomEE1234567890ID-12345678904.0Test issueZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -354,7 +364,8 @@ public void test6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test7() throws XRd4JException, SOAPException { + @Test + void test7() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -392,7 +403,8 @@ public void test7() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test8() throws XRd4JException, SOAPException { + @Test + void test8() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1ID-12345678904.09876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -435,7 +447,8 @@ public void test8() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test9() throws XRd4JException, SOAPException { + @Test + void test9() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); assertEquals(true, msg != null); @@ -473,7 +486,8 @@ public void test9() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test10() throws XRd4JException, SOAPException { + @Test + void test10() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==1234567890 9876543210 "; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -514,7 +528,8 @@ public void test10() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test11() throws XRd4JException, SOAPException { + @Test + void test11() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); assertEquals(true, msg != null); @@ -551,7 +566,8 @@ public void test11() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test12() throws XRd4JException, SOAPException { + @Test + void test12() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -589,7 +605,8 @@ public void test12() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test13() throws XRd4JException, SOAPException { + @Test + void test13() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-1234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -629,7 +646,8 @@ public void test13() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test14() throws XRd4JException, SOAPException { + @Test + void test14() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-1234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -669,7 +687,8 @@ public void test14() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test15() throws XRd4JException, SOAPException { + @Test + void test15() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-1234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -709,7 +728,8 @@ public void test15() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError1() throws XRd4JException, SOAPException { + @Test + void testTechError1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678904.0fault codefault stringfault actorfault details"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -755,7 +775,8 @@ public void testTechError1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError2() throws XRd4JException, SOAPException { + @Test + void testTechError2() throws XRd4JException, SOAPException { String soapString = "fault codefault stringfault actorfault details"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -789,7 +810,8 @@ public void testTechError2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError3() throws XRd4JException, SOAPException { + @Test + void testTechError3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678904.0fault codefault stringfault actorfault details"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -835,7 +857,8 @@ public void testTechError3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError4() throws XRd4JException, SOAPException { + @Test + void testTechError4() throws XRd4JException, SOAPException { String soapString = "fault codefault stringfault actorfault details"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -869,7 +892,8 @@ public void testTechError4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError5() throws XRd4JException, SOAPException { + @Test + void testTechError5() throws XRd4JException, SOAPException { String soapString = "fault codefault stringfault actororder elementconfirmation element"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -904,7 +928,8 @@ public void testTechError5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testTechError6() throws XRd4JException, SOAPException { + @Test + void testTechError6() throws XRd4JException, SOAPException { String soapString = "fault codefault stringfault actor"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -938,7 +963,8 @@ public void testTechError6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testNonTechError1() throws XRd4JException, SOAPException { + @Test + void testNonTechError1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678905.0fault codefault string"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -981,7 +1007,8 @@ public void testNonTechError1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testNonTechError2() throws XRd4JException, SOAPException { + @Test + void testNonTechError2() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678906.0fault codefault string"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -1024,7 +1051,8 @@ public void testNonTechError2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testNonTechError3() throws XRd4JException, SOAPException { + @Test + void testNonTechError3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678904.0fault code"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -1067,7 +1095,8 @@ public void testNonTechError3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testNonTechError4() throws XRd4JException, SOAPException { + @Test + void testNonTechError4() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678904.0fault string"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -1110,7 +1139,8 @@ public void testNonTechError4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testNonTechError5() throws XRd4JException, SOAPException { + @Test + void testNonTechError5() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID-12345678904.0"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java index c345843..c36134a 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java @@ -31,25 +31,28 @@ import org.niis.xrd4j.common.util.MessageHelper; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for DefaultServiceRequestSerializer class. * * @author Petteri Kivimäki */ -public class DefaultServiceRequestSerializerTest extends TestCase { - +class DefaultServiceRequestSerializerTest { + /** * allowedMethos : member - member level service call. * * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String id = MessageHelper.generateId(); String correctRequest = "FIGOVMEMBER1FICOMMEMBER2allowedMethodsuser" + id + "4.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); @@ -72,7 +75,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String id = MessageHelper.generateId(); String correctRequest = "FIGOVMEMBER1FICOMMEMBER2serviceallowedMethodsuser" + id + "4.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); @@ -94,7 +98,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String id = MessageHelper.generateId(); String correctRequest = "FIGOVMEMBER1clientFICOMMEMBER2listMethodsuser" + id + "4.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "client"); @@ -118,7 +123,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String id = MessageHelper.generateId(); String correctRequest = "FIGOVMEMBER1clientFICOMMEMBER2servicelistMethodsuser" + id + "4.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "client"); @@ -140,7 +146,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String id = MessageHelper.generateId(); String correctRequest = "FIGOVMEMBER1clientFICOMMEMBER2servicegetSecurityServerMetricsFICOMMEMBER2server1user" + id + "4.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "client"); diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java index 20d3d44..dcc0af8 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java @@ -29,19 +29,21 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ServiceRequestSerializer class. * * @author Petteri Kivimäki */ -public class ServiceRequestSerializerTest extends TestCase { +class ServiceRequestSerializerTest { /** * Subsystem level service call. No NS prefix. @@ -49,7 +51,8 @@ public class ServiceRequestSerializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -72,7 +75,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithWrappers() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -96,7 +100,8 @@ public void test1WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithoutWrappers() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -119,7 +124,8 @@ public void test1WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1FICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.51234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -142,7 +148,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomv1EE123456789012345678906.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "getRandom"); @@ -166,7 +173,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFIgetRandomEE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "getRandom"); @@ -188,7 +196,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1FICOMMEMBER2getRandom12345678904.0Test data. Special characters: äöå"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "getRandom"); @@ -209,7 +218,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test6() throws XRd4JException, SOAPException { + @Test + void test6() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "getRandom"); @@ -231,7 +241,8 @@ public void test6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test7() throws XRd4JException, SOAPException { + @Test + void test7() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -253,7 +264,8 @@ public void test7() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test8() throws XRd4JException, SOAPException { + @Test + void test8() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1FICOMMEMBER2subsystemgetRandomEE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom"); @@ -276,7 +288,8 @@ public void test8() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test9() throws XRd4JException, SOAPException { + @Test + void test9() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -299,7 +312,8 @@ public void test9() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test10() throws XRd4JException, SOAPException { + @Test + void test10() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -321,7 +335,8 @@ public void test10() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test11() throws XRd4JException, SOAPException { + @Test + void test11() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -342,7 +357,8 @@ public void test11() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test12() throws XRd4JException, SOAPException { + @Test + void test12() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -364,7 +380,8 @@ public void test12() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test13() throws XRd4JException, SOAPException { + @Test + void test13() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -385,7 +402,8 @@ public void test13() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test14() throws XRd4JException, SOAPException { + @Test + void test14() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -404,7 +422,8 @@ public void test14() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test15() throws XRd4JException, SOAPException { + @Test + void test15() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -427,7 +446,8 @@ public void test15() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test16() throws XRd4JException, SOAPException { + @Test + void test16() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -451,7 +471,8 @@ public void test16() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test16WithWrappers() throws XRd4JException, SOAPException { + @Test + void test16WithWrappers() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -476,7 +497,8 @@ public void test16WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test16WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test16WithoutWrappers() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -501,7 +523,8 @@ public void test16WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test17() throws XRd4JException, SOAPException { + @Test + void test17() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE12345678901234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -526,7 +549,8 @@ public void test17() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test18() throws XRd4JException, SOAPException { + @Test + void test18() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE12345678901234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); @@ -551,7 +575,8 @@ public void test18() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test19() throws XRd4JException, SOAPException { + @Test + void test19() throws XRd4JException, SOAPException { String correctRequest = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE12345678901234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.01234567890"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java index e5fe3a9..819c9b6 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java @@ -24,20 +24,25 @@ import org.niis.xrd4j.common.exception.XRd4JException; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; /** * Test cases for ConsumerMember class. * * @author Petteri Kivimäki */ -public class ConsumerMemberTest extends TestCase { +class ConsumerMemberTest { /** * Test for toString method. * @throws XRd4JException if there's a XRd4J error */ - public void testToString() throws XRd4JException { + @Test + void testToString() throws XRd4JException { ConsumerMember consumer = new ConsumerMember("FI", "COM", "12345-6"); assertEquals("FI.COM.12345-6", consumer.toString()); consumer = new ConsumerMember("FI", "COM", "12345-6", "system"); @@ -46,27 +51,29 @@ public void testToString() throws XRd4JException { assertEquals("FI_TEST.GOV.12345-6.system", consumer.toString()); consumer = new ConsumerMember("FI_DEV", "GOV", "12345-6", "system"); assertEquals("FI_DEV.GOV.12345-6.system", consumer.toString()); - ConsumerMemberTest.assertFalse(consumer.toString().equals("Fi.COM.12345-6.system")); - ConsumerMemberTest.assertFalse(consumer.toString().equals("FI.cOm.12345-6.system")); + assertFalse(consumer.toString().equals("Fi.COM.12345-6.system")); + assertFalse(consumer.toString().equals("FI.cOm.12345-6.system")); } /** * Test for equals method. * @throws XRd4JException if there's a XRd4J error */ - public void testEquals() throws XRd4JException { + @Test + void testEquals() throws XRd4JException { assertEquals(new ConsumerMember("FI", "COM", "12345-6"), new ConsumerMember("FI", "COM", "12345-6")); assertEquals(new ConsumerMember("FI_DEV", "GOV", "12345-6", "system"), new ConsumerMember("FI_DEV", "GOV", "12345-6", "system")); - ConsumerMemberTest.assertFalse(new ConsumerMember("FI", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-67"))); - ConsumerMemberTest.assertFalse(new ConsumerMember("FI_DEV", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-6"))); - ConsumerMemberTest.assertFalse(new ConsumerMember("FI", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-67", "system"))); + assertFalse(new ConsumerMember("FI", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-67"))); + assertFalse(new ConsumerMember("FI_DEV", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-6"))); + assertFalse(new ConsumerMember("FI", "COM", "12345-6").equals(new ConsumerMember("FI", "COM", "12345-67", "system"))); } /** * Test for ConsumerMember constructor (3 parameters). MemberClass is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException1() throws XRd4JException { + @Test + void testException1() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", null, "12345-6"); fail("Should not reach this"); @@ -79,7 +86,8 @@ public void testException1() throws XRd4JException { * Test for ConsumerMember constructor (3 parameters). SDSBInstance is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException2() throws XRd4JException { + @Test + void testException2() throws XRd4JException { try { ConsumerMember member = new ConsumerMember(null, "COM", "12345-6"); fail("Should not reach this"); @@ -92,7 +100,8 @@ public void testException2() throws XRd4JException { * Test for ConsumerMember constructor (3 parameters). Id is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException3() throws XRd4JException { + @Test + void testException3() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", null); fail("Should not reach this"); @@ -101,11 +110,12 @@ public void testException3() throws XRd4JException { } } - /** + /** * Test for ConsumerMember constructor (3 parameters). SDSBInstance is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException4() throws XRd4JException { + @Test + void testException4() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("", "COM", "12345-6"); fail("Should not reach this"); @@ -114,11 +124,12 @@ public void testException4() throws XRd4JException { } } - /** + /** * Test for ConsumerMember constructor (3 parameters). Member class is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException5() throws XRd4JException { + @Test + void testException5() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "", "12345-6"); fail("Should not reach this"); @@ -126,11 +137,13 @@ public void testException5() throws XRd4JException { // OK } } + /** * Test for ConsumerMember constructor (3 parameters). Id is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException6() throws XRd4JException { + @Test + void testException6() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", ""); fail("Should not reach this"); @@ -143,7 +156,8 @@ public void testException6() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). SDSBInstance is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException7() throws XRd4JException { + @Test + void testException7() throws XRd4JException { try { ConsumerMember member = new ConsumerMember(null, "COM", "12345-6", "system"); fail("Should not reach this"); @@ -156,7 +170,8 @@ public void testException7() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). MemberClass is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException8() throws XRd4JException { + @Test + void testException8() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", null, "12345-6", "system"); fail("Should not reach this"); @@ -169,7 +184,8 @@ public void testException8() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). Id is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException9() throws XRd4JException { + @Test + void testException9() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", null, "system"); fail("Should not reach this"); @@ -182,7 +198,8 @@ public void testException9() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). Member code is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException10() throws XRd4JException { + @Test + void testException10() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", "12345-6", null); fail("Should not reach this"); @@ -195,7 +212,8 @@ public void testException10() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). SDSBInstance is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException11() throws XRd4JException { + @Test + void testException11() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("", "COM", "12345-6", "system"); fail("Should not reach this"); @@ -208,7 +226,8 @@ public void testException11() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). Member class is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException12() throws XRd4JException { + @Test + void testException12() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "", "", "system"); fail("Should not reach this"); @@ -221,7 +240,8 @@ public void testException12() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). Id is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException13() throws XRd4JException { + @Test + void testException13() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", "", "system"); fail("Should not reach this"); @@ -234,7 +254,8 @@ public void testException13() throws XRd4JException { * Test for ConsumerMember constructor (4 parameters). Member code is. * @throws XRd4JException if there's a XRd4J error */ - public void testException14() throws XRd4JException { + @Test + void testException14() throws XRd4JException { try { ConsumerMember member = new ConsumerMember("FI", "COM", "12345-6", ""); fail("Should not reach this"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java index 875d74c..6b766e7 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java @@ -24,20 +24,25 @@ import org.niis.xrd4j.common.exception.XRd4JException; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; /** * Test cases for ProducerMember class. * * @author Petteri Kivimäki */ -public class ProducerMemberTest extends TestCase { +class ProducerMemberTest { /** * Test for toString method. * @throws XRd4JException if there's a XRd4J error */ - public void testToString() throws XRd4JException { + @Test + void testToString() throws XRd4JException { ProducerMember producer = new ProducerMember("FI", "TestService"); assertEquals("FI.TestService", producer.toString()); producer = new ProducerMember("FI", "COM", "12345-6", "TestService"); @@ -46,32 +51,34 @@ public void testToString() throws XRd4JException { assertEquals("FI_TEST.GOV.12345-6.system.TestService", producer.toString()); producer = new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1"); assertEquals("FI_TEST.GOV.12345-6.system.TestService.v1", producer.toString()); - ConsumerMemberTest.assertFalse(producer.toString().equals("FI_TEST.GOV.12345-6.system.TestService.v2")); - ConsumerMemberTest.assertFalse(producer.toString().equals("FI_TEST.GOV.12345-6.system.TestService")); - ConsumerMemberTest.assertFalse(producer.toString().equals("Fi-TEST.GOV.12345-6.system.TestService")); + assertFalse(producer.toString().equals("FI_TEST.GOV.12345-6.system.TestService.v2")); + assertFalse(producer.toString().equals("FI_TEST.GOV.12345-6.system.TestService")); + assertFalse(producer.toString().equals("Fi-TEST.GOV.12345-6.system.TestService")); } /** * Test for equals method. * @throws XRd4JException if there's a XRd4J error */ - public void testEquals() throws XRd4JException { + @Test + void testEquals() throws XRd4JException { assertEquals(new ProducerMember("FI", "TestService"), new ProducerMember("FI", "TestService")); assertEquals(new ProducerMember("FI", "COM", "12345-6", "TestService"), new ProducerMember("FI", "COM", "12345-6", "TestService")); assertEquals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService"), new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService")); assertEquals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1"), new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1")); - ConsumerMemberTest.assertFalse(new ProducerMember("FI", "FakeService").equals(new ProducerMember("FI", "TestService"))); - ConsumerMemberTest.assertFalse(new ProducerMember("FI", "COM", "12345-6", "TestService").equals(new ProducerMember("FI", "COM", "12345-7", "TestService"))); - ConsumerMemberTest.assertFalse(new ProducerMember("FI", "GOV", "12345-6", "TestService").equals(new ProducerMember("FI", "COM", "12345-6", "TestService"))); - ConsumerMemberTest.assertFalse(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1").equals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v2"))); - ConsumerMemberTest.assertFalse(new ProducerMember("FI_DEV", "GOV", "12345-6", "system", "TestService", "v1").equals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1"))); + assertFalse(new ProducerMember("FI", "FakeService").equals(new ProducerMember("FI", "TestService"))); + assertFalse(new ProducerMember("FI", "COM", "12345-6", "TestService").equals(new ProducerMember("FI", "COM", "12345-7", "TestService"))); + assertFalse(new ProducerMember("FI", "GOV", "12345-6", "TestService").equals(new ProducerMember("FI", "COM", "12345-6", "TestService"))); + assertFalse(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1").equals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v2"))); + assertFalse(new ProducerMember("FI_DEV", "GOV", "12345-6", "system", "TestService", "v1").equals(new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", "v1"))); } /** * Test for ProducerMember constructor (2 parameters). SDSBInstance is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException1() throws XRd4JException { + @Test + void testException1() throws XRd4JException { try { new ProducerMember(null, "TestService"); fail("Should not reach this"); @@ -84,7 +91,8 @@ public void testException1() throws XRd4JException { * Test for ProducerMember constructor (2 parameters). Service code is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException2() throws XRd4JException { + @Test + void testException2() throws XRd4JException { try { new ProducerMember("FI", null); fail("Should not reach this"); @@ -97,7 +105,8 @@ public void testException2() throws XRd4JException { * Test for ProducerMember constructor (2 parameters). SDSBInstance is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException3() throws XRd4JException { + @Test + void testException3() throws XRd4JException { try { new ProducerMember("", "TestService"); fail("Should not reach this"); @@ -110,7 +119,8 @@ public void testException3() throws XRd4JException { * Test for ProducerMember constructor (2 parameters). Service code is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException4() throws XRd4JException { + @Test + void testException4() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", ""); fail("Should not reach this"); @@ -123,7 +133,8 @@ public void testException4() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). SDSBInstance is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException5() throws XRd4JException { + @Test + void testException5() throws XRd4JException { try { ProducerMember member = new ProducerMember(null, "COM", "12345-6", "TestService"); fail("Should not reach this"); @@ -136,7 +147,8 @@ public void testException5() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). MemberClass is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException6() throws XRd4JException { + @Test + void testException6() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", null, "12345-6", "TestService"); fail("Should not reach this"); @@ -149,7 +161,8 @@ public void testException6() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). Member code is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException7() throws XRd4JException { + @Test + void testException7() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", "COM", null, "TestService"); fail("Should not reach this"); @@ -162,7 +175,8 @@ public void testException7() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). Service code is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException8() throws XRd4JException { + @Test + void testException8() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", "COM", "12345-6", null); fail("Should not reach this"); @@ -171,11 +185,12 @@ public void testException8() throws XRd4JException { } } - /** + /** * Test for ProducerMember constructor (4 parameters). SDSB instance is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException9() throws XRd4JException { + @Test + void testException9() throws XRd4JException { try { ProducerMember member = new ProducerMember("", "COM", "12345-6", "TestService"); fail("Should not reach this"); @@ -184,11 +199,12 @@ public void testException9() throws XRd4JException { } } - /** + /** * Test for ProducerMember constructor (4 parameters). Member class is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException10() throws XRd4JException { + @Test + void testException10() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", "", "12345-6", "TestService"); fail("Should not reach this"); @@ -201,7 +217,8 @@ public void testException10() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). Member code is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException11() throws XRd4JException { + @Test + void testException11() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", "COM", "", "TestService"); fail("Should not reach this"); @@ -214,7 +231,8 @@ public void testException11() throws XRd4JException { * Test for ProducerMember constructor (4 parameters). Service code is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException12() throws XRd4JException { + @Test + void testException12() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI", "COM", "12345-6", ""); fail("Should not reach this"); @@ -228,7 +246,8 @@ public void testException12() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException13() throws XRd4JException { + @Test + void testException13() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", null, "TestService"); fail("Should not reach this"); @@ -242,7 +261,8 @@ public void testException13() throws XRd4JException { * empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException14() throws XRd4JException { + @Test + void testException14() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "", "TestService"); fail("Should not reach this"); @@ -256,7 +276,8 @@ public void testException14() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException15() throws XRd4JException { + @Test + void testException15() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", null); fail("Should not reach this"); @@ -270,7 +291,8 @@ public void testException15() throws XRd4JException { * empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException16() throws XRd4JException { + @Test + void testException16() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "TestService", ""); fail("Should not reach this"); @@ -284,7 +306,8 @@ public void testException16() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException17() throws XRd4JException { + @Test + void testException17() throws XRd4JException { try { ProducerMember member = new ProducerMember(null, "GOV", "12345-6", "system", "TestService", "v1"); fail("Should not reach this"); @@ -298,7 +321,8 @@ public void testException17() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException18() throws XRd4JException { + @Test + void testException18() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", null, "12345-6", "system", "TestService", "v1"); fail("Should not reach this"); @@ -311,7 +335,8 @@ public void testException18() throws XRd4JException { * Test for ProducerMember constructor (6 parameters). Member code is null. * @throws XRd4JException if there's a XRd4J error */ - public void testException19() throws XRd4JException { + @Test + void testException19() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", null, "system", "TestService", "v1"); fail("Should not reach this"); @@ -325,7 +350,8 @@ public void testException19() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException20() throws XRd4JException { + @Test + void testException20() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", null, "TestService", "v1"); fail("Should not reach this"); @@ -339,7 +365,8 @@ public void testException20() throws XRd4JException { * null. * @throws XRd4JException if there's a XRd4J error */ - public void testException21() throws XRd4JException { + @Test + void testException21() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "system", null, "v1"); fail("Should not reach this"); @@ -348,11 +375,12 @@ public void testException21() throws XRd4JException { } } - /** + /** * Test for ProducerMember constructor (6 parameters). SDSB instance is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException22() throws XRd4JException { + @Test + void testException22() throws XRd4JException { try { ProducerMember member = new ProducerMember("", "GOV", "12345-6", "system", "TestService", "v1"); fail("Should not reach this"); @@ -361,11 +389,12 @@ public void testException22() throws XRd4JException { } } - /** + /** * Test for ProducerMember constructor (6 parameters). Member class is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException23() throws XRd4JException { + @Test + void testException23() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "", "12345-6", "system", "TestService", "v1"); fail("Should not reach this"); @@ -378,7 +407,8 @@ public void testException23() throws XRd4JException { * Test for ProducerMember constructor (6 parameters). Member code is empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException24() throws XRd4JException { + @Test + void testException24() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "", "system", "TestService", "v1"); fail("Should not reach this"); @@ -392,7 +422,8 @@ public void testException24() throws XRd4JException { * empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException25() throws XRd4JException { + @Test + void testException25() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "", "TestService", "v1"); fail("Should not reach this"); @@ -406,7 +437,8 @@ public void testException25() throws XRd4JException { * empty. * @throws XRd4JException if there's a XRd4J error */ - public void testException26() throws XRd4JException { + @Test + void testException26() throws XRd4JException { try { ProducerMember member = new ProducerMember("FI_TEST", "GOV", "12345-6", "system", "", "v1"); fail("Should not reach this"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java index 99a30cc..73a28c7 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java @@ -24,25 +24,30 @@ import org.niis.xrd4j.common.exception.XRd4JException; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; /** * Test cases for SecurityServer class. * * @author Petteri Kivimäki */ -public class SecurityServerTest extends TestCase { +class SecurityServerTest { /** * Test for toString method. * * @throws XRd4JException if there's a XRd4J error */ - public void testToString() throws XRd4JException { + @Test + void testToString() throws XRd4JException { SecurityServer server = new SecurityServer("FI", "COM", "12345-6", "myserver"); assertEquals("FI.COM.12345-6.myserver", server.toString()); - SecurityServerTest.assertFalse(server.toString().equals("Fi.COM.12345-6.myserver")); - SecurityServerTest.assertFalse(server.toString().equals("FI.cOm.12345-6.myserver")); + assertFalse(server.toString().equals("Fi.COM.12345-6.myserver")); + assertFalse(server.toString().equals("FI.cOm.12345-6.myserver")); } /** @@ -50,10 +55,11 @@ public void testToString() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testEquals() throws XRd4JException { + @Test + void testEquals() throws XRd4JException { assertEquals(new SecurityServer("FI", "COM", "12345-6", "myserver"), new SecurityServer("FI", "COM", "12345-6", "myserver")); - SecurityServerTest.assertFalse(new SecurityServer("FI", "COM", "12345-6", "myserver").equals(new SecurityServer("FI", "COM", "12345-6", "testserver"))); - SecurityServerTest.assertFalse(new SecurityServer("FI", "COM", "12345-6", "myserver").equals(new SecurityServer("FI", "COM", "12345-7", "myserver"))); + assertFalse(new SecurityServer("FI", "COM", "12345-6", "myserver").equals(new SecurityServer("FI", "COM", "12345-6", "testserver"))); + assertFalse(new SecurityServer("FI", "COM", "12345-6", "myserver").equals(new SecurityServer("FI", "COM", "12345-7", "myserver"))); } /** @@ -61,7 +67,8 @@ public void testEquals() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException1() throws XRd4JException { + @Test + void testException1() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer(null, "COM", "12345-6", "system"); fail("Should not reach this"); @@ -75,7 +82,8 @@ public void testException1() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException2() throws XRd4JException { + @Test + void testException2() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", null, "12345-6", "system"); fail("Should not reach this"); @@ -89,7 +97,8 @@ public void testException2() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException3() throws XRd4JException { + @Test + void testException3() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", "COM", null, "system"); fail("Should not reach this"); @@ -103,7 +112,8 @@ public void testException3() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException4() throws XRd4JException { + @Test + void testException4() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", "COM", "12345-6", null); fail("Should not reach this"); @@ -118,7 +128,8 @@ public void testException4() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException5() throws XRd4JException { + @Test + void testException5() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("", "COM", "12345-6", "system"); fail("Should not reach this"); @@ -133,7 +144,8 @@ public void testException5() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException6() throws XRd4JException { + @Test + void testException6() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", "", "", "system"); fail("Should not reach this"); @@ -147,7 +159,8 @@ public void testException6() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException7() throws XRd4JException { + @Test + void testException7() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", "COM", "", "system"); fail("Should not reach this"); @@ -161,7 +174,8 @@ public void testException7() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException8() throws XRd4JException { + @Test + void testException8() throws XRd4JException { try { SecurityServer securityServer = new SecurityServer("FI", "COM", "12345-6", ""); fail("Should not reach this"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java index 8848207..ea92b6d 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java @@ -28,14 +28,19 @@ import org.niis.xrd4j.common.member.SecurityServer; import org.niis.xrd4j.common.util.MessageHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; /** * Test cases for ServiceRequest class. * * @author Petteri Kivimäki */ -public class ServiceRequestTest extends TestCase { +class ServiceRequestTest { private ConsumerMember consumer; private ProducerMember producer; @@ -46,9 +51,8 @@ public class ServiceRequestTest extends TestCase { * * @throws Exception */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @BeforeEach + void setUp() throws Exception { this.consumer = new ConsumerMember("FI", "COM", "12345-5", "system"); this.producer = new ProducerMember("FI", "GOV", "12345-6", "system", "TestService", "v1"); this.securityServer = new SecurityServer("FI", "GOV", "12345-6", "myserver"); @@ -59,13 +63,14 @@ protected void setUp() throws Exception { * * @throws XRd4JException if there's a XRd4J error */ - public void testToString() throws XRd4JException { + @Test + void testToString() throws XRd4JException { String id = MessageHelper.generateId(); ServiceRequest request = new ServiceRequest(consumer, producer, "12345"); assertEquals("12345", request.toString()); request = new ServiceRequest(consumer, producer, id); assertEquals(id, request.toString()); - ServiceRequestTest.assertFalse(request.toString().equals(id + "1")); + assertFalse(request.toString().equals(id + "1")); assertEquals("4.0", request.getProtocolVersion()); request.setProtocolVersion("5.0"); assertEquals("5.0", request.getProtocolVersion()); @@ -76,7 +81,8 @@ public void testToString() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testEquals() throws XRd4JException { + @Test + void testEquals() throws XRd4JException { String id = MessageHelper.generateId(); assertEquals(new ServiceRequest(consumer, producer, "12345"), new ServiceRequest(consumer, producer, "12345")); assertEquals(new ServiceRequest(consumer, producer, id), new ServiceRequest(consumer, producer, id)); @@ -87,8 +93,8 @@ public void testEquals() throws XRd4JException { assertEquals(req1.getSecurityServer(), req2.getSecurityServer()); this.securityServer = new SecurityServer("FI", "GOV", "12345-7", "myserver"); req2.setSecurityServer(securityServer); - ServiceRequestTest.assertFalse(req1.getSecurityServer().equals(req2.getSecurityServer())); - ServiceRequestTest.assertFalse(new ServiceRequest(consumer, producer, MessageHelper.generateId()).equals(new ServiceRequest(consumer, producer, MessageHelper.generateId()))); + assertFalse(req1.getSecurityServer().equals(req2.getSecurityServer())); + assertFalse(new ServiceRequest(consumer, producer, MessageHelper.generateId()).equals(new ServiceRequest(consumer, producer, MessageHelper.generateId()))); } /** @@ -96,7 +102,8 @@ public void testEquals() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException1() throws XRd4JException { + @Test + void testException1() throws XRd4JException { try { ServiceRequest request = new ServiceRequest(null, producer, "12345"); fail("Should not reach this"); @@ -110,7 +117,8 @@ public void testException1() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException2() throws XRd4JException { + @Test + void testException2() throws XRd4JException { try { ServiceRequest request = new ServiceRequest(consumer, null, "12345"); fail("Should not reach this"); @@ -124,7 +132,8 @@ public void testException2() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException3() throws XRd4JException { + @Test + void testException3() throws XRd4JException { try { ServiceRequest request = new ServiceRequest(consumer, producer, null); fail("Should not reach this"); @@ -138,7 +147,8 @@ public void testException3() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException4() throws XRd4JException { + @Test + void testException4() throws XRd4JException { try { ServiceRequest request = new ServiceRequest(consumer, producer, ""); fail("Should not reach this"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java index d588b1f..4f9ec17 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java @@ -27,14 +27,19 @@ import org.niis.xrd4j.common.member.ProducerMember; import org.niis.xrd4j.common.util.MessageHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; /** * Test cases for ServiceResponse class. * * @author Petteri Kivimäki */ -public class ServiceResponseTest extends TestCase { +class ServiceResponseTest { private ConsumerMember consumer; private ProducerMember producer; @@ -44,9 +49,8 @@ public class ServiceResponseTest extends TestCase { * * @throws Exception */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @BeforeEach + void setUp() throws Exception { this.consumer = new ConsumerMember("FI", "COM", "12345-5", "system"); this.producer = new ProducerMember("FI", "GOV", "12345-6", "system", "TestService", "v1"); } @@ -56,13 +60,14 @@ protected void setUp() throws Exception { * * @throws XRd4JException if there's a XRd4J error */ - public void testToString() throws XRd4JException { + @Test + void testToString() throws XRd4JException { String id = MessageHelper.generateId(); ServiceResponse response = new ServiceResponse(consumer, producer, "12345"); assertEquals("12345", response.toString()); response = new ServiceResponse(consumer, producer, id); assertEquals(id, response.toString()); - ServiceResponseTest.assertFalse(response.toString().equals(id + "1")); + assertFalse(response.toString().equals(id + "1")); assertEquals("4.0", response.getProtocolVersion()); response.setProtocolVersion("5.0"); assertEquals("5.0", response.getProtocolVersion()); @@ -73,11 +78,12 @@ public void testToString() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testEquals() throws XRd4JException { + @Test + void testEquals() throws XRd4JException { String id = MessageHelper.generateId(); assertEquals(new ServiceResponse(consumer, producer, "12345"), new ServiceResponse(consumer, producer, "12345")); assertEquals(new ServiceResponse(consumer, producer, id), new ServiceResponse(consumer, producer, id)); - ServiceResponseTest.assertFalse(new ServiceResponse(consumer, producer, MessageHelper.generateId()).equals(new ServiceResponse(consumer, producer, MessageHelper.generateId()))); + assertFalse(new ServiceResponse(consumer, producer, MessageHelper.generateId()).equals(new ServiceResponse(consumer, producer, MessageHelper.generateId()))); } /** @@ -85,7 +91,8 @@ public void testEquals() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException1() throws XRd4JException { + @Test + void testException1() throws XRd4JException { try { ServiceResponse response = new ServiceResponse(null, producer, "12345"); fail("Should not reach this"); @@ -99,7 +106,8 @@ public void testException1() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException2() throws XRd4JException { + @Test + void testException2() throws XRd4JException { try { ServiceResponse response = new ServiceResponse(consumer, null, "12345"); fail("Should not reach this"); @@ -113,7 +121,8 @@ public void testException2() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException3() throws XRd4JException { + @Test + void testException3() throws XRd4JException { try { ServiceResponse response = new ServiceResponse(consumer, producer, null); fail("Should not reach this"); @@ -127,7 +136,8 @@ public void testException3() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testException4() throws XRd4JException { + @Test + void testException4() throws XRd4JException { try { ServiceResponse response = new ServiceResponse(consumer, producer, ""); fail("Should not reach this"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java index b16a95b..3c47885 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java @@ -22,7 +22,7 @@ */ package org.niis.xrd4j.common.security; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import java.io.FileNotFoundException; import java.io.IOException; @@ -32,12 +32,14 @@ import java.security.UnrecoverableEntryException; import java.security.cert.CertificateException; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for AsymmetricEncrypter class. The cases cover decryption too. * * @author Petteri Kivimäki */ -public class AsymmetricEncrypterTest extends TestCase { +class AsymmetricEncrypterTest { // Public key private static final String PUBLIC_KEY_FILE = "src/test/resources/mytruststore1.jks"; @@ -60,7 +62,8 @@ public class AsymmetricEncrypterTest extends TestCase { * @throws CertificateException * @throws UnrecoverableEntryException */ - public void testEncryption1() throws KeyStoreException, IOException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, UnrecoverableEntryException { + @Test + void testEncryption1() throws KeyStoreException, IOException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, UnrecoverableEntryException { Encrypter ae = new AsymmetricEncrypter(PUBLIC_KEY_FILE, PUBLIC_KEY_FILE_PASS, PUBLIC_KEY_ALIAS); Key key = CryptoHelper.generateAESKey(128); String sessionKey = CryptoHelper.encodeBase64(key.getEncoded()); @@ -85,7 +88,8 @@ public void testEncryption1() throws KeyStoreException, IOException, FileNotFoun * @throws CertificateException * @throws UnrecoverableEntryException */ - public void testEncryption2() throws KeyStoreException, IOException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, UnrecoverableEntryException { + @Test + void testEncryption2() throws KeyStoreException, IOException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, UnrecoverableEntryException { String msg = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==1234567890 Каллио9876543210"; //############################## // BEGIN: encrypt data diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java index 582a8a4..bf1bce8 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java @@ -22,7 +22,7 @@ */ package org.niis.xrd4j.common.security; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -30,12 +30,15 @@ import java.security.PublicKey; import java.security.SecureRandom; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for CryptoHelper class. The cases cover decryption too. * * @author Petteri Kivimäki */ -public class CryptoHelperTest extends TestCase { +class CryptoHelperTest { // Public key private static final String PUBLIC_KEY_FILE = "src/test/resources/mytruststore1.jks"; @@ -50,7 +53,8 @@ public class CryptoHelperTest extends TestCase { /** * Test signature with a simple string. */ - public void testSignature1() { + @Test + void testSignature1() { String data = "This is a test string that contains strange charaters: ÄäÅåÖö Библиотека Каллио"; assertEquals(true, this.createAndverifySignature(data)); } @@ -58,7 +62,8 @@ public void testSignature1() { /** * Test signature with a SOAP message. */ - public void testSignature2() { + @Test + void testSignature2() { String data = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==1234567890 Каллио9876543210"; assertEquals(true, this.createAndverifySignature(data)); } @@ -66,7 +71,8 @@ public void testSignature2() { /** * Test signature with a modified SOAP message. */ - public void testSignature3() { + @Test + void testSignature3() { String data = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==1234567890 Каллио9876543210"; String dataVerify = data + ' '; assertEquals(false, this.createAndverifySignature(data, dataVerify)); @@ -76,7 +82,8 @@ public void testSignature3() { * Test signature with a SOAP message and generate ECDSA keys during the * test. */ - public void testSignature4() { + @Test + void testSignature4() { String data = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==1234567890 Каллио9876543210"; try { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java index 7e3e6c0..1bea36f 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java @@ -22,24 +22,27 @@ */ package org.niis.xrd4j.common.security; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import java.security.Key; import java.security.NoSuchAlgorithmException; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for SymmetricEncrypter class. The cases cover decryption too. * * @author Petteri Kivimäki */ -public class SymmetricEncrypterTest extends TestCase { +class SymmetricEncrypterTest { /** * Test encrypting and decrypting a simple string containing diacritics. * * @throws NoSuchAlgorithmException */ - public void testEncryption1() throws NoSuchAlgorithmException { + @Test + void testEncryption1() throws NoSuchAlgorithmException { String data = "This is a test string. ÄäÅåÖö Библиотека Каллио"; Key key = CryptoHelper.generateAESKey(128); byte[] iv = CryptoHelper.generateIV(); @@ -56,7 +59,8 @@ public void testEncryption1() throws NoSuchAlgorithmException { * * @throws NoSuchAlgorithmException */ - public void testEncryption2() throws NoSuchAlgorithmException { + @Test + void testEncryption2() throws NoSuchAlgorithmException { String data = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.0ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==12345678909876543210"; Key key = CryptoHelper.generateAESKey(128); byte[] iv = CryptoHelper.generateIV(); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java index 7b8005e..3dc9bbf 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java @@ -26,21 +26,24 @@ import org.niis.xrd4j.common.member.ConsumerMember; import org.niis.xrd4j.common.member.ProducerMember; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test cases for ConfigurationHelper class. * * @author Petteri Kivimäki */ -public class ConfigurationHelperTest extends TestCase { +class ConfigurationHelperTest { /** * Test parsing client ids from string. * * @throws XRd4JException if there's a XRd4J error */ - public void testParseConsumer1() throws XRd4JException { + @Test + void testParseConsumer1() throws XRd4JException { String clientId = "FI_PILOT.GOV.0245437-2"; ConsumerMember consumer = ConfigurationHelper.parseConsumerMember(clientId); @@ -76,7 +79,8 @@ public void testParseConsumer1() throws XRd4JException { * * @throws XRd4JException if there's a XRd4J error */ - public void testParseProducer1() throws XRd4JException { + @Test + void testParseProducer1() throws XRd4JException { String serviceId = "FI_PILOT.GOV.0245437-2.ConsumerService.getOrganizationList.v1"; ProducerMember producer = ConfigurationHelper.parseProducerMember(serviceId); diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java index ad8f8fb..0c4a7b2 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java @@ -22,7 +22,9 @@ */ package org.niis.xrd4j.common.util; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test cases for MessageHelper class. Test values have been calculated using @@ -32,12 +34,13 @@ * * @author Petteri Kivimäki */ -public class MessageHelperTest extends TestCase { +class MessageHelperTest { /** * Test for calculating Base64 encoded hash using SHA-512 algorithm. */ - public void testCalculateHash() { + @Test + void testCalculateHash() { assertEquals("7iaw3Ur350mqGo7jwQrpkj9hiYB3Lkc/iBml1JQODbJ6wYX4oOHV+E+IvIh/1nsUNzLDBMxfqa2Ob1f1ACio/w==", MessageHelper.calculateHash("test")); assertEquals("VxRyq5GZc5xJZQFWKZsUobdzXqg8lwR9Cponu5m6XJgVMjhGVbxdbZBYEsQETnwIgsscb2h8j9rKvm40yqiuPg==", MessageHelper.calculateHash("string hash test")); } diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java index f2d3f70..6289ff1 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java @@ -22,7 +22,7 @@ */ package org.niis.xrd4j.common.util; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; import javax.xml.soap.SOAPElement; @@ -31,17 +31,21 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for SOAPHelper class. * * @author Petteri Kivimäki */ -public class SOAPHelperTest extends TestCase { +class SOAPHelperTest { /** * Multiple parameters with the same name. */ - public void testNodesToMap1() { + @Test + void testNodesToMap1() { String xml = "value1value2value3value1value2\n"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map nodes = SOAPHelper.nodesToMap(soap.getChildNodes()); @@ -62,7 +66,8 @@ public void testNodesToMap1() { /** * Unique parameter names with tabs and line breaks. */ - public void testNodesToMap2() { + @Test + void testNodesToMap2() { String xml = "\n\tvalue1\nvalue2\r\nvalue3"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map nodes = SOAPHelper.nodesToMap(soap.getChildNodes()); @@ -83,7 +88,8 @@ public void testNodesToMap2() { /** * Multiple parameters with the same name inside en extra wrapper element. */ - public void testNodesToMap3() { + @Test + void testNodesToMap3() { String xml = "value1value2value3"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map nodes = SOAPHelper.nodesToMap(soap.getChildNodes()); @@ -105,7 +111,8 @@ public void testNodesToMap3() { * Multiple parameters with the same name inside two extra wrapper elements * with tabs and line breaks. */ - public void testNodesToMap4() { + @Test + void testNodesToMap4() { String xml = "\n\n\tvalue1\r\nvalue2value3"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map nodes = SOAPHelper.nodesToMap(soap.getChildNodes()); @@ -126,7 +133,8 @@ public void testNodesToMap4() { /** * Multiple parameters with the same name. */ - public void testNodesToMultiMap1() { + @Test + void testNodesToMultiMap1() { String xml = "value1value2value3value1value2"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map> nodes = SOAPHelper.nodesToMultiMap(soap.getChildNodes()); @@ -182,7 +190,8 @@ public void testNodesToMultiMap1() { /** * Multiple parameters with the same name inside an extra wrapper element. */ - public void testNodesToMultiMap2() { + @Test + void testNodesToMultiMap2() { String xml = "value1value2value3value1value2"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map> nodes = SOAPHelper.nodesToMultiMap(soap.getChildNodes()); @@ -234,7 +243,8 @@ public void testNodesToMultiMap2() { * Multiple parameters with the same name inside two extra wrapper elements * with tabs and line breaks. */ - public void testNodesToMultiMap3() { + @Test + void testNodesToMultiMap3() { String xml = "\n\nvalue1\n\n\t\tvalue2\r\nvalue3\t\nvalue1value2\t\n"; SOAPElement soap = SOAPHelper.xmlStrToSOAPElement(xml); Map> nodes = SOAPHelper.nodesToMultiMap(soap.getChildNodes()); @@ -285,7 +295,8 @@ public void testNodesToMultiMap3() { /** * Test reading version information */ - public void testGetXRdVersionInfo1() { + @Test + void testGetXRdVersionInfo1() { String xml = "SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroadPackagesaccountsservice0.6.35-0ubuntu7.3acpid1:2.0.21-1ubuntu2xroad-addon-messagelog6.9.0-1.20170104084337gitb8fe14axroad-addon-metaservices6.9.0-1.20170104084337gitb8fe14axroad-addon-proxymonitor6.9.0-1.20170104084337gitb8fe14axroad-addon-wsdlvalidator6.9.0-1.20170104084337gitb8fe14axroad-common6.9.0-1.20170104084337gitb8fe14axroad-jetty96.9.0-1.20170104084337gitb8fe14axroad-monitor6.9.0-1.20170104084337gitb8fe14axroad-proxy6.9.0-1.20170104084337gitb8fe14axroad-securityserver6.9.0-1.20170104084337gitb8fe14axroad-securityserver-fi6.9.0-1.20170104084337gitb8fe14axz-utils5.1.1alpha+20120614-2ubuntu2zerofree1.0.2-1ubuntu1zlib1g1:1.2.8.dfsg-1ubuntu1"; SOAPElement message = SOAPHelper.xmlStrToSOAPElement(xml); NodeList list = message.getElementsByTagNameNS(Constants.NS_ENV_MONITORING_URL, Constants.NS_ENV_MONITORING_ELEM_METRIC_SET); @@ -306,7 +317,8 @@ public void testGetXRdVersionInfo1() { /** * Test reading version information */ - public void testGetXRdVersionInfo2() { + @Test + void testGetXRdVersionInfo2() { String xml = "SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroadPackagesaccountsservice0.6.35-0ubuntu7.3acpid1:2.0.21-1ubuntu2xz-utils5.1.1alpha+20120614-2ubuntu2zerofree1.0.2-1ubuntu1zlib1g1:1.2.8.dfsg-1ubuntu1"; SOAPElement message = SOAPHelper.xmlStrToSOAPElement(xml); NodeList list = message.getElementsByTagNameNS(Constants.NS_ENV_MONITORING_URL, Constants.NS_ENV_MONITORING_ELEM_METRIC_SET); @@ -318,7 +330,8 @@ public void testGetXRdVersionInfo2() { /** * Test reading version information */ - public void testGetXRdVersionInfo3() { + @Test + void testGetXRdVersionInfo3() { String xml = "SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroadPackages"; SOAPElement message = SOAPHelper.xmlStrToSOAPElement(xml); NodeList list = message.getElementsByTagNameNS(Constants.NS_ENV_MONITORING_URL, Constants.NS_ENV_MONITORING_ELEM_METRIC_SET); @@ -330,7 +343,8 @@ public void testGetXRdVersionInfo3() { /** * Test reading version information */ - public void testGetXRdVersionInfo4() { + @Test + void testGetXRdVersionInfo4() { String xml = "SERVER:FI/GOV/MEMBER1/server1proxyVersion6.9.0-1.20170104084337gitb8fe14asystemMetricsCommittedVirtualMemory2017-02-18T05:13:54.864Z23310786562331078656233107865623310786560.0DiskSpaceFree_/4594552832OperatingSystemLinux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016Processes1processId1commandinitcpuLoad5.1memUsed0.0startTime11:21userIdroot Xroad Processes1161processId1161command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx192m -XX:MaxMetaspaceSize=100m -Djruby.compile.mode=OFF -Djna.tmpdir=/var/lib/xroad -Djetty.admin.port=8083 -Djetty.public.port=8084 -Daddon.extraClasspath= -Dlogback.configurationFile=/etc/xroad/conf.d/jetty-logback.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jetty9/start.jar org.eclipse.jetty.start.Main jetty.home=/usr/share/xroad/jetty9cpuLoad9.3memUsed2.6startTime11:22userIdxroad1162processId1162command/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx50m -XX:MaxMetaspaceSize=30m -Dlogback.configurationFile=/etc/xroad/conf.d/confclient-logback-service.xml -XX:+UseG1GC -Dfile.encoding=UTF-8 -Xshare:auto -Djdk.tls.ephemeralDHKeySize=2048 -cp /usr/share/xroad/jlib/configuration-client.jar ee.ria.xroad.common.conf.globalconf.ConfigurationClientMaincpuLoad11.0memUsed2.7startTime11:22userIdxroad"; SOAPElement message = SOAPHelper.xmlStrToSOAPElement(xml); NodeList list = message.getElementsByTagNameNS(Constants.NS_ENV_MONITORING_URL, Constants.NS_ENV_MONITORING_ELEM_METRIC_SET); diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index fce8f27..ea1beea 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -15,13 +15,12 @@ org-json-json = { module = "org.json:json", version.ref = "org-json-json" } org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version = "1.7.30" } org-slf4j-slf4jLog4j12 = {module = "org.slf4j:slf4j-log4j12", version = "1.7.30" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version = "2.17.1" } -junit-junit = { module = "junit:junit", version = "4.13.1" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version = "5.10.3" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } [bundles] -testImplementation = [ "junit-junit", "junit-jupiter", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] +testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] [plugins] diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java index dcbee9f..9957ad1 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java @@ -24,7 +24,8 @@ import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.w3c.dom.Document; import org.w3c.dom.NodeList; @@ -36,12 +37,15 @@ import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for JSONToXMLConverter class. * * @author Petteri Kivimäki */ -public class JSONToXMLConverterTest extends TestCase { +class JSONToXMLConverterTest { private Converter converter; @@ -50,16 +54,16 @@ public class JSONToXMLConverterTest extends TestCase { * * @throws Exception */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @BeforeEach + void setUp() throws Exception { this.converter = new JSONToXMLConverter(); } /** * Test converting single string element. */ - public void testSingleStrElement() { + @Test + void testSingleStrElement() { String correctXml = "value1"; String json = "{\"key1\":\"value1\"}"; String xml = this.converter.convert(json); @@ -69,7 +73,8 @@ public void testSingleStrElement() { /** * Test converting multiple string elements. */ - public void testMultipleStrElements() { + @Test + void testMultipleStrElements() { List elements = new ArrayList<>(); elements.add("value1"); elements.add("value2"); @@ -90,7 +95,8 @@ public void testMultipleStrElements() { /** * Test converting single string element. */ - public void testSingleIntElement() { + @Test + void testSingleIntElement() { String correctXml = "1"; String json = "{\"key1\":1}"; String xml = this.converter.convert(json); @@ -100,7 +106,8 @@ public void testSingleIntElement() { /** * Test converting multiple string, int and boolean elements. */ - public void testMultipleElements() { + @Test + void testMultipleElements() { List elements = new ArrayList<>(); elements.add("value1"); elements.add("true"); @@ -121,7 +128,8 @@ public void testMultipleElements() { /** * Test converting nested element. */ - public void testNestedElement() throws XPathExpressionException { + @Test + void testNestedElement() throws XPathExpressionException { String json = "{\"request\":{\"key1\":\"value1\"}}"; String xml = this.converter.convert(json); Document xmlConverted = SOAPHelper.xmlStrToDoc(xml); @@ -133,7 +141,8 @@ public void testNestedElement() throws XPathExpressionException { /** * Test converting nested elements. */ - public void testNestedElements1() throws XPathExpressionException { + @Test + void testNestedElements1() throws XPathExpressionException { String json = "{\"request\":{\"key1\":\"value1\",\"key2\":true,\"key3\":3}}"; String xml = this.converter.convert(json); Document xmlConverted = SOAPHelper.xmlStrToDoc(xml); @@ -147,7 +156,8 @@ public void testNestedElements1() throws XPathExpressionException { /** * Test converting nested elements. */ - public void testNestedElements2() throws XPathExpressionException { + @Test + void testNestedElements2() throws XPathExpressionException { String json = "{\"menu\": {\"id\": \"file\",\"value\": \"File\",\"popup\": {\"menuitem\": [{\"value\": \"New\", \"onclick\": \"CreateNewDoc()\"},{\"value\": \"Open\", \"onclick\": \"OpenDoc()\"},{\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}]}}}"; String xml = this.converter.convert(json); @@ -177,7 +187,8 @@ public void testNestedElements2() throws XPathExpressionException { /** * Test converting nested elements. */ - public void testNestedElements3() { + @Test + void testNestedElements3() { List elements = new ArrayList<>(); elements.add("49"); elements.add("City of Espoo"); @@ -202,7 +213,8 @@ public void testNestedElements3() { /** * Test converting nested elements. */ - public void testArray() throws XPathExpressionException { + @Test + void testArray() throws XPathExpressionException { List elements = new ArrayList<>(); elements.add("49"); elements.add("City of Espoo"); @@ -236,7 +248,8 @@ public void testArray() throws XPathExpressionException { * Test key named array. This behavior could be considered a bug in * org.json. */ - public void testNotNestingArrayTags() { + @Test + void testNotNestingArrayTags() { /* * When passing JSON with a key "array" and an array-type value, we would * require nested sets of tags, but org.json gives us only one level: @@ -254,7 +267,8 @@ public void testNotNestingArrayTags() { * Test empty array in object is removed. This behavior could be considered * a bug in org.json. */ - public void testEmptyArray() { + @Test + void testEmptyArray() { List elements = new ArrayList<>(); elements.add("one"); elements.add("two"); @@ -280,7 +294,8 @@ public void testEmptyArray() { /** * Test a deep structure comes through correctly. */ - public void testDeepData() { + @Test + void testDeepData() { List elements = new ArrayList<>(); elements.add("1"); elements.add("2"); @@ -308,7 +323,8 @@ public void testDeepData() { /** * Test converting JSON-LD to XML. */ - public void testJSONLD1() { + @Test + void testJSONLD1() { List elements = new ArrayList<>(); elements.add("<__at__context>http://json-ld.org/contexts/person.jsonld"); elements.add("John Lennon"); diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java index 9bd6475..eb5bfb3 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java @@ -22,19 +22,23 @@ */ package org.niis.xrd4j.rest.converter; -import junit.framework.TestCase; import org.json.JSONArray; import org.json.JSONObject; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for JSONToXMLConverter class. * * @author Markus Törnqvist */ -public class XMLToJSONConverterTest extends TestCase { +class XMLToJSONConverterTest { private Converter converter; @@ -43,16 +47,16 @@ public class XMLToJSONConverterTest extends TestCase { * * @throws Exception */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @BeforeEach + void setUp() throws Exception { this.converter = new XMLToJSONConverter(); } /** * Test converting single string element. */ - public void testSingleStrElement() { + @Test + void testSingleStrElement() { String correctJsonString = "{\"key1\":\"value1\"}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -64,7 +68,8 @@ public void testSingleStrElement() { /** * Test converting multiple string elements. */ - public void testMultipleStrElements() { + @Test + void testMultipleStrElements() { String correctJsonString = "{\"key4\":\"value4\",\"key3\":\"value3\",\"key2\":\"value2\",\"key1\":\"value1\"}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -76,7 +81,8 @@ public void testMultipleStrElements() { /** * Test converting single string element. */ - public void testSingleIntElement() { + @Test + void testSingleIntElement() { String correctJsonString = "{\"key1\":1}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -88,7 +94,8 @@ public void testSingleIntElement() { /** * Test converting multiple string, int and boolean elements. */ - public void testMultipleElements() { + @Test + void testMultipleElements() { String correctJsonString = "{\"key3\":\"value3\",\"key2\":true,\"key1\":1}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -100,7 +107,8 @@ public void testMultipleElements() { /** * Test converting nested element. */ - public void testNestedElement() { + @Test + void testNestedElement() { String correctJsonString = "{\"request\":{\"key1\":\"value1\"}}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -112,7 +120,8 @@ public void testNestedElement() { /** * Test converting nested elements. */ - public void testNestedElements1() { + @Test + void testNestedElements1() { String correctJsonString = "{\"request\":{\"key3\":3,\"key2\":true,\"key1\":\"value1\"}}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -124,7 +133,8 @@ public void testNestedElements1() { /** * Test converting nested elements. */ - public void testNestedElements2() { + @Test + void testNestedElements2() { String correctJsonString = "{\"menu\":{\"id\":\"file\",\"popup\":{\"menuitem\":[{\"value\":\"New\",\"onclick\":\"CreateNewDoc()\"},{\"value\":\"Open\",\"onclick\":\"OpenDoc()\"},{\"value\":\"Close\",\"onclick\":\"CloseDoc()\"}]},\"value\":\"File\"}}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -136,7 +146,8 @@ public void testNestedElements2() { /** * Test converting nested elements. */ - public void testNestedElements3() { + @Test + void testNestedElements3() { String correctJsonString = "{\"id\":49,\"name_en\":\"City of Espoo\",\"name_sv\":\"Esbo stad\",\"data_source_url\":\"www.espoo.fi\",\"name_fi\":\"Espoon kaupunki\"}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -148,7 +159,8 @@ public void testNestedElements3() { /** * Test converting an array. */ - public void testArray() { + @Test + void testArray() { List elements = new ArrayList<>(); elements.add("\"id\":48"); elements.add("\"name_fi\":\"Espoon kaupunki\""); @@ -182,7 +194,8 @@ public void testArray() { * Test normalizing subject array. This behavior could be considered a bug * in org.json. */ - public void testNormalize() { + @Test + void testNormalize() { // This is what would happen if we didn't normalize // String correctJsonString = "{\"DATA\": {\"array\":[\"one\",\"two\",\"three\"]}}"; String correctJsonString = "{\"DATA\": [\"one\",\"two\",\"three\"]}"; @@ -198,7 +211,8 @@ public void testNormalize() { * Test normalizing subject arrays. This behavior could be considered a bug * in org.json. */ - public void testNormalize1() { + @Test + void testNormalize1() { String correctJsonString = "{\"DATA1\": [\"one\",\"two\",\"three\"], \"DATA2\": [1, 2, 3]}"; JSONObject correctJson = new JSONObject(correctJsonString); @@ -213,7 +227,8 @@ public void testNormalize1() { * Test normalizing deep subject arrays. This behavior could be considered a * bug in org.json. */ - public void testNormalize2() { + @Test + void testNormalize2() { List elements = new ArrayList<>(); elements.add("\"one\""); elements.add("\"two\""); @@ -247,7 +262,8 @@ public void testNormalize2() { * Test normalizing deep subject arrays. This behavior could be considered a * bug in org.json. */ - public void testNormalize3() { + @Test + void testNormalize3() { List elements = new ArrayList<>(); elements.add("\"one\""); elements.add("\"two\""); @@ -279,7 +295,8 @@ public void testNormalize3() { /** * Test converting XML containing JSON-LD to JSON-LD. */ - public void testJSONLD1() { + @Test + void testJSONLD1() { List elements = new ArrayList<>(); elements.add("\"@id\":\"http://dbpedia.org/resource/John_Lennon\""); elements.add("\"name\":\"John Lennon\""); diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java index 7255cde..0fa2485 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java @@ -22,25 +22,28 @@ */ package org.niis.xrd4j.rest.util; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for JSONToXMLConverter class. * * @author Petteri Kivimäki */ -public class ClientUtilTest extends TestCase { +class ClientUtilTest { /** * No parameters, no resource id, no slash in base URI, no question mark in * base uri. */ - public void testBuildClientURL1() { + @Test + void testBuildClientURL1() { String baseURL = "http://api.test.com"; String correctURL = baseURL; Map params = new TreeMap(); @@ -52,7 +55,8 @@ public void testBuildClientURL1() { * No parameters (null), no resource id, no slash in base URI, no question * mark in base uri. */ - public void testBuildClientURL2() { + @Test + void testBuildClientURL2() { String baseURL = "http://api.test.com"; String correctURL = baseURL; Map params = null; @@ -64,7 +68,8 @@ public void testBuildClientURL2() { * Three parameters, no resource id, no slash in base URI, no question mark * in base uri. */ - public void testBuildClientURL3() { + @Test + void testBuildClientURL3() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "?key1=value1&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -79,7 +84,8 @@ public void testBuildClientURL3() { * Three parameters, no resource id, slash in base URI, no question mark in * base uri. */ - public void testBuildClientURL4() { + @Test + void testBuildClientURL4() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "?key1=value1&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -94,7 +100,8 @@ public void testBuildClientURL4() { * Three parameters, no resource id, no slash in base URI, question mark in * base uri. */ - public void testBuildClientURL5() { + @Test + void testBuildClientURL5() { String baseURL = "http://api.test.com?"; String correctURL = baseURL + "key1=value1&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -109,7 +116,8 @@ public void testBuildClientURL5() { * Three parameters, no resource id, slash in base URI, question mark in * base uri. */ - public void testBuildClientURL6() { + @Test + void testBuildClientURL6() { String baseURL = "http://api.test.com/?"; String correctURL = baseURL + "key1=value1&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -123,7 +131,8 @@ public void testBuildClientURL6() { /** * No parameters, resource id, no slash in base URI. */ - public void testBuildClientURL7() { + @Test + void testBuildClientURL7() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "/10"; Map params = new TreeMap(); @@ -135,7 +144,8 @@ public void testBuildClientURL7() { /** * No parameters, resource id, slash in base URI. */ - public void testBuildClientURL8() { + @Test + void testBuildClientURL8() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "10"; Map params = new TreeMap(); @@ -147,7 +157,8 @@ public void testBuildClientURL8() { /** * Two parameters, resource id, no slash in base URI. */ - public void testBuildClientURL9() { + @Test + void testBuildClientURL9() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "/10?key2=value2&key3=value3"; Map params = new TreeMap(); @@ -161,7 +172,8 @@ public void testBuildClientURL9() { /** * Two parameters, resource id, slash in base URI. */ - public void testBuildClientURL10() { + @Test + void testBuildClientURL10() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "10?key2=value2&key3=value3"; Map params = new TreeMap(); @@ -176,7 +188,8 @@ public void testBuildClientURL10() { * One parameter in base URI, two parameters, no resource id, no slash in * base URI. */ - public void testBuildClientURL11() { + @Test + void testBuildClientURL11() { String baseURL = "http://api.test.com?param=1"; String correctURL = baseURL + "&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -190,7 +203,8 @@ public void testBuildClientURL11() { * One parameter in base URI, two parameters, no resource id, slash in base * URI. */ - public void testBuildClientURL12() { + @Test + void testBuildClientURL12() { String baseURL = "http://api.test.com/?param=1"; String correctURL = baseURL + "&key2=value2&key3=value3"; Map params = new TreeMap(); @@ -204,7 +218,8 @@ public void testBuildClientURL12() { * No parameters, no resource id, no slash in base URI, no question mark in * base uri. */ - public void testBuildClientURL13() { + @Test + void testBuildClientURL13() { String baseURL = "http://api.test.com"; String correctURL = baseURL; Map> params = new TreeMap<>(); @@ -216,7 +231,8 @@ public void testBuildClientURL13() { * No parameters (null), no resource id, no slash in base URI, no question * mark in base uri. */ - public void testBuildClientURL14() { + @Test + void testBuildClientURL14() { String baseURL = "http://api.test.com"; String correctURL = baseURL; Map> params = null; @@ -228,7 +244,8 @@ public void testBuildClientURL14() { * Three parameters, no resource id, no slash in base URI, no question mark * in base uri. */ - public void testBuildClientURL15() { + @Test + void testBuildClientURL15() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "?key1=value1&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -249,7 +266,8 @@ public void testBuildClientURL15() { * Three parameters, no resource id, slash in base URI, no question mark in * base uri. */ - public void testBuildClientURL16() { + @Test + void testBuildClientURL16() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "?key1=value1&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -270,7 +288,8 @@ public void testBuildClientURL16() { * Three parameters, no resource id, no slash in base URI, question mark in * base uri. */ - public void testBuildClientURL17() { + @Test + void testBuildClientURL17() { String baseURL = "http://api.test.com?"; String correctURL = baseURL + "key1=value1&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -291,7 +310,8 @@ public void testBuildClientURL17() { * Three parameters, no resource id, slash in base URI, question mark in * base uri. */ - public void testBuildClientURL18() { + @Test + void testBuildClientURL18() { String baseURL = "http://api.test.com/?"; String correctURL = baseURL + "key1=value1&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -311,7 +331,8 @@ public void testBuildClientURL18() { /** * No parameters, resource id, no slash in base URI. */ - public void testBuildClientURL19() { + @Test + void testBuildClientURL19() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "/10"; Map> params = new TreeMap<>(); @@ -325,7 +346,8 @@ public void testBuildClientURL19() { /** * No parameters, resource id, slash in base URI. */ - public void testBuildClientURL20() { + @Test + void testBuildClientURL20() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "10"; Map> params = new TreeMap<>(); @@ -339,7 +361,8 @@ public void testBuildClientURL20() { /** * Two parameters, resource id, no slash in base URI. */ - public void testBuildClientURL21() { + @Test + void testBuildClientURL21() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "/10?key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -359,7 +382,8 @@ public void testBuildClientURL21() { /** * Two parameters, resource id, slash in base URI. */ - public void testBuildClientURL22() { + @Test + void testBuildClientURL22() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "10?key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -380,7 +404,8 @@ public void testBuildClientURL22() { * One parameter in base URI, two parameters, no resource id, no slash in * base URI. */ - public void testBuildClientURL23() { + @Test + void testBuildClientURL23() { String baseURL = "http://api.test.com?param=1"; String correctURL = baseURL + "&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -398,7 +423,8 @@ public void testBuildClientURL23() { * One parameter in base URI, two parameters, no resource id, slash in base * URI. */ - public void testBuildClientURL24() { + @Test + void testBuildClientURL24() { String baseURL = "http://api.test.com/?param=1"; String correctURL = baseURL + "&key2=value2&key3=value3"; Map> params = new TreeMap<>(); @@ -415,7 +441,8 @@ public void testBuildClientURL24() { /** * Two parameters with the same name, no resource id, slash in base URI. */ - public void testBuildClientURL25() { + @Test + void testBuildClientURL25() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "?key=value1&key=value2&key2=value3"; Map> params = new TreeMap<>(); @@ -433,7 +460,8 @@ public void testBuildClientURL25() { /** * Two parameters with the same name, resource id, slash in base URI. */ - public void testBuildClientURL26() { + @Test + void testBuildClientURL26() { String baseURL = "http://api.test.com/"; String correctURL = baseURL + "10?key=value1&key=value2"; Map> params = new TreeMap<>(); @@ -451,7 +479,8 @@ public void testBuildClientURL26() { /** * Two parameters with the same name, no resource id, no slash in base URI. */ - public void testBuildClientURL27() { + @Test + void testBuildClientURL27() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "?key=value1&key=value2"; Map> params = new TreeMap<>(); @@ -466,7 +495,8 @@ public void testBuildClientURL27() { /** * Two parameters with the same name, resource id, no slash in base URI. */ - public void testBuildClientURL28() { + @Test + void testBuildClientURL28() { String baseURL = "http://api.test.com"; String correctURL = baseURL + "/10?key=value1&key=value2&key=value3&key=value4"; Map> params = new TreeMap<>(); diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java index a8bdf91..073ff8e 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java @@ -27,7 +27,7 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.Node; import javax.xml.soap.SOAPException; @@ -35,19 +35,23 @@ import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for CustomRequestDeserializer class. * * @author Petteri Kivimäki */ -public class CustomRequestDeserializerTest extends TestCase { - +class CustomRequestDeserializerTest { + /** * Request from subsystem to service with service version included. * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -68,7 +72,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithWrappers() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -90,7 +95,8 @@ public void test1WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithoutWrappers() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -112,7 +118,8 @@ public void test1WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.51234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -133,7 +140,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.0Field 1Field 2Field 3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -156,7 +164,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112346.0Field 1Field 2Field 3"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -180,7 +189,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.0\n1234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -201,7 +211,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testException1() throws XRd4JException, SOAPException { + @Test + void testException1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112346.51234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -242,7 +253,8 @@ public void testException1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testException2() throws SOAPException, XRd4JException { + @Test + void testException2() throws SOAPException, XRd4JException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java index 79767fa..fc21cf5 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java @@ -27,17 +27,20 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + /** * Test cases for ServiceRequestDeserializer class. * * @author Petteri Kivimäki */ -public class ServiceRequestDeserializerTest extends TestCase { +class ServiceRequestDeserializerTest { /** * Request from subsystem to service with service version included. @@ -45,7 +48,8 @@ public class ServiceRequestDeserializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -77,7 +81,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String soapString = "FICOMMEMBER1FICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.11234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -109,7 +114,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFIgetRandomEE1234567890ID112346.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -141,7 +147,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1FIgetRandomEE1234567890ID112347.51234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -173,7 +180,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomEE1234567890ID1123410.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -205,7 +213,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test6() throws XRd4JException, SOAPException { + @Test + void test6() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomv1EE1234567890ID1123411.51234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -237,7 +246,8 @@ public void test6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test7() throws XRd4JException, SOAPException { + @Test + void test7() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomEE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -269,7 +279,8 @@ public void test7() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test8() throws XRd4JException, SOAPException { + @Test + void test8() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID112344.0issue1234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -302,7 +313,8 @@ public void test8() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test9() throws XRd4JException, SOAPException { + @Test + void test9() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -335,7 +347,8 @@ public void test9() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test10() throws XRd4JException, SOAPException { + @Test + void test10() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE1234567890ID112344.01234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -372,7 +385,8 @@ public void test10() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test11() throws XRd4JException, SOAPException { + @Test + void test11() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID11234eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.0issue1234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -408,7 +422,8 @@ public void test11() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test12() throws XRd4JException, SOAPException { + @Test + void test12() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID11234eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.0issue1234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -443,7 +458,8 @@ public void test12() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test13() throws XRd4JException, SOAPException { + @Test + void test13() throws XRd4JException, SOAPException { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID11234eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw4.0issue1234567890"; SOAPMessage msg = SOAPHelper.toSOAP(soapString); @@ -478,7 +494,8 @@ public void test13() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testException1() throws SOAPException, XRd4JException { + @Test + void testException1() throws SOAPException, XRd4JException { ServiceRequest request = null; try { String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv11234567890"; @@ -497,7 +514,8 @@ public void testException1() throws SOAPException, XRd4JException { * @throws XRd4JException * @throws SOAPException */ - public void testException2() throws SOAPException, XRd4JException { + @Test + void testException2() throws SOAPException, XRd4JException { ServiceRequest request = null; try { String soapString = "FI-FAILGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv11234567890"; @@ -516,7 +534,8 @@ public void testException2() throws SOAPException, XRd4JException { * @throws XRd4JException * @throws SOAPException */ - public void testException3() throws SOAPException, XRd4JException { + @Test + void testException3() throws SOAPException, XRd4JException { ServiceRequest request = null; try { String soapString = "FITESTMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv11234567890"; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java index 280a9dd..888b8d2 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java @@ -31,7 +31,7 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import junit.framework.TestCase; +import org.junit.jupiter.api.Test; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; @@ -41,12 +41,14 @@ import java.util.LinkedHashMap; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test cases for ServiceResponseSerializer class. * * @author Petteri Kivimäki */ -public class ServiceResponseSerializerTest extends TestCase { +class ServiceResponseSerializerTest { /** * Subsystem level service call. No NS on request. NS prefix on response. @@ -54,7 +56,8 @@ public class ServiceResponseSerializerTest extends TestCase { * @throws XRd4JException * @throws SOAPException */ - public void test1() throws XRd4JException, SOAPException { + @Test + void test1() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -83,7 +86,8 @@ public void test1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithWrappers() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request dataResponse data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -113,7 +117,8 @@ public void test1WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test1WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test1WithoutWrappers() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -143,7 +148,8 @@ public void test1WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test2() throws XRd4JException, SOAPException { + @Test + void test2() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1FICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.5Request data"; String correctResponse = "FIGOVMEMBER1FICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.5Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); @@ -173,7 +179,8 @@ public void test2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test3() throws XRd4JException, SOAPException { + @Test + void test3() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1FICOMMEMBER2getRandomv1EE123456789012345678906.0Request data"; String correctResponse = "FIGOVMEMBER1FICOMMEMBER2getRandomv1EE123456789012345678906.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1"); @@ -204,7 +211,8 @@ public void test3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test4() throws XRd4JException, SOAPException { + @Test + void test4() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomEE123456789012345678904.5Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2getRandomEE123456789012345678904.5Field1Field2Field3"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -238,7 +246,8 @@ public void test4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test5() throws XRd4JException, SOAPException { + @Test + void test5() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomEE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomEE123456789012345678904.0Field1Field2Field3"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -270,7 +279,8 @@ public void test5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test6() throws XRd4JException, SOAPException { + @Test + void test6() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -299,7 +309,8 @@ public void test6() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test7() throws XRd4JException, SOAPException { + @Test + void test7() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678907.5Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678907.5Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -330,7 +341,8 @@ public void test7() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test8() throws XRd4JException, SOAPException { + @Test + void test8() throws XRd4JException, SOAPException { String requestStr = "FICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1subsystem12345678904.0EE1234567890Request data"; String correctResponse = "FICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1subsystem12345678904.0EE1234567890Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -359,7 +371,8 @@ public void test8() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test9() throws XRd4JException, SOAPException { + @Test + void test9() throws XRd4JException, SOAPException { try { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "SOAP-ENV:ServerInternal server error."; @@ -392,7 +405,8 @@ public void test9() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test10() throws XRd4JException, SOAPException { + @Test + void test10() throws XRd4JException, SOAPException { try { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "SOAP-ENV:ServerInternal server error."; @@ -424,7 +438,8 @@ public void test10() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test11() throws XRd4JException, SOAPException { + @Test + void test11() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -453,7 +468,8 @@ public void test11() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test12() throws XRd4JException, SOAPException { + @Test + void test12() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -482,7 +498,8 @@ public void test12() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test13() throws XRd4JException, SOAPException { + @Test + void test13() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -511,7 +528,8 @@ public void test13() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test14() throws XRd4JException, SOAPException { + @Test + void test14() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response dataResponse data 2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -542,7 +560,8 @@ public void test14() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test15() throws XRd4JException, SOAPException { + @Test + void test15() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response dataResponse data 2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -574,7 +593,8 @@ public void test15() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test16() throws XRd4JException, SOAPException { + @Test + void test16() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response dataResponse data 2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -608,7 +628,8 @@ public void test16() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test17() throws XRd4JException, SOAPException { + @Test + void test17() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response dataResponse data 2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -643,7 +664,8 @@ public void test17() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test18() throws XRd4JException, SOAPException { + @Test + void test18() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Response dataResponse data 2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -676,7 +698,8 @@ public void test18() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test19() throws XRd4JException, SOAPException { + @Test + void test19() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -706,7 +729,8 @@ public void test19() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test19WithWrappers() throws XRd4JException, SOAPException { + @Test + void test19WithWrappers() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Request dataResponse data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -737,7 +761,8 @@ public void test19WithWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test19WithoutWrappers() throws XRd4JException, SOAPException { + @Test + void test19WithoutWrappers() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -769,7 +794,8 @@ public void test19WithoutWrappers() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test20() throws XRd4JException, SOAPException { + @Test + void test20() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE1234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw12345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1EE1234567890eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKsw12345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -803,7 +829,8 @@ public void test20() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void test21() throws XRd4JException, SOAPException { + @Test + void test21() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKswEE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1FIGOVMEMBER1server1eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKswEE123456789012345678904.0Response data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -829,14 +856,16 @@ public void test21() throws XRd4JException, SOAPException { assertEquals(correctResponse, SOAPHelper.toString(msg)); } -/** + + /** * Subsystem level service call. No NS on request. NS prefix on response. * Security token and no token type. * * @throws XRd4JException * @throws SOAPException */ - public void test22() throws XRd4JException, SOAPException { + @Test + void test22() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFIGOVMEMBER1server1FICOMMEMBER2subsystemgetRandomv11234567890EE12345678904.0eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKswRequest data"; String correctResponse = "FIGOVMEMBER1subsystemFIGOVMEMBER1server1FICOMMEMBER2subsystemgetRandomv11234567890EE12345678904.0eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiVGVzdCJ9.negHPJEwkKcNcgVC6dNtzPZk_48Kig6IzxnabL9jKswResponse data"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -861,13 +890,15 @@ public void test22() throws XRd4JException, SOAPException { assertEquals(correctResponse, SOAPHelper.toString(msg)); } + /** * SOAP Fault with all the elements. * * @throws XRd4JException * @throws SOAPException */ - public void testSOAPFault1() throws XRd4JException, SOAPException { + @Test + void testSOAPFault1() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "Fault codeFault stringFault actorFault detail"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -898,7 +929,8 @@ public void testSOAPFault1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPFault2() throws XRd4JException, SOAPException { + @Test + void testSOAPFault2() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.5Request data"; String correctResponse = ""; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -930,7 +962,8 @@ public void testSOAPFault2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPFault3() throws XRd4JException, SOAPException { + @Test + void testSOAPFault3() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "Fault codeFault stringFault actor"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -961,7 +994,8 @@ public void testSOAPFault3() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPFault4() throws XRd4JException, SOAPException { + @Test + void testSOAPFault4() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "Fault codeFault stringFault actorField1Field2"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -995,7 +1029,8 @@ public void testSOAPFault4() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPFault5() throws XRd4JException, SOAPException { + @Test + void testSOAPFault5() throws XRd4JException, SOAPException { String correctResponse = "Fault codeFault stringFault actorFault detail"; ServiceResponse response = new ServiceResponse(); ErrorMessage errorMsg = new ErrorMessage("Fault code", "Fault string", "Fault actor", "Fault detail"); @@ -1013,7 +1048,8 @@ public void testSOAPFault5() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPNonTechErr1() throws XRd4JException, SOAPException { + @Test + void testSOAPNonTechErr1() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.5Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.5Fault codeFault string"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -1045,7 +1081,8 @@ public void testSOAPNonTechErr1() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPNonTechErr2() throws XRd4JException, SOAPException { + @Test + void testSOAPNonTechErr2() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678906.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678906.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); @@ -1077,7 +1114,8 @@ public void testSOAPNonTechErr2() throws XRd4JException, SOAPException { * @throws XRd4JException * @throws SOAPException */ - public void testSOAPNonTechErr3() throws XRd4JException, SOAPException { + @Test + void testSOAPNonTechErr3() throws XRd4JException, SOAPException { String requestStr = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0Request data"; String correctResponse = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE123456789012345678904.0"; ConsumerMember consumer = new ConsumerMember("FI", "GOV", "MEMBER1", "subsystem"); From eb0d222a7386f0c0c1eb0108123034f6947219b2 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 26 Jul 2024 11:20:38 +0300 Subject: [PATCH 34/73] chore: update logging dependencies Refs: XRDDEV-2628 --- .../kotlin/xrd4j.java-conventions.gradle.kts | 1 + src/client/src/test/resources/log4j.dtd | 237 ------------------ src/client/src/test/resources/log4j2-test.xml | 16 ++ src/client/src/test/resources/test-log4j.xml | 24 -- src/common/src/test/resources/log4j.dtd | 237 ------------------ src/common/src/test/resources/log4j2-test.xml | 16 ++ src/common/src/test/resources/test-log4j.xml | 24 -- src/gradle/libs.versions.toml | 10 +- src/rest/src/test/resources/log4j.dtd | 237 ------------------ src/rest/src/test/resources/log4j2-test.xml | 16 ++ src/rest/src/test/resources/test-log4j.xml | 24 -- src/server/src/test/resources/log4j.dtd | 237 ------------------ src/server/src/test/resources/log4j2-test.xml | 16 ++ src/server/src/test/resources/test-log4j.xml | 24 -- 14 files changed, 71 insertions(+), 1048 deletions(-) delete mode 100644 src/client/src/test/resources/log4j.dtd create mode 100644 src/client/src/test/resources/log4j2-test.xml delete mode 100644 src/client/src/test/resources/test-log4j.xml delete mode 100644 src/common/src/test/resources/log4j.dtd create mode 100644 src/common/src/test/resources/log4j2-test.xml delete mode 100644 src/common/src/test/resources/test-log4j.xml delete mode 100644 src/rest/src/test/resources/log4j.dtd create mode 100644 src/rest/src/test/resources/log4j2-test.xml delete mode 100644 src/rest/src/test/resources/test-log4j.xml delete mode 100644 src/server/src/test/resources/log4j.dtd create mode 100644 src/server/src/test/resources/log4j2-test.xml delete mode 100644 src/server/src/test/resources/test-log4j.xml diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index c66661c..5f0f631 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -85,6 +85,7 @@ tasks.withType() { tasks.withType() { useJUnitPlatform() + // testLogging.showStandardStreams = true } checkstyle { diff --git a/src/client/src/test/resources/log4j.dtd b/src/client/src/test/resources/log4j.dtd deleted file mode 100644 index 103ef55..0000000 --- a/src/client/src/test/resources/log4j.dtd +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/client/src/test/resources/log4j2-test.xml b/src/client/src/test/resources/log4j2-test.xml new file mode 100644 index 0000000..7fd54a6 --- /dev/null +++ b/src/client/src/test/resources/log4j2-test.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/client/src/test/resources/test-log4j.xml b/src/client/src/test/resources/test-log4j.xml deleted file mode 100644 index 035cf9f..0000000 --- a/src/client/src/test/resources/test-log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/common/src/test/resources/log4j.dtd b/src/common/src/test/resources/log4j.dtd deleted file mode 100644 index 103ef55..0000000 --- a/src/common/src/test/resources/log4j.dtd +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/src/test/resources/log4j2-test.xml b/src/common/src/test/resources/log4j2-test.xml new file mode 100644 index 0000000..29e80b1 --- /dev/null +++ b/src/common/src/test/resources/log4j2-test.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/common/src/test/resources/test-log4j.xml b/src/common/src/test/resources/test-log4j.xml deleted file mode 100644 index 95ed409..0000000 --- a/src/common/src/test/resources/test-log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index ea1beea..fee9291 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -5,6 +5,8 @@ javax-servlet-servlet-api = "2.5" org-apache-httpcomponents-httpclient = "4.5.14" org-apache-httpcomponents-httpcore = "4.4.16" org-json-json = "20220924" +slf4j = "2.0.13" +log4j = "2.23.1" [libraries] com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "1.3.28" } @@ -12,15 +14,15 @@ javax-servlet-servletApi = { module = "javax.servlet:servlet-api", version.ref = org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } -org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version = "1.7.30" } -org-slf4j-slf4jLog4j12 = {module = "org.slf4j:slf4j-log4j12", version = "1.7.30" } -org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version = "2.17.1" } +org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } +org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } +org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version = "5.10.3" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } [bundles] -testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-slf4j-slf4jLog4j12", "org-apache-logging-log4j-log4jCore" ] +testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-apache-logging-log4j-log4jSlf4j2Impl", "org-apache-logging-log4j-log4jCore" ] [plugins] diff --git a/src/rest/src/test/resources/log4j.dtd b/src/rest/src/test/resources/log4j.dtd deleted file mode 100644 index 103ef55..0000000 --- a/src/rest/src/test/resources/log4j.dtd +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/rest/src/test/resources/log4j2-test.xml b/src/rest/src/test/resources/log4j2-test.xml new file mode 100644 index 0000000..974bfd3 --- /dev/null +++ b/src/rest/src/test/resources/log4j2-test.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/rest/src/test/resources/test-log4j.xml b/src/rest/src/test/resources/test-log4j.xml deleted file mode 100644 index 08d8907..0000000 --- a/src/rest/src/test/resources/test-log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/server/src/test/resources/log4j.dtd b/src/server/src/test/resources/log4j.dtd deleted file mode 100644 index 103ef55..0000000 --- a/src/server/src/test/resources/log4j.dtd +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/server/src/test/resources/log4j2-test.xml b/src/server/src/test/resources/log4j2-test.xml new file mode 100644 index 0000000..ffac75f --- /dev/null +++ b/src/server/src/test/resources/log4j2-test.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/server/src/test/resources/test-log4j.xml b/src/server/src/test/resources/test-log4j.xml deleted file mode 100644 index 9d8ed6e..0000000 --- a/src/server/src/test/resources/test-log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 16a0e757101cd7f50babd6d0deed552de07306d2 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 26 Jul 2024 14:30:19 +0300 Subject: [PATCH 35/73] chore: migrate to Jakarta SOAP implementation Refs: XRDDEV-2628 --- .../xrd4j/client/LoadBalancedSOAPClient.java | 4 +-- .../client/LoadBalancedSOAPClientImpl.java | 4 +-- .../org/niis/xrd4j/client/SOAPClient.java | 4 +-- .../org/niis/xrd4j/client/SOAPClientImpl.java | 8 ++--- .../AbstractResponseDeserializer.java | 14 ++++----- ...rityServerMetricsResponseDeserializer.java | 6 ++-- .../ListServicesResponseDeserializer.java | 6 ++-- .../ServiceResponseDeserializer.java | 2 +- .../AbstractServiceRequestSerializer.java | 16 +++++----- .../DefaultServiceRequestSerializer.java | 6 ++-- .../serializer/ServiceRequestSerializer.java | 2 +- .../LoadBalancedSOAPClientImplTest.java | 2 +- .../org/niis/xrd4j/client/SOAPClientTest.java | 10 +++---- ...ServerMetricsResponseDeserializerTest.java | 4 +-- ...ntralServicesResponseDeserializerTest.java | 2 +- .../ListClientsResponseDeserializerTest.java | 2 +- .../ListServicesResponseDeserializerTest.java | 4 +-- .../ServiceResponseDeserializerTest.java | 6 ++-- .../DefaultServiceRequestSerializerTest.java | 4 +-- .../ServiceRequestSerializerTest.java | 8 ++--- .../AbstractHeaderDeserializer.java | 4 +-- .../xrd4j/common/message/AbstractMessage.java | 2 +- .../serializer/AbstractHeaderSerializer.java | 8 ++--- .../niis/xrd4j/common/util/SOAPHelper.java | 30 +++++++++---------- .../xrd4j/common/util/SOAPHelperTest.java | 2 +- src/gradle/libs.versions.toml | 2 +- .../xrd4j/server/AbstractAdapterServlet.java | 10 +++---- .../AbstractCustomRequestDeserializer.java | 12 ++++---- .../CustomRequestDeserializer.java | 2 +- .../ServiceRequestDeserializer.java | 4 +-- .../ServiceRequestDeserializerImpl.java | 10 +++---- .../AbstractServiceResponseSerializer.java | 16 +++++----- .../serializer/ServiceResponseSerializer.java | 2 +- .../niis/xrd4j/server/utils/AdapterUtils.java | 10 +++---- .../CustomRequestDeserializerTest.java | 6 ++-- .../ServiceRequestDeserializerTest.java | 4 +-- .../ServiceResponseSerializerTest.java | 8 ++--- 37 files changed, 123 insertions(+), 123 deletions(-) diff --git a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java index b644bcc..1b5d08d 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java @@ -29,8 +29,8 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java index 81d825a..d9f0aa3 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java @@ -32,8 +32,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java index ba969cf..2ba302c 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java @@ -29,8 +29,8 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java index 5814b66..1fba3d4 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java @@ -43,10 +43,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.SOAPConnection; -import javax.xml.soap.SOAPConnectionFactory; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPConnection; +import jakarta.xml.soap.SOAPConnectionFactory; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.net.MalformedURLException; import java.net.URL; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java index 3f3e625..6ae468f 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java @@ -37,13 +37,13 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.NodeList; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPHeader; +import jakarta.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPPart; import java.util.Map; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java index 32e7cf1..272c755 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java @@ -28,9 +28,9 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.NodeList; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; /** * This class is used for deserializing responses of getSecurityServerMetrics diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java index b35f999..0703f3f 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java @@ -31,9 +31,9 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.NodeList; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.ArrayList; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java index 3d1f67b..3640605 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java @@ -24,7 +24,7 @@ import org.niis.xrd4j.common.message.ServiceResponse; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPMessage; /** * This class defines an interface for deserializing SOAPMessage objects diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java index b09ede2..c47c180 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java @@ -30,14 +30,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.Name; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPBodyElement; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.MessageFactory; +import jakarta.xml.soap.Name; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPBodyElement; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; /** * This abstract class serves as base class for serializer classes that diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java index 8a3def0..9ed883a 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java @@ -24,9 +24,9 @@ import org.niis.xrd4j.common.message.ServiceRequest; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; /** * This class offers default implementation for the abstract diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java index b647f99..90cdb7e 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java @@ -24,7 +24,7 @@ import org.niis.xrd4j.common.message.ServiceRequest; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPMessage; /** * This class defines an interface for serializing ServiceRequest objects diff --git a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java index aea6c8a..5272a56 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPException; import java.util.ArrayList; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java index 2455b48..0ea2324 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java @@ -33,11 +33,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import static org.junit.jupiter.api.Assertions.fail; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java index 972a14b..4361dfd 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java @@ -30,8 +30,8 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.Map; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java index a38400d..3fe8bb3 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPException; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java index caef2ec..cbaad0e 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPException; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java index bea8553..c1b799e 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java @@ -31,8 +31,8 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java index f4b1dae..918a023 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java @@ -30,9 +30,9 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.Map; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java index c36134a..303c777 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java @@ -33,8 +33,8 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java index dcc0af8..4b83976 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java @@ -31,10 +31,10 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java index f004296..84afe78 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java @@ -36,8 +36,8 @@ import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NodeList; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPHeader; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPHeader; import java.util.Map; diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java b/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java index 0aee55c..c512de4 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java @@ -29,7 +29,7 @@ import org.niis.xrd4j.common.util.Constants; import org.niis.xrd4j.common.util.ValidationHelper; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPMessage; /** * This class represents SOAP header fields that are used in both ServiceRequest diff --git a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java index d04d37d..5151d6b 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java @@ -31,10 +31,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPHeader; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPHeader; /** * This abstract class contains methods for adding valid X-Road version 6 SOAP diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index eabe16f..88557a1 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -31,14 +31,14 @@ import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.soap.AttachmentPart; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.MimeHeaders; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.AttachmentPart; +import jakarta.xml.soap.MessageFactory; +import jakarta.xml.soap.MimeHeaders; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; @@ -259,7 +259,7 @@ public static Map nodesToMap(NodeList list, boolean upperCase) { */ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeType() == javax.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { + if (list.item(i).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { nodesToMap(list.item(i).getChildNodes(), upperCase, map); } else { processMapNode(list, i, upperCase, map); @@ -276,10 +276,10 @@ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { - if (list.item(index).getNodeType() == javax.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { + if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { String key = list.item(index).getLocalName(); map.put(upperCase ? key.toUpperCase() : key, ""); - } else if (list.item(index).getNodeType() == javax.xml.soap.Node.TEXT_NODE) { + } else if (list.item(index).getNodeType() == jakarta.xml.soap.Node.TEXT_NODE) { String key = list.item(index).getParentNode().getLocalName(); String value = list.item(index).getNodeValue(); value = value.trim(); @@ -313,7 +313,7 @@ public static Map> nodesToMultiMap(NodeList list) { */ public static void nodesToMultiMap(NodeList list, Map> map) { for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeType() == javax.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { + if (list.item(i).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { nodesToMultiMap(list.item(i).getChildNodes(), map); } else { processMultiMapNode(list, i, map); @@ -329,13 +329,13 @@ public static void nodesToMultiMap(NodeList list, Map> map) * @param map Map for the results */ private static void processMultiMapNode(NodeList list, int index, Map> map) { - if (list.item(index).getNodeType() == javax.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { + if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { String key = list.item(index).getLocalName(); if (!map.containsKey(key)) { map.put(key, new ArrayList<>()); } map.get(key).add(""); - } else if (list.item(index).getNodeType() == javax.xml.soap.Node.TEXT_NODE) { + } else if (list.item(index).getNodeType() == jakarta.xml.soap.Node.TEXT_NODE) { String key = list.item(index).getParentNode().getLocalName(); String value = list.item(index).getNodeValue(); value = value.trim(); @@ -596,7 +596,7 @@ public static void updateNamespaceAndPrefix(NodeList list, String namespace, Str * @return updated Node */ public static Node updateNamespaceAndPrefix(Node node, String namespace, String prefix) { - if (node.getNodeType() == javax.xml.soap.Node.ELEMENT_NODE) { + if (node.getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE) { if (prefix != null && !prefix.isEmpty()) { node = (Node) node.getOwnerDocument().renameNode(node, namespace, prefix + ":" + node.getLocalName()); } else if (namespace != null && !namespace.isEmpty()) { diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java index 6289ff1..e6d0845 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; -import javax.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPElement; import java.util.ArrayList; import java.util.List; diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index fee9291..dcc7633 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -9,7 +9,7 @@ slf4j = "2.0.13" log4j = "2.23.1" [libraries] -com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "1.3.28" } +com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "3.0.4" } javax-servlet-servletApi = { module = "javax.servlet:servlet-api", version.ref = "javax-servlet-servlet-api" } org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index 552a1c6..96816b1 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -42,11 +42,11 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.xml.soap.MimeHeaders; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.MimeHeaders; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.io.IOException; import java.io.PrintWriter; diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java index 891d0c3..27bb718 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java @@ -31,12 +31,12 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.NodeList; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPPart; /** * This abstract class serves as a base class for all the application specific diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java index 441cedf..cfc8841 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java @@ -25,7 +25,7 @@ import org.niis.xrd4j.common.exception.XRd4JException; import org.niis.xrd4j.common.message.ServiceRequest; -import javax.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPException; /** * This class defines an interface for deserializing SOAP body's request diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java index b5ad22f..abc6ebb 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java @@ -25,8 +25,8 @@ import org.niis.xrd4j.common.exception.XRd4JException; import org.niis.xrd4j.common.message.ServiceRequest; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; /** * This class defines an interface for deserializing SOAPMessage objects to diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java index c4195f8..029a787 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java @@ -33,11 +33,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPHeader; +import jakarta.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPPart; /** * This class offers methods for deserializing SOAPMessages to ServiceRequest diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java index 8355619..27fb884 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java @@ -34,14 +34,14 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.NodeList; -import javax.xml.soap.Name; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPBodyElement; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Name; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPBodyElement; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; /** * This abstract class serves as base class for serializer classes that diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java index 7e3490e..f15cab4 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java @@ -25,7 +25,7 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPMessage; /** * This class defines an interface for serializing ServiceResponse objects diff --git a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java index 965d87f..8e9fc03 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java @@ -27,11 +27,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.xml.soap.AttachmentPart; -import javax.xml.soap.MimeHeader; -import javax.xml.soap.MimeHeaders; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.AttachmentPart; +import jakarta.xml.soap.MimeHeader; +import jakarta.xml.soap.MimeHeaders; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.Enumeration; import java.util.Iterator; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java index 073ff8e..189e159 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java @@ -29,9 +29,9 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.Map; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java index fc21cf5..12a28eb 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java @@ -29,8 +29,8 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java index 888b8d2..a722106 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java @@ -33,10 +33,10 @@ import org.junit.jupiter.api.Test; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.LinkedHashMap; import java.util.Map; From 4700704029c87751b9a3377409f498c441964ea3 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Wed, 31 Jul 2024 14:26:09 +0300 Subject: [PATCH 36/73] fix: saaj api usage according to new version Refs: XRDDEV-2628 --- .../niis/xrd4j/common/util/SOAPHelper.java | 99 ++++++++++--------- .../AbstractServiceResponseSerializer.java | 86 ++++++++++------ .../ServiceResponseSerializerTest.java | 4 + 3 files changed, 110 insertions(+), 79 deletions(-) diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index 88557a1..877d14e 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -22,15 +22,6 @@ */ package org.niis.xrd4j.common.util; -import org.niis.xrd4j.common.message.AbstractMessage; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; - -import javax.xml.XMLConstants; -import javax.xml.parsers.DocumentBuilderFactory; import jakarta.xml.soap.AttachmentPart; import jakarta.xml.soap.MessageFactory; import jakarta.xml.soap.MimeHeaders; @@ -39,6 +30,15 @@ import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.niis.xrd4j.common.message.AbstractMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Document; +import org.w3c.dom.NodeList; + +import javax.xml.XMLConstants; +import javax.xml.namespace.QName; +import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; @@ -87,7 +87,7 @@ private SOAPHelper() { * child that matches the given name. If no child with the given is found, * null is returned. * - * @param node parent node + * @param node parent node * @param nodeName name of the node to be searched * @return node with the given name or null */ @@ -238,7 +238,7 @@ public static Map nodesToMap(NodeList list) { * key-value-pairs, localName as the key and NodeValue as the value. Each * key can have only one value. The given NodeList is parsed recursively. * - * @param list NodeList to be transfered + * @param list NodeList to be transfered * @param upperCase store all keys in upper case * @return Map that contains all the list items as key-value-pairs */ @@ -253,9 +253,9 @@ public static Map nodesToMap(NodeList list, boolean upperCase) { * key-value-pairs, localName as the key and NodeValue as the value. Each * key can have only one value. The given NodeList is parsed recursively. * - * @param list NodeList to be transfered + * @param list NodeList to be transfered * @param upperCase store all keys in upper case - * @param map Map for the results + * @param map Map for the results */ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { for (int i = 0; i < list.getLength(); i++) { @@ -270,10 +270,10 @@ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { @@ -309,7 +309,7 @@ public static Map> nodesToMultiMap(NodeList list) { * are stored in a list. The given NodeList is parsed recursively. * * @param list NodeList to be transfered - * @param map Map for the results + * @param map Map for the results */ public static void nodesToMultiMap(NodeList list, Map> map) { for (int i = 0; i < list.getLength(); i++) { @@ -324,9 +324,9 @@ public static void nodesToMultiMap(NodeList list, Map> map) /** * Transfers the given Node to a MultiMap as key - value list pair. * - * @param list NodeList containing the Node to be transfered + * @param list NodeList containing the Node to be transfered * @param index index of the Node to be transfered - * @param map Map for the results + * @param map Map for the results */ private static void processMultiMapNode(NodeList list, int index, Map> map) { if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { @@ -354,27 +354,32 @@ private static void processMultiMapNode(NodeList list, int index, Map { + if (n instanceof SOAPElement) { + addNamespace((SOAPElement) n, message); + } + }); + return soapEl; } + return node; } /** @@ -397,7 +402,7 @@ public static void removeNamespace(Node node) { * contents. If there's no attachment with the given content id or its value * is not a string, null is returned. * - * @param contentId content id of the attachment + * @param contentId content id of the attachment * @param attachments list of attachments to be searched * @return string value of the attachment or null */ @@ -548,11 +553,11 @@ public static void removeAllChildren(Node node) { * URI yet, to elements namespace URI and prefix are recursively copied to * them. * - * @param from source element - * @param to target element + * @param from source element + * @param to target element * @param updateNamespaceAndPrefix should elements namespace URI and prefix - * be applied to all the copied elements if they do not have namespace URI - * yet + * be applied to all the copied elements if they do not have namespace URI + * yet * @throws SOAPException if there's an error */ public static void moveChildren(SOAPElement from, SOAPElement to, boolean updateNamespaceAndPrefix) throws SOAPException { @@ -572,9 +577,9 @@ public static void moveChildren(SOAPElement from, SOAPElement to, boolean update * node does not have namespace URI yet. The list is updated recursively, so * also the children of children (and so on) will be updated. * - * @param list list of nodes to be updated + * @param list list of nodes to be updated * @param namespace target namespace - * @param prefix target prefix + * @param prefix target prefix */ public static void updateNamespaceAndPrefix(NodeList list, String namespace, String prefix) { for (int i = 0; i < list.getLength(); i++) { @@ -590,9 +595,9 @@ public static void updateNamespaceAndPrefix(NodeList list, String namespace, Str * Updates the namespace URI and prefix of the given node with the given * values. If prefix is null or empty, only namespace URI is updated. * - * @param node Node to be updated + * @param node Node to be updated * @param namespace target namespace - * @param prefix target prefix + * @param prefix target prefix * @return updated Node */ public static Node updateNamespaceAndPrefix(Node node, String namespace, String prefix) { @@ -611,7 +616,7 @@ public static Node updateNamespaceAndPrefix(Node node, String namespace, String * monitoring metrics. * * @param metrics NodeList containing "metricSet" element returned by - * environmental monitoring service + * environmental monitoring service * @return installed X-Road packages as key-value pairs */ public static Map getXRdVersionInfo(NodeList metrics) { @@ -652,7 +657,7 @@ public static SOAPMessage createSOAPMessage() throws SOAPException { * Helper function for creating new SOAP messages * * @param mimeHeaders needed for creating SOAP message - * @param is needed for creating SOAP message + * @param is needed for creating SOAP message * @return New SOAP message * @throws IOException on IO error * @throws SOAPException on soap error @@ -669,8 +674,8 @@ public static SOAPMessage createSOAPMessage(MimeHeaders mimeHeaders, InputStream * monitoring metrics. * * @param packages NodeList containing "metricSet" element which children - * all the installed packages are - * @param results Map object for results + * all the installed packages are + * @param results Map object for results */ private static void getXRdPackages(NodeList packages, Map results) { // Loop through packages diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java index 27fb884..1a637b0 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java @@ -22,6 +22,14 @@ */ package org.niis.xrd4j.server.serializer; +import jakarta.xml.soap.Name; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPBodyElement; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import org.niis.xrd4j.common.exception.XRd4JException; import org.niis.xrd4j.common.message.ErrorMessage; import org.niis.xrd4j.common.message.ErrorMessageType; @@ -29,19 +37,14 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.serializer.AbstractHeaderSerializer; import org.niis.xrd4j.common.util.SOAPHelper; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.w3c.dom.NodeList; -import jakarta.xml.soap.Name; -import jakarta.xml.soap.Node; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPBodyElement; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPEnvelope; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPMessage; +import java.util.Iterator; +import java.util.List; +import java.util.Spliterators; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; /** * This abstract class serves as base class for serializer classes that @@ -191,10 +194,11 @@ private SOAPElement processBody(final SOAPBodyElement body, final ServiceRespons private void processRequestNode(final SOAPBodyElement body, final ServiceResponse response, final SOAPMessage soapRequest, final SOAPEnvelope envelope) throws SOAPException { boolean requestFound = false; - NodeList list = soapRequest.getSOAPBody().getElementsByTagNameNS("*", response.getProducer().getServiceCode()); - if (list.getLength() == 1) { + var list = childElementsByLocalName(soapRequest.getSOAPBody(), response.getProducer().getServiceCode()); + + if (list.size() == 1) { // Copy request from soapRequest - requestFound = copyRequestNode((Node) list.item(0), body, response); + requestFound = copyRequestNode(list.get(0), body, response); } // It was not possible to copy the request element, so we must create it if (!requestFound) { @@ -206,18 +210,35 @@ private void processRequestNode(final SOAPBodyElement body, final ServiceRespons } } - private boolean copyRequestNode(final Node node, final SOAPBodyElement body, final ServiceResponse response) { - for (int i = 0; i < node.getChildNodes().getLength(); i++) { - if (node.getChildNodes().item(i).getNodeType() == Node.ELEMENT_NODE - && "request".equals(node.getChildNodes().item(i).getLocalName())) { - Node requestNode = (Node) node.getChildNodes().item(i).cloneNode(true); - Node importNode = (Node) body.getOwnerDocument().importNode(requestNode, true); - body.appendChild(importNode); - if (response.isAddNamespaceToRequest()) { - LOGGER.debug("Add provider namespace to request element."); - SOAPHelper.addNamespace(importNode, response); + private List childElementsByLocalName(SOAPElement soapElement, String localName) { + var childElementsIterator = soapElement.getChildElements(); + var stream = StreamSupport.stream(Spliterators.spliteratorUnknownSize(childElementsIterator, 0), false); + return stream + .filter(node -> node.getNodeType() == Node.ELEMENT_NODE) + .filter(node -> node.getLocalName().equals(localName)) + .filter(node -> node instanceof SOAPElement) + .map(node -> (SOAPElement) node) + .collect(Collectors.toList()); + } + + private boolean copyRequestNode(final SOAPElement node, final SOAPBodyElement body, final ServiceResponse response) { + for (Iterator it = node.getChildElements(); it.hasNext(); ) { + var childNode = it.next(); + if (childNode.getNodeType() == Node.ELEMENT_NODE + && childNode instanceof SOAPElement + && "request".equals(childNode.getLocalName())) { + try { + var childElement = (SOAPElement) childNode; + childElement = body.addChildElement(childElement); + if (response.isAddNamespaceToRequest()) { + LOGGER.debug("Add provider namespace to request element."); + SOAPHelper.addNamespace(childElement, response); + } + return true; + } catch (SOAPException e) { + LOGGER.error("Failed to copy request element.", e); + throw new RuntimeException(e); } - return true; } } return false; @@ -225,23 +246,24 @@ private boolean copyRequestNode(final Node node, final SOAPBodyElement body, fin private void processBodyContent(final SOAPElement soapResponse, final ServiceResponse response, final SOAPEnvelope envelope) throws SOAPException { // Check if there's a non-technical SOAP error + var sr = soapResponse; if (response.hasError()) { // Add namespace to the response element only, children excluded if (response.isAddNamespaceToResponse()) { LOGGER.debug("Add provider namespace to response element."); - SOAPHelper.addNamespace(soapResponse, response); + sr = SOAPHelper.addNamespace(sr, response); } LOGGER.warn("Non-technical SOAP error detected."); LOGGER.debug("Generate error message."); ErrorMessage errorMessage = response.getErrorMessage(); if (errorMessage.getFaultCode() != null) { LOGGER.trace("Add \"faultcode\" element."); - SOAPElement elem = soapResponse.addChildElement(envelope.createName("faultcode")); + SOAPElement elem = sr.addChildElement(envelope.createName("faultcode")); elem.addTextNode(errorMessage.getFaultCode()); } if (errorMessage.getFaultString() != null) { LOGGER.trace("Add \"faultstring\" element."); - SOAPElement elem = soapResponse.addChildElement(envelope.createName("faultstring")); + SOAPElement elem = sr.addChildElement(envelope.createName("faultstring")); elem.addTextNode(errorMessage.getFaultString()); } LOGGER.debug("Error message was generated succesfully."); @@ -251,16 +273,16 @@ private void processBodyContent(final SOAPElement soapResponse, final ServiceRes if (response.isAddNamespaceToResponse()) { LOGGER.debug("Add provider namespace to response element."); if (!response.isForceNamespaceToResponseChildren()) { - SOAPHelper.addNamespace(soapResponse, response); - this.serializeResponse(response, soapResponse, envelope); + sr = SOAPHelper.addNamespace(sr, response); + this.serializeResponse(response, sr, envelope); } else { LOGGER.debug("Add provider namespace to all the response element's child elements."); - this.serializeResponse(response, soapResponse, envelope); - SOAPHelper.addNamespace(soapResponse, response); + this.serializeResponse(response, sr, envelope); + SOAPHelper.addNamespace(sr, response); } } else { LOGGER.debug("Don't add provider namespace to response element."); - this.serializeResponse(response, soapResponse, envelope); + this.serializeResponse(response, sr, envelope); } } } diff --git a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java index a722106..a80a364 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java @@ -1163,6 +1163,10 @@ private class XMLServiceResponseSerializer extends AbstractServiceResponseSerial @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapResponse.addChildElement((SOAPElement) response.getResponseData()); + // As of saaj-impl:3.0.4 addChildElement causes element namespace declaration without prefix to be added + // even if element has namespace prefix and namespace declaration with this prefix is already present. + // This is a workaround to remove this unnecessary namespace declaration. + data.removeNamespaceDeclaration(""); } } From 2383c4983b5c4f71b8fae74aa5d8bb3d1bfb996c Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Wed, 31 Jul 2024 15:20:20 +0300 Subject: [PATCH 37/73] chore: migrate to jakarta servlet api Refs: XRDDEV-2628 --- src/gradle/libs.versions.toml | 4 ++-- src/server/build.gradle.kts | 4 ++-- .../org/niis/xrd4j/server/AbstractAdapterServlet.java | 8 ++++---- .../java/org/niis/xrd4j/server/utils/AdapterUtils.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index dcc7633..ca331ee 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -1,7 +1,7 @@ # https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format [versions] -javax-servlet-servlet-api = "2.5" +jakarta-servlet-servlet-api = "6.1.0" org-apache-httpcomponents-httpclient = "4.5.14" org-apache-httpcomponents-httpcore = "4.4.16" org-json-json = "20220924" @@ -10,7 +10,7 @@ log4j = "2.23.1" [libraries] com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "3.0.4" } -javax-servlet-servletApi = { module = "javax.servlet:servlet-api", version.ref = "javax-servlet-servlet-api" } +jakarta-servlet-servletApi = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet-servlet-api" } org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index f0066ec..76d790f 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -4,12 +4,12 @@ plugins { dependencies { api(project(":common")) - compileOnly(libs.javax.servlet.servletApi) + compileOnly(libs.jakarta.servlet.servletApi) testImplementation(libs.bundles.testImplementation) } pomSettings { name = "XRd4J :: Server" - description = "This module provides an abstract servlet that can be use as a base class for Adapter Server implementation." + description = "This module provides an abstract servlet that can be used as a base class for Adapter Server implementation." } diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index 96816b1..27c4e24 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -38,10 +38,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import jakarta.xml.soap.MimeHeaders; import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; diff --git a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java index 8e9fc03..ae5a4d4 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java @@ -25,8 +25,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import jakarta.xml.soap.AttachmentPart; import jakarta.xml.soap.MimeHeader; import jakarta.xml.soap.MimeHeaders; From 2ba491e7df46c84d617157ba8c3b140376880b4c Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 1 Aug 2024 13:57:41 +0300 Subject: [PATCH 38/73] chore: migrate apache http client to version 5 Refs: XRDDEV-2628 --- src/gradle/libs.versions.toml | 6 ++---- src/rest/build.gradle.kts | 1 - .../rest/client/AbstractBodyHandler.java | 9 ++++---- .../xrd4j/rest/client/AbstractClient.java | 21 +++++++++---------- .../niis/xrd4j/rest/client/DeleteClient.java | 16 +++++++------- .../org/niis/xrd4j/rest/client/GetClient.java | 11 +++++----- .../niis/xrd4j/rest/client/PostClient.java | 15 +++++++------ .../org/niis/xrd4j/rest/client/PutClient.java | 15 +++++++------ .../org/niis/xrd4j/rest/util/ClientUtil.java | 2 +- 9 files changed, 45 insertions(+), 51 deletions(-) diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index ca331ee..69f11db 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -2,8 +2,7 @@ [versions] jakarta-servlet-servlet-api = "6.1.0" -org-apache-httpcomponents-httpclient = "4.5.14" -org-apache-httpcomponents-httpcore = "4.4.16" +org-apache-httpcomponents-httpclient = "5.3.1" org-json-json = "20220924" slf4j = "2.0.13" log4j = "2.23.1" @@ -11,8 +10,7 @@ log4j = "2.23.1" [libraries] com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "3.0.4" } jakarta-servlet-servletApi = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet-servlet-api" } -org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" } -org-apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "org-apache-httpcomponents-httpcore" } +org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents.client5:httpclient5", version.ref = "org-apache-httpcomponents-httpclient" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } diff --git a/src/rest/build.gradle.kts b/src/rest/build.gradle.kts index b4dafe3..264f914 100644 --- a/src/rest/build.gradle.kts +++ b/src/rest/build.gradle.kts @@ -4,7 +4,6 @@ plugins { dependencies { api(libs.org.apache.httpcomponents.httpclient) - api(libs.org.apache.httpcomponents.httpcore) api(libs.org.json.json) api(libs.org.slf4j.slf4jApi) diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java index 2561cc4..592d29b 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java @@ -22,14 +22,15 @@ */ package org.niis.xrd4j.rest.client; -import org.apache.http.Consts; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.io.entity.StringEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; +import static java.nio.charset.StandardCharsets.UTF_8; + /** * This abstract class offers method for adding HTTP request body to the HTTP * request. Classes implementing POST, PUT or DELETE requests can extend this @@ -70,7 +71,7 @@ protected StringEntity buildRequestEntity(String requestBody, Map params contentType = contentTypeHeader[0].getValue(); } // Get Status Code - int statusCode = response.getStatusLine().getStatusCode(); + int statusCode = response.getCode(); // Get reason phrase - String reasonPhrase = response.getStatusLine().getReasonPhrase(); + String reasonPhrase = response.getReasonPhrase(); // Get response payload String responseStr = ClientUtil.getResponseString(response.getEntity()); diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java index d3d7aa9..4d9756f 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java @@ -22,10 +22,10 @@ */ package org.niis.xrd4j.rest.client; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.entity.StringEntity; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpUriRequest; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.core5.http.io.entity.StringEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,17 +49,15 @@ public class DeleteClient extends AbstractBodyHandler { @Override protected HttpUriRequest buildtHttpRequest(String url, String requestBody, Map headers, RequestConfig config) { LOGGER.debug("Build new HTTP DELETE request."); - HttpUriRequest request; + HttpDelete request = new HttpDelete(url); // Create request entity that's used as request body StringEntity requestEntity = super.buildRequestEntity(requestBody, headers); - RequestBuilder builder = RequestBuilder.delete().setConfig(config); + request.setConfig(config); if (requestEntity != null) { - request = builder.setUri(url).setEntity(requestEntity).build(); + request.setEntity(requestEntity); } else { LOGGER.debug("No request body found for HTTP DELETE request."); - request = builder.setUri(url).build(); } - // Return request return request; } } diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java index b26e8aa..ceec803 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java @@ -22,9 +22,9 @@ */ package org.niis.xrd4j.rest.client; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.methods.RequestBuilder; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpUriRequest; +import org.apache.hc.client5.http.config.RequestConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,7 +48,8 @@ public class GetClient extends AbstractClient { @Override protected HttpUriRequest buildtHttpRequest(String url, String requestBody, Map headers, RequestConfig config) { LOGGER.debug("Build new HTTP GET request."); - // Create a new post request - return RequestBuilder.get().setConfig(config).setUri(url).build(); + HttpGet request = new HttpGet(url); + request.setConfig(config); + return request; } } diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java index 1c34d30..2077761 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java @@ -22,10 +22,10 @@ */ package org.niis.xrd4j.rest.client; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.entity.StringEntity; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpUriRequest; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.core5.http.io.entity.StringEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,16 +49,15 @@ public class PostClient extends AbstractBodyHandler { @Override protected HttpUriRequest buildtHttpRequest(String url, String requestBody, Map headers, RequestConfig config) { LOGGER.debug("Build new HTTP POST request."); - HttpUriRequest request; + HttpPost request = new HttpPost(url); // Create request entity that's used as request body StringEntity requestEntity = super.buildRequestEntity(requestBody, headers); + request.setConfig(config); if (requestEntity != null) { - request = RequestBuilder.post().setConfig(config).setUri(url).setEntity(requestEntity).build(); + request.setEntity(requestEntity); } else { LOGGER.debug("No request body found for HTTP POST request."); - request = RequestBuilder.post().setConfig(config).setUri(url).build(); } - // Return request return request; } } diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java index 565c510..ec10728 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java @@ -22,10 +22,10 @@ */ package org.niis.xrd4j.rest.client; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.entity.StringEntity; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequest; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.core5.http.io.entity.StringEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,16 +54,15 @@ public class PutClient extends AbstractBodyHandler { @Override protected HttpUriRequest buildtHttpRequest(String url, String requestBody, Map headers, RequestConfig config) { LOGGER.debug("Build new HTTP PUT request."); - HttpUriRequest request; + HttpPut request = new HttpPut(url); // Create request entity that's used as request body StringEntity requestEntity = super.buildRequestEntity(requestBody, headers); + request.setConfig(config); if (requestEntity != null) { - request = RequestBuilder.put().setConfig(config).setUri(url).setEntity(requestEntity).build(); + request.setEntity(requestEntity); } else { LOGGER.debug("No request body found for HTTP PUT request."); - request = RequestBuilder.put().setConfig(config).setUri(url).build(); } - // Return request return request; } } diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java b/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java index d0dbeb3..a13054b 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java @@ -22,7 +22,7 @@ */ package org.niis.xrd4j.rest.util; -import org.apache.http.HttpEntity; +import org.apache.hc.core5.http.HttpEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; From 3e0ef3c7b7a6525b8778cfe7c6b61a648349203a Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 1 Aug 2024 14:01:12 +0300 Subject: [PATCH 39/73] chore: org.json:json upgraded Refs: XRDDEV-2628 --- src/gradle/libs.versions.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 69f11db..defe6a0 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -3,19 +3,21 @@ [versions] jakarta-servlet-servlet-api = "6.1.0" org-apache-httpcomponents-httpclient = "5.3.1" -org-json-json = "20220924" +org-json-json = "20240303" slf4j = "2.0.13" log4j = "2.23.1" +saaj-impl = "3.0.4" +junit-jupiter = "5.10.3" [libraries] -com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version = "3.0.4" } +com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version.ref = "saaj-impl" } jakarta-servlet-servletApi = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet-servlet-api" } org-apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents.client5:httpclient5", version.ref = "org-apache-httpcomponents-httpclient" } org-json-json = { module = "org.json:json", version.ref = "org-json-json" } org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } -junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version = "5.10.3" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } From fabfa6ad405ca00bfd5e2d0269fa2d6275287925 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 6 Aug 2024 15:11:36 +0300 Subject: [PATCH 40/73] chore: example adapter initial migration from maven to gradle Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 65 +++++ .../gradle/wrapper/gradle-wrapper.properties | 7 + example-adapter/gradlew | 249 ++++++++++++++++++ example-adapter/gradlew.bat | 92 +++++++ example-adapter/settings.gradle.kts | 5 + .../xrd4j/exampleadapter/Application.java | 2 +- .../xrd4j/exampleadapter/ExampleAdapter.java | 12 +- .../exampleadapter/mtom/AttachmentSource.java | 2 +- .../mtom/MessageMtomGeneratorImpl.java | 12 +- 9 files changed, 432 insertions(+), 14 deletions(-) create mode 100644 example-adapter/build.gradle.kts create mode 100644 example-adapter/gradle/wrapper/gradle-wrapper.properties create mode 100755 example-adapter/gradlew create mode 100644 example-adapter/gradlew.bat create mode 100644 example-adapter/settings.gradle.kts diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts new file mode 100644 index 0000000..a961396 --- /dev/null +++ b/example-adapter/build.gradle.kts @@ -0,0 +1,65 @@ +import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java + +plugins { + `java-library` + `maven-publish` + id("io.mateo.cxf-codegen") version "2.4.0" +} + +repositories { + mavenLocal() + mavenCentral() +// maven { +// url = uri("https://artifactory.niis.org/xroad-maven-releases") +// } +// +// maven { +// url = uri("https://artifactory.niis.org/xroad-maven-snapshots") +// } + +} + +dependencies { + implementation("org.springframework.boot:spring-boot-starter-web:3.3.2") + implementation("org.apache.cxf:cxf-spring-boot-starter-jaxws:4.0.5") + + implementation("org.niis.xrd4j:common:0.5.0-SNAPSHOT") + implementation("org.niis.xrd4j:server:0.5.0-SNAPSHOT") + + implementation("org.slf4j:slf4j-api:2.0.12") + implementation("org.slf4j:slf4j-reload4j:2.0.13") + + compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0") + + cxfCodegen("org.apache.cxf:cxf-rt-transports-http:4.0.5") +} + +group = "org.niis" +version = "0.0.6-SNAPSHOT" +description = "Example Adapter for X-Road" +java.sourceCompatibility = JavaVersion.VERSION_17 + +publishing { + publications.create("maven") { + from(components["java"]) + } +} + +tasks.withType() { + options.encoding = "UTF-8" +} + +tasks.withType() { + options.encoding = "UTF-8" +} + +cxfCodegen { + cxfVersion = "4.0.5" +} + +tasks.register("wsdlSources", Wsdl2Java::class) { + toolOptions { + wsdl = "${projectDir}/src/main/resources/mtomservice.wsdl" + markGenerated = true + } +} diff --git a/example-adapter/gradle/wrapper/gradle-wrapper.properties b/example-adapter/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..a441313 --- /dev/null +++ b/example-adapter/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/example-adapter/gradlew b/example-adapter/gradlew new file mode 100755 index 0000000..b740cf1 --- /dev/null +++ b/example-adapter/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/example-adapter/gradlew.bat b/example-adapter/gradlew.bat new file mode 100644 index 0000000..7101f8e --- /dev/null +++ b/example-adapter/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/example-adapter/settings.gradle.kts b/example-adapter/settings.gradle.kts new file mode 100644 index 0000000..7f60d96 --- /dev/null +++ b/example-adapter/settings.gradle.kts @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = "example-adapter" diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java index 5b4a706..e5dc0a5 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.xml.ws.Endpoint; +import jakarta.xml.ws.Endpoint; /** * X-Road Example Adapter application entry point diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index 871adba..f0c9c65 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -37,12 +37,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.soap.AttachmentPart; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; +import jakarta.xml.soap.AttachmentPart; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java index aaebfb1..732edbc 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java @@ -22,7 +22,7 @@ */ package org.niis.xrd4j.exampleadapter.mtom; -import javax.activation.DataSource; +import jakarta.activation.DataSource; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java index 637d428..20c7b79 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java @@ -32,12 +32,12 @@ import com.niis.test.test.messagegen.*; import org.apache.cxf.headers.Header; -import javax.activation.DataHandler; -import javax.annotation.Resource; -import javax.jws.WebService; -import javax.xml.ws.Holder; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.soap.MTOM; +import jakarta.activation.DataHandler; +import jakarta.annotation.Resource; +import jakarta.jws.WebService; +import jakarta.xml.ws.Holder; +import jakarta.xml.ws.WebServiceContext; +import jakarta.xml.ws.soap.MTOM; import java.util.List; @WebService(targetNamespace = "http://test.niis.com/test/messagegen", wsdlLocation = "mtomservice.wsdl") From 58c5e803fdfe945f2092485a4212a6b1561be296 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 6 Sep 2024 15:24:47 +0300 Subject: [PATCH 41/73] chore: upgrade dependency check gradle plugin Refs: XRDDEV-2628 --- src/build.gradle.kts | 2 +- src/buildSrc/build.gradle.kts | 1 + src/gradle/libs.versions.toml | 5 +---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/build.gradle.kts b/src/build.gradle.kts index 113c0f2..16433bb 100644 --- a/src/build.gradle.kts +++ b/src/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - alias(libs.plugins.dependencyCheck) + id("org.owasp.dependencycheck") } diff --git a/src/buildSrc/build.gradle.kts b/src/buildSrc/build.gradle.kts index 2703a00..e53cd19 100644 --- a/src/buildSrc/build.gradle.kts +++ b/src/buildSrc/build.gradle.kts @@ -9,4 +9,5 @@ repositories { dependencies { implementation(libs.licenseGradlePlugin) + implementation(libs.dependencyCheckGradlePlugin) } diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index defe6a0..81be57f 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -20,10 +20,7 @@ org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j: junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } +dependencyCheckGradlePlugin = { module = "org.owasp:dependency-check-gradle", version = "10.0.4" } [bundles] testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-apache-logging-log4j-log4jSlf4j2Impl", "org-apache-logging-log4j-log4jCore" ] - - -[plugins] -dependencyCheck = { id = "org.owasp.dependencycheck", version = "9.2.0" } From 6a55f4a415634b258989a52c564ce563b90cefc6 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 6 Sep 2024 15:32:08 +0300 Subject: [PATCH 42/73] chore: example adapter dependencies updated Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index a961396..762285f 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -1,21 +1,22 @@ import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java plugins { - `java-library` + java `maven-publish` + id("org.springframework.boot") version "3.3.2" id("io.mateo.cxf-codegen") version "2.4.0" } repositories { mavenLocal() mavenCentral() -// maven { -// url = uri("https://artifactory.niis.org/xroad-maven-releases") -// } -// -// maven { -// url = uri("https://artifactory.niis.org/xroad-maven-snapshots") -// } + maven { + url = uri("https://artifactory.niis.org/xroad-maven-releases") + } + + maven { + url = uri("https://artifactory.niis.org/xroad-maven-snapshots") + } } @@ -26,11 +27,10 @@ dependencies { implementation("org.niis.xrd4j:common:0.5.0-SNAPSHOT") implementation("org.niis.xrd4j:server:0.5.0-SNAPSHOT") - implementation("org.slf4j:slf4j-api:2.0.12") - implementation("org.slf4j:slf4j-reload4j:2.0.13") - compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0") + runtimeOnly("org.apache.tomcat.embed:tomcat-embed-jasper:10.1.26") + cxfCodegen("org.apache.cxf:cxf-rt-transports-http:4.0.5") } From 4f5b0004399b0f10934703b43d47e44e621be9da Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 09:48:27 +0300 Subject: [PATCH 43/73] chore: fixed some compiler warnings Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 3 +- .../xrd4j/exampleadapter/Application.java | 8 ++-- .../xrd4j/exampleadapter/ExampleAdapter.java | 40 ++++++++++--------- .../xrd4j/exampleadapter/mtom/LazyStream.java | 2 +- .../kotlin/xrd4j.java-conventions.gradle.kts | 1 - 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index 762285f..09574f1 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -37,7 +37,8 @@ dependencies { group = "org.niis" version = "0.0.6-SNAPSHOT" description = "Example Adapter for X-Road" -java.sourceCompatibility = JavaVersion.VERSION_17 + +java.toolchain.languageVersion = JavaLanguageVersion.of(17) publishing { publications.create("maven") { diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java index e5dc0a5..9477633 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -46,15 +46,15 @@ public static void main(String[] args) { } @Bean - public ServletRegistrationBean endpointBean() { - ServletRegistrationBean bean = new ServletRegistrationBean(new ExampleAdapter(), "/Endpoint"); + public ServletRegistrationBean endpointBean() { + ServletRegistrationBean bean = new ServletRegistrationBean<>(new ExampleAdapter(), "/Endpoint"); bean.setLoadOnStartup(1); return bean; } @Bean - public ServletRegistrationBean servletRegistrationBean() { - return new ServletRegistrationBean(new CXFServlet(), "/cxf/*"); + public ServletRegistrationBean servletRegistrationBean() { + return new ServletRegistrationBean<>(new CXFServlet(), "/cxf/*"); } @Bean diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index f0c9c65..e1a601d 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -71,7 +71,7 @@ public class ExampleAdapter extends AbstractAdapterServlet { @Override public void init() { - logger.debug("Starting to initialize Enpoint."); + logger.debug("Starting to initialize Endpoint."); this.props = PropertiesUtil.getInstance().load("/xrd-servlet.properties"); this.namespaceSerialize = this.props.getProperty("namespace.serialize"); this.namespaceDeserialize = this.props.getProperty("namespace.deserialize"); @@ -95,7 +95,7 @@ protected String getWSDLPath() { } @Override - protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPException, XRd4JException { + protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPException, XRd4JException { ServiceResponseSerializer serializer; // Process services by service code if ("getRandom".equals(request.getProducer().getServiceCode())) { @@ -106,12 +106,12 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // need a request deserializer serializer = new ServiceResponseSerializerImpl(); // Create a new ServiceResponse object - ServiceResponse response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); // Set response data - a random number between 0 and 100 - response.setResponseData(Integer.toString((int) new Random().nextInt(101))); + response.setResponseData(Integer.toString(new Random().nextInt(101))); // Serialize the response to SOAP serializer.serialize(response, request); // Return the response - AbstractAdapterServlet takes care of @@ -129,7 +129,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // Parse the request data from the request customDeserializer.deserialize(request, this.namespaceDeserialize); // Create a new ServiceResponse object - ServiceResponse response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); @@ -157,7 +157,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // to SOAP serializer = new ListPeopleResponseSerializer(); // Create a new ServiceResponse object - ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse> response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); @@ -182,7 +182,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // Parse the request data from the request customDeserializer.deserialize(request, this.namespaceDeserialize); // Create a new ServiceResponse object - ServiceResponse response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); @@ -217,7 +217,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // Parse the request data from the request customDeserializer.deserialize(request, this.namespaceDeserialize); // Create a new ServiceResponse object - ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse> response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); @@ -247,7 +247,7 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // to SOAP serializer = new AttachmentsResponseSerializer(); // Create a new ServiceResponse object - ServiceResponse> response = new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + ServiceResponse> response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); @@ -271,13 +271,17 @@ protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPExcep // No service matching the service code in the request was found - // and error is returned serializer = new ServiceResponseSerializerImpl(); - ServiceResponse response = new ServiceResponse(); + ServiceResponse response = new ServiceResponse<>(); ErrorMessage error = new ErrorMessage("SOAP-ENV:Client", "Unknown service code.", null, null); response.setErrorMessage(error); serializer.serialize(response, request); return response; } + private ServiceResponse createResponse(ServiceRequest request) throws XRd4JException { + return new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + } + private String generateCharacters(Integer size) { Random random = new Random(); StringBuilder sb = new StringBuilder(); @@ -293,7 +297,7 @@ private String generateCharacters(Integer size) { * This class is responsible for serializing response data of getRandom * service responses. */ - private class ServiceResponseSerializerImpl extends AbstractServiceResponseSerializer { + private static class ServiceResponseSerializerImpl extends AbstractServiceResponseSerializer { /** * Serializes the response data. @@ -317,7 +321,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse * This class is responsible for serializing response data of helloService * service responses. */ - private class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { + private static class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { /** * Serializes the response data. @@ -342,7 +346,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse * service requests. The type declaration "" defines the type of the * request data, which in this case is String. */ - private class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { + private static class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { /** * Deserializes the "request" element. @@ -374,7 +378,7 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) throw * This class is responsible for serializing the response data of the listPeople * service. */ - private class ListPeopleResponseSerializer extends AbstractServiceResponseSerializer { + private static class ListPeopleResponseSerializer extends AbstractServiceResponseSerializer { /** * Serializes the response data. @@ -420,7 +424,7 @@ private void serializePerson(final SOAPEnvelope envelope, final SOAPElement pare * This class is responsible for serializing the response data of the personDetails * service. */ - private class PersonDetailsResponseSerializer extends AbstractServiceResponseSerializer { + private static class PersonDetailsResponseSerializer extends AbstractServiceResponseSerializer { /** * Serializes the response data. @@ -484,7 +488,7 @@ private void serializeContact(final SOAPEnvelope envelope, final SOAPElement par * service request. The type declaration "" defines the type of the * request data, which in this case is String. */ - private class PersonDetailsRequestDeserializer extends AbstractCustomRequestDeserializer { + private static class PersonDetailsRequestDeserializer extends AbstractCustomRequestDeserializer { /** * Deserializes the "request" element. @@ -512,7 +516,7 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) throw } } - private class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { + private static class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { @Override protected List deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { @@ -531,7 +535,7 @@ protected List deserializeRequest(Node requestNode, SOAPMessage message } } - private class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { + private static class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { @Override protected void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java index cc5ce32..28d64ed 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java @@ -28,7 +28,7 @@ public class LazyStream extends InputStream { private volatile long size; - private Random rnd = new Random(); + private final Random rnd = new Random(); public LazyStream(long size) { this.size = size; diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 5f0f631..1c2184d 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -16,7 +16,6 @@ repositories { group = "org.niis.xrd4j" java { - sourceCompatibility = JavaVersion.VERSION_11 toolchain.languageVersion = JavaLanguageVersion.of(11) withJavadocJar() withSourcesJar() From 5ffd3c15ecd13acafcaca11e48d428656bd3b7a1 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 13:33:07 +0300 Subject: [PATCH 44/73] chore: license headers updated Refs: XRDDEV-2628 --- example-adapter/LICENSE | 20 ------------------- example-adapter/build.gradle.kts | 8 ++++++++ .../xrd4j/exampleadapter/Application.java | 8 ++++---- .../xrd4j/exampleadapter/data/Person.java | 3 +-- .../exampleadapter/data/PersonContact.java | 3 +-- .../exampleadapter/mtom/AttachmentSource.java | 2 +- .../exampleadapter/mtom/LazyCollection.java | 2 +- .../xrd4j/exampleadapter/mtom/LazyStream.java | 2 +- .../mtom/MessageMtomGeneratorImpl.java | 15 ++++---------- example-adapter/src/main/license/LICENSE.txt | 20 ------------------- .../kotlin/xrd4j.java-conventions.gradle.kts | 1 + .../xrd4j/client/LoadBalancedSOAPClient.java | 2 +- .../client/LoadBalancedSOAPClientImpl.java | 2 +- .../org/niis/xrd4j/client/SOAPClient.java | 2 +- .../org/niis/xrd4j/client/SOAPClientImpl.java | 2 +- .../AbstractResponseDeserializer.java | 2 +- ...rityServerMetricsResponseDeserializer.java | 2 +- ...stCentralServicesResponseDeserializer.java | 2 +- .../ListClientsResponseDeserializer.java | 2 +- .../ListServicesResponseDeserializer.java | 2 +- .../ServiceResponseDeserializer.java | 2 +- .../AbstractServiceRequestSerializer.java | 2 +- .../DefaultServiceRequestSerializer.java | 2 +- .../serializer/ServiceRequestSerializer.java | 2 +- .../niis/xrd4j/client/util/ClientUtil.java | 2 +- .../LoadBalancedSOAPClientImplTest.java | 2 +- .../org/niis/xrd4j/client/SOAPClientTest.java | 2 +- ...ServerMetricsResponseDeserializerTest.java | 2 +- ...ntralServicesResponseDeserializerTest.java | 2 +- .../ListClientsResponseDeserializerTest.java | 2 +- .../ListServicesResponseDeserializerTest.java | 2 +- .../ServiceResponseDeserializerTest.java | 2 +- .../DefaultServiceRequestSerializerTest.java | 2 +- .../ServiceRequestSerializerTest.java | 2 +- .../AbstractHeaderDeserializer.java | 2 +- .../common/exception/XRd4JException.java | 2 +- .../XRd4JMissingMemberException.java | 2 +- .../exception/XRd4JRuntimeException.java | 2 +- .../xrd4j/common/member/AbstractMember.java | 2 +- .../xrd4j/common/member/ConsumerMember.java | 2 +- .../niis/xrd4j/common/member/ObjectType.java | 2 +- .../xrd4j/common/member/ProducerMember.java | 2 +- .../xrd4j/common/member/SecurityServer.java | 2 +- .../xrd4j/common/message/AbstractMessage.java | 2 +- .../xrd4j/common/message/ErrorMessage.java | 2 +- .../common/message/ErrorMessageType.java | 2 +- .../xrd4j/common/message/ServiceRequest.java | 2 +- .../xrd4j/common/message/ServiceResponse.java | 2 +- .../common/security/AbstractDecrypter.java | 2 +- .../common/security/AbstractEncrypter.java | 2 +- .../common/security/AsymmetricDecrypter.java | 2 +- .../common/security/AsymmetricEncrypter.java | 2 +- .../xrd4j/common/security/CryptoHelper.java | 2 +- .../niis/xrd4j/common/security/Decrypter.java | 2 +- .../niis/xrd4j/common/security/Encrypter.java | 2 +- .../common/security/SymmetricDecrypter.java | 2 +- .../common/security/SymmetricEncrypter.java | 2 +- .../serializer/AbstractHeaderSerializer.java | 2 +- .../common/util/ConfigurationHelper.java | 2 +- .../org/niis/xrd4j/common/util/Constants.java | 2 +- .../org/niis/xrd4j/common/util/FileUtil.java | 2 +- .../niis/xrd4j/common/util/MessageHelper.java | 2 +- .../xrd4j/common/util/PropertiesUtil.java | 2 +- .../xrd4j/common/util/ValidationHelper.java | 2 +- .../common/member/ConsumerMemberTest.java | 2 +- .../common/member/ProducerMemberTest.java | 2 +- .../common/member/SecurityServerTest.java | 2 +- .../common/message/ServiceRequestTest.java | 2 +- .../common/message/ServiceResponseTest.java | 2 +- .../security/AsymmetricEncrypterTest.java | 2 +- .../common/security/CryptoHelperTest.java | 2 +- .../security/SymmetricEncrypterTest.java | 2 +- .../common/util/ConfigurationHelperTest.java | 2 +- .../xrd4j/common/util/MessageHelperTest.java | 2 +- .../xrd4j/common/util/SOAPHelperTest.java | 2 +- .../org/niis/xrd4j/rest/ClientResponse.java | 2 +- .../rest/client/AbstractBodyHandler.java | 2 +- .../xrd4j/rest/client/AbstractClient.java | 2 +- .../niis/xrd4j/rest/client/DeleteClient.java | 2 +- .../org/niis/xrd4j/rest/client/GetClient.java | 2 +- .../niis/xrd4j/rest/client/PostClient.java | 2 +- .../org/niis/xrd4j/rest/client/PutClient.java | 2 +- .../niis/xrd4j/rest/client/RESTClient.java | 2 +- .../xrd4j/rest/client/RESTClientFactory.java | 2 +- .../niis/xrd4j/rest/converter/Converter.java | 2 +- .../rest/converter/JSONToXMLConverter.java | 2 +- .../rest/converter/XMLToJSONConverter.java | 2 +- .../org/niis/xrd4j/rest/util/ClientUtil.java | 2 +- .../converter/JSONToXMLConverterTest.java | 2 +- .../converter/XMLToJSONConverterTest.java | 2 +- .../niis/xrd4j/rest/util/ClientUtilTest.java | 2 +- .../AbstractCustomRequestDeserializer.java | 2 +- .../CustomRequestDeserializer.java | 2 +- .../ServiceRequestDeserializer.java | 2 +- .../ServiceRequestDeserializerImpl.java | 2 +- .../AbstractServiceResponseSerializer.java | 2 +- .../serializer/ServiceResponseSerializer.java | 2 +- .../niis/xrd4j/server/utils/AdapterUtils.java | 2 +- .../CustomRequestDeserializerTest.java | 2 +- .../ServiceRequestDeserializerTest.java | 2 +- .../ServiceResponseSerializerTest.java | 2 +- 101 files changed, 112 insertions(+), 152 deletions(-) delete mode 100644 example-adapter/LICENSE delete mode 100644 example-adapter/src/main/license/LICENSE.txt diff --git a/example-adapter/LICENSE b/example-adapter/LICENSE deleted file mode 100644 index ca3d57f..0000000 --- a/example-adapter/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License -Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index 09574f1..c9ab29b 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -5,6 +5,7 @@ plugins { `maven-publish` id("org.springframework.boot") version "3.3.2" id("io.mateo.cxf-codegen") version "2.4.0" + id("com.github.hierynomus.license") version "0.16.1" } repositories { @@ -58,6 +59,13 @@ cxfCodegen { cxfVersion = "4.0.5" } +license { + header = rootProject.file("../LICENSE") + include("src/**/*.java") + mapping("java", "SLASHSTAR_STYLE") + strictCheck = true +} + tasks.register("wsdlSources", Wsdl2Java::class) { toolOptions { wsdl = "${projectDir}/src/main/resources/mtomservice.wsdl" diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java index 9477633..3bf98c7 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -1,17 +1,17 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) - *

+ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/Person.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/Person.java index b3985a6..e330db8 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/Person.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/Person.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * @@ -20,7 +20,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - package org.niis.xrd4j.exampleadapter.data; import java.time.LocalDate; diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/PersonContact.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/PersonContact.java index 2833aba..e6928ab 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/PersonContact.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/data/PersonContact.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * @@ -20,7 +20,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - package org.niis.xrd4j.exampleadapter.data; /** diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java index 732edbc..f119119 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/AttachmentSource.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java index 8383586..e42f08d 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyCollection.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java index 28d64ed..d8c9d6e 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/LazyStream.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java index 20c7b79..d555194 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/mtom/MessageMtomGeneratorImpl.java @@ -1,17 +1,17 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) - *

+ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,13 +19,6 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - *

- * The MIT License - * ... - */ -/** - * The MIT License - * ... */ package org.niis.xrd4j.exampleadapter.mtom; diff --git a/example-adapter/src/main/license/LICENSE.txt b/example-adapter/src/main/license/LICENSE.txt deleted file mode 100644 index ca3d57f..0000000 --- a/example-adapter/src/main/license/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License -Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 1c2184d..8c3243c 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -97,4 +97,5 @@ license { header = rootProject.file("../LICENSE") include("**/*.java") mapping("java", "SLASHSTAR_STYLE") + strictCheck = true } diff --git a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java index 1b5d08d..3092f29 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java index d9f0aa3..3e828b6 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java index 2ba302c..1d91357 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java index 1fba3d4..a52cf29 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java index 6ae468f..b6feb35 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java index 272c755..53d82a9 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializer.java index 1ed12b2..d248a0f 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializer.java index 19f5436..617770e 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java index 0703f3f..548eaed 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java index 3640605..c0aa82e 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java index c47c180..225eb18 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java index 9ed883a..94afa56 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java index 90cdb7e..8b136ba 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java b/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java index 64c8303..0dd63b6 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java index 5272a56..7e1aa8e 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java index 0ea2324..dbaed2c 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java index 4361dfd..9eab895 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java index 3fe8bb3..ea08329 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java index cbaad0e..1853454 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java index c1b799e..f24a055 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java index 918a023..2c27d22 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java index 303c777..412746a 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java index 4b83976..7ac923f 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java index 84afe78..9fb05be 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JException.java b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JException.java index 899ed0f..8e5296b 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JException.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JException.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JMissingMemberException.java b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JMissingMemberException.java index e3371cb..082837b 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JMissingMemberException.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JMissingMemberException.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JRuntimeException.java b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JRuntimeException.java index 010ca47..a59d578 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JRuntimeException.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/exception/XRd4JRuntimeException.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/member/AbstractMember.java b/src/common/src/main/java/org/niis/xrd4j/common/member/AbstractMember.java index 88008c6..2cc12ef 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/member/AbstractMember.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/member/AbstractMember.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/member/ConsumerMember.java b/src/common/src/main/java/org/niis/xrd4j/common/member/ConsumerMember.java index 536250d..daa6633 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/member/ConsumerMember.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/member/ConsumerMember.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/member/ObjectType.java b/src/common/src/main/java/org/niis/xrd4j/common/member/ObjectType.java index 2fc7158..4795874 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/member/ObjectType.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/member/ObjectType.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/member/ProducerMember.java b/src/common/src/main/java/org/niis/xrd4j/common/member/ProducerMember.java index 6577a43..8a43b26 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/member/ProducerMember.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/member/ProducerMember.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/member/SecurityServer.java b/src/common/src/main/java/org/niis/xrd4j/common/member/SecurityServer.java index e42329a..81fb915 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/member/SecurityServer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/member/SecurityServer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java b/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java index c512de4..56573c2 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/AbstractMessage.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessage.java b/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessage.java index b7b12c3..721c1f5 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessage.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessage.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessageType.java b/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessageType.java index a1ec9a5..086432c 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessageType.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/ErrorMessageType.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceRequest.java b/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceRequest.java index 475e9a7..6d8bd97 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceRequest.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceRequest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceResponse.java b/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceResponse.java index f82f7be..4346e35 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceResponse.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/message/ServiceResponse.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractDecrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractDecrypter.java index beb13a5..bbe0708 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractDecrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractDecrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractEncrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractEncrypter.java index 52eb1ff..9505dff 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractEncrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/AbstractEncrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricDecrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricDecrypter.java index 030439d..7819915 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricDecrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricDecrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricEncrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricEncrypter.java index 5f43630..ce5aff6 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricEncrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/AsymmetricEncrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/CryptoHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/security/CryptoHelper.java index 1ae7f91..2a1f4a8 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/CryptoHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/CryptoHelper.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/Decrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/Decrypter.java index d6ce191..37fc126 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/Decrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/Decrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/Encrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/Encrypter.java index 32f598e..cace9b6 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/Encrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/Encrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricDecrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricDecrypter.java index 1fb01fb..119b888 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricDecrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricDecrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java index cfb5691..ccdc6e8 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java index 5151d6b..6179819 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/ConfigurationHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/ConfigurationHelper.java index 4acb98c..5bb8c94 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/ConfigurationHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/ConfigurationHelper.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/Constants.java b/src/common/src/main/java/org/niis/xrd4j/common/util/Constants.java index 862f975..4a6158b 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/Constants.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/Constants.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/FileUtil.java b/src/common/src/main/java/org/niis/xrd4j/common/util/FileUtil.java index f9c3572..2aa1515 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/FileUtil.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/FileUtil.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/MessageHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/MessageHelper.java index 34f22a4..9d1b24b 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/MessageHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/MessageHelper.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/PropertiesUtil.java b/src/common/src/main/java/org/niis/xrd4j/common/util/PropertiesUtil.java index 4360cc9..c64c26a 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/PropertiesUtil.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/PropertiesUtil.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/ValidationHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/ValidationHelper.java index c7860e9..ed4c5ac 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/ValidationHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/ValidationHelper.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java index 819c9b6..e51fe88 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/ConsumerMemberTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java index 6b766e7..8884440 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/ProducerMemberTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java b/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java index 73a28c7..2044592 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/member/SecurityServerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java index ea92b6d..621ad7e 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceRequestTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java index 4f9ec17..d074c8f 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/message/ServiceResponseTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java index 3c47885..17d4abf 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/AsymmetricEncrypterTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java index bf1bce8..93c6f2c 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/CryptoHelperTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java b/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java index 1bea36f..caf905b 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/security/SymmetricEncrypterTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java index 3dc9bbf..2f0e34d 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/ConfigurationHelperTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java index 0c4a7b2..235d488 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/MessageHelperTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java index e6d0845..264323e 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/ClientResponse.java b/src/rest/src/main/java/org/niis/xrd4j/rest/ClientResponse.java index 8d54a16..22d55bb 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/ClientResponse.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/ClientResponse.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java index 592d29b..bbdedd1 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractBodyHandler.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java index 4bdfcbf..96dbc52 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java index 4d9756f..3b02446 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/DeleteClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java index ceec803..b626121 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/GetClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java index 2077761..c7326f7 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PostClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java index ec10728..8581d4f 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/PutClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClient.java index 8e36dc2..464c575 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClient.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClientFactory.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClientFactory.java index afbaae2..1577e65 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClientFactory.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/RESTClientFactory.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/Converter.java b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/Converter.java index 69e5a93..9330fb6 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/Converter.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/Converter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/JSONToXMLConverter.java b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/JSONToXMLConverter.java index b652590..7d54acd 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/JSONToXMLConverter.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/JSONToXMLConverter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/XMLToJSONConverter.java b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/XMLToJSONConverter.java index d7f2804..fab7bf8 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/converter/XMLToJSONConverter.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/converter/XMLToJSONConverter.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java b/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java index a13054b..317e192 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/util/ClientUtil.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java index 9957ad1..bc53c38 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/JSONToXMLConverterTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java index eb5bfb3..53e86cc 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/converter/XMLToJSONConverterTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java b/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java index 0fa2485..15363d0 100644 --- a/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java +++ b/src/rest/src/test/java/org/niis/xrd4j/rest/util/ClientUtilTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java index 27bb718..cbb859a 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java index cfc8841..59b7ac9 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java index abc6ebb..664f567 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java index 029a787..f079357 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java index 1a637b0..c9e3e2d 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java index f15cab4..46309f3 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializer.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java index ae5a4d4..0d0b5c3 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java index 189e159..41b5a46 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java index 12a28eb..9c03728 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * diff --git a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java index a80a364..81f6cb1 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * From b5cd78e5eefb6d8b4a5499c83865f265bd34dfdc Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 15:33:47 +0300 Subject: [PATCH 45/73] chore: checkstyle Refs: XRDDEV-2628 --- .../niis/xrd4j/exampleadapter/Application.java | 6 +++--- .../xrd4j/exampleadapter/ExampleAdapter.java | 5 +++-- .../kotlin/xrd4j.java-conventions.gradle.kts | 4 +--- .../client/LoadBalancedSOAPClientImpl.java | 5 ++--- .../org/niis/xrd4j/client/SOAPClientImpl.java | 5 ++--- .../AbstractResponseDeserializer.java | 7 +++---- ...urityServerMetricsResponseDeserializer.java | 7 +++---- .../ListServicesResponseDeserializer.java | 7 +++---- .../AbstractServiceRequestSerializer.java | 5 ++--- .../client/LoadBalancedSOAPClientImplTest.java | 3 +-- .../org/niis/xrd4j/client/SOAPClientTest.java | 9 ++++----- ...yServerMetricsResponseDeserializerTest.java | 5 ++--- ...entralServicesResponseDeserializerTest.java | 3 +-- .../ListClientsResponseDeserializerTest.java | 3 +-- .../ListServicesResponseDeserializerTest.java | 3 +-- .../ServiceResponseDeserializerTest.java | 7 +++---- .../DefaultServiceRequestSerializerTest.java | 3 +-- .../ServiceRequestSerializerTest.java | 9 ++++----- .../AbstractHeaderDeserializer.java | 5 ++--- .../serializer/AbstractHeaderSerializer.java | 5 ++--- .../org/niis/xrd4j/common/util/SOAPHelper.java | 3 ++- .../niis/xrd4j/common/util/SOAPHelperTest.java | 3 +-- src/config/checkstyle/checkstyle.xml | 18 +++++++++++------- .../niis/xrd4j/rest/client/AbstractClient.java | 9 +++++---- .../xrd4j/server/AbstractAdapterServlet.java | 7 +++---- .../AbstractCustomRequestDeserializer.java | 7 +++---- .../ServiceRequestDeserializerImpl.java | 5 ++--- .../AbstractServiceResponseSerializer.java | 17 +++++++++-------- .../niis/xrd4j/server/utils/AdapterUtils.java | 5 ++--- .../CustomRequestDeserializerTest.java | 7 +++---- .../ServiceRequestDeserializerTest.java | 3 +-- .../ServiceResponseSerializerTest.java | 11 +++++------ 32 files changed, 91 insertions(+), 110 deletions(-) diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java index 3bf98c7..d709c8f 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/Application.java @@ -22,9 +22,11 @@ */ package org.niis.xrd4j.exampleadapter; +import org.niis.xrd4j.exampleadapter.mtom.MessageMtomGeneratorImpl; + +import jakarta.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.transport.servlet.CXFServlet; -import org.niis.xrd4j.exampleadapter.mtom.MessageMtomGeneratorImpl; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletRegistrationBean; @@ -32,8 +34,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import jakarta.xml.ws.Endpoint; - /** * X-Road Example Adapter application entry point */ diff --git a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java index e1a601d..b7d434f 100644 --- a/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java +++ b/example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java @@ -34,8 +34,6 @@ import org.niis.xrd4j.server.deserializer.CustomRequestDeserializer; import org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer; import org.niis.xrd4j.server.serializer.ServiceResponseSerializer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import jakarta.xml.soap.AttachmentPart; import jakarta.xml.soap.Node; @@ -43,6 +41,9 @@ import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 8c3243c..0517d57 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -88,9 +88,7 @@ tasks.withType() { } checkstyle { - // TODO: update to latest version - toolVersion = "6.11.2" - + toolVersion = "10.18.1" } license { diff --git a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java index 3e828b6..c8f5a56 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImpl.java @@ -29,11 +29,10 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java index a52cf29..6ca7eb3 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java @@ -40,13 +40,12 @@ import org.niis.xrd4j.rest.client.RESTClient; import org.niis.xrd4j.rest.client.RESTClientFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.xml.soap.SOAPConnection; import jakarta.xml.soap.SOAPConnectionFactory; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.MalformedURLException; import java.net.URL; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java index b6feb35..4bc3f59 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/AbstractResponseDeserializer.java @@ -33,10 +33,6 @@ import org.niis.xrd4j.common.util.Constants; import org.niis.xrd4j.common.util.SOAPHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.NodeList; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPBody; import jakarta.xml.soap.SOAPEnvelope; @@ -44,6 +40,9 @@ import jakarta.xml.soap.SOAPHeader; import jakarta.xml.soap.SOAPMessage; import jakarta.xml.soap.SOAPPart; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.NodeList; import java.util.Map; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java index 53d82a9..0dae934 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializer.java @@ -24,13 +24,12 @@ import org.niis.xrd4j.common.util.Constants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.NodeList; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.NodeList; /** * This class is used for deserializing responses of getSecurityServerMetrics diff --git a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java index 548eaed..36af962 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializer.java @@ -27,13 +27,12 @@ import org.niis.xrd4j.common.util.Constants; import org.niis.xrd4j.common.util.SOAPHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.NodeList; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.NodeList; import java.util.ArrayList; import java.util.List; diff --git a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java index 225eb18..2101a10 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/serializer/AbstractServiceRequestSerializer.java @@ -27,9 +27,6 @@ import org.niis.xrd4j.common.serializer.AbstractHeaderSerializer; import org.niis.xrd4j.common.util.SOAPHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.xml.soap.MessageFactory; import jakarta.xml.soap.Name; import jakarta.xml.soap.SOAPBody; @@ -38,6 +35,8 @@ import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This abstract class serves as base class for serializer classes that diff --git a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java index 7e1aa8e..cb919f7 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/LoadBalancedSOAPClientImplTest.java @@ -22,9 +22,8 @@ */ package org.niis.xrd4j.client; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java index dbaed2c..f6e2926 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java @@ -30,14 +30,13 @@ import org.niis.xrd4j.common.member.ProducerMember; import org.niis.xrd4j.common.message.ServiceRequest; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.fail; @@ -199,7 +198,7 @@ void testException4() throws SOAPException { // OK } }*/ - private class TestRequestSerializer extends AbstractServiceRequestSerializer { + private final class TestRequestSerializer extends AbstractServiceRequestSerializer { protected void serializeRequest(ServiceRequest serviceRequest, SOAPElement soapRequest, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapRequest.addChildElement(envelope.createName("data")); @@ -207,7 +206,7 @@ protected void serializeRequest(ServiceRequest serviceRequest, SOAPElement soapR } } - private class TestResponseDeserializer extends AbstractResponseDeserializer { + private final class TestResponseDeserializer extends AbstractResponseDeserializer { protected String deserializeRequestData(Node requestNode) throws SOAPException { for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java index 9eab895..0c5defb 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/GetSecurityServerMetricsResponseDeserializerTest.java @@ -27,11 +27,10 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; -import org.w3c.dom.NodeList; - import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; +import org.w3c.dom.NodeList; import java.util.Map; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java index ea08329..685be0e 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListCentralServicesResponseDeserializerTest.java @@ -26,9 +26,8 @@ import org.niis.xrd4j.common.member.ObjectType; import org.niis.xrd4j.common.member.ProducerMember; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java index 1853454..4433d1e 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListClientsResponseDeserializerTest.java @@ -26,9 +26,8 @@ import org.niis.xrd4j.common.member.ConsumerMember; import org.niis.xrd4j.common.member.ObjectType; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java index f24a055..ae4832b 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ListServicesResponseDeserializerTest.java @@ -29,10 +29,9 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java index 2c27d22..d8e8b24 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/deserializer/ServiceResponseDeserializerTest.java @@ -28,11 +28,10 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import java.util.Map; @@ -1199,7 +1198,7 @@ protected String deserializeResponseData(Node responseNode, SOAPMessage message) } } - private class TestResponseDeserializer2 extends TestResponseDeserializer { + private final class TestResponseDeserializer2 extends TestResponseDeserializer { @Override protected Object deserializeFaultDetail(Node detailNode) { @@ -1210,7 +1209,7 @@ protected Object deserializeFaultDetail(Node detailNode) { } } - private class TestResponseDeserializer3 extends TestResponseDeserializer { + private final class TestResponseDeserializer3 extends TestResponseDeserializer { @Override protected String deserializeResponseData(Node responseNode, SOAPMessage message) throws SOAPException { diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java index 412746a..527a042 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/DefaultServiceRequestSerializerTest.java @@ -31,10 +31,9 @@ import org.niis.xrd4j.common.util.MessageHelper; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java index 7ac923f..3e0af52 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/serializer/ServiceRequestSerializerTest.java @@ -29,12 +29,11 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -595,7 +594,7 @@ void test19() throws XRd4JException, SOAPException { assertEquals(correctRequest, SOAPHelper.toString(msg)); } - private class TestRequestSerializer extends AbstractServiceRequestSerializer { + private final class TestRequestSerializer extends AbstractServiceRequestSerializer { protected void serializeRequest(ServiceRequest request, SOAPElement soapRequest, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapRequest.addChildElement(envelope.createName("data")); @@ -603,7 +602,7 @@ protected void serializeRequest(ServiceRequest request, SOAPElement soapRequest, } } - private class TestRequestSerializer1 extends AbstractServiceRequestSerializer { + private final class TestRequestSerializer1 extends AbstractServiceRequestSerializer { protected void serializeRequest(ServiceRequest request, SOAPElement soapRequest, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapRequest.addChildElement("data", request.getProducer().getNamespacePrefix()); @@ -611,7 +610,7 @@ protected void serializeRequest(ServiceRequest request, SOAPElement soapRequest, } } - private class TestRequestSerializer2 extends AbstractServiceRequestSerializer { + private final class TestRequestSerializer2 extends AbstractServiceRequestSerializer { protected void serializeRequest(ServiceRequest request, SOAPElement soapRequest, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapRequest.addChildElement("data", "ts", "http://www.test.com/ns"); diff --git a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java index 9fb05be..45896a0 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/deserializer/AbstractHeaderDeserializer.java @@ -31,14 +31,13 @@ import org.niis.xrd4j.common.util.Constants; import org.niis.xrd4j.common.util.SOAPHelper; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPHeader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NodeList; -import jakarta.xml.soap.Node; -import jakarta.xml.soap.SOAPHeader; - import java.util.Map; /** diff --git a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java index 6179819..c49ba1e 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/serializer/AbstractHeaderSerializer.java @@ -28,13 +28,12 @@ import org.niis.xrd4j.common.util.Constants; import org.niis.xrd4j.common.util.MessageHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPHeader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This abstract class contains methods for adding valid X-Road version 6 SOAP diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index 877d14e..e406a1a 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -22,6 +22,8 @@ */ package org.niis.xrd4j.common.util; +import org.niis.xrd4j.common.message.AbstractMessage; + import jakarta.xml.soap.AttachmentPart; import jakarta.xml.soap.MessageFactory; import jakarta.xml.soap.MimeHeaders; @@ -30,7 +32,6 @@ import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; -import org.niis.xrd4j.common.message.AbstractMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java index 264323e..2f2a05e 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java @@ -22,11 +22,10 @@ */ package org.niis.xrd4j.common.util; +import jakarta.xml.soap.SOAPElement; import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; -import jakarta.xml.soap.SOAPElement; - import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/src/config/checkstyle/checkstyle.xml b/src/config/checkstyle/checkstyle.xml index 4a1e977..2b59f97 100644 --- a/src/config/checkstyle/checkstyle.xml +++ b/src/config/checkstyle/checkstyle.xml @@ -27,18 +27,23 @@ + + + + - + - - - + + + + @@ -68,9 +73,7 @@ - - - + @@ -134,6 +137,7 @@ + diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java index 96dbc52..fdf1fde 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java @@ -24,13 +24,14 @@ import org.niis.xrd4j.rest.ClientResponse; import org.niis.xrd4j.rest.util.ClientUtil; -import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; -import org.apache.hc.core5.http.Header; -import org.apache.hc.core5.http.HttpHost; -import org.apache.hc.client5.http.config.RequestConfig; + import org.apache.hc.client5.http.classic.methods.HttpUriRequest; +import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpHost; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index 27c4e24..92d86b2 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -35,9 +35,6 @@ import org.niis.xrd4j.server.serializer.ServiceResponseSerializer; import org.niis.xrd4j.server.utils.AdapterUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; @@ -47,6 +44,8 @@ import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.PrintWriter; @@ -344,7 +343,7 @@ private ErrorMessage cloneErrorMessage(ErrorMessage errorMsg) { * class. It's needed only for generating SOAP Fault messages. * SerializeResponse method gets never called. */ - private class DummyServiceResponseSerializer extends AbstractServiceResponseSerializer { + private final class DummyServiceResponseSerializer extends AbstractServiceResponseSerializer { @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java index cbb859a..ab46f72 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/AbstractCustomRequestDeserializer.java @@ -27,16 +27,15 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.NodeList; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPBody; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; import jakarta.xml.soap.SOAPPart; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.NodeList; /** * This abstract class serves as a base class for all the application specific diff --git a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java index f079357..0dc63fd 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerImpl.java @@ -30,14 +30,13 @@ import org.niis.xrd4j.common.member.SecurityServer; import org.niis.xrd4j.common.message.ServiceRequest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPHeader; import jakarta.xml.soap.SOAPMessage; import jakarta.xml.soap.SOAPPart; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This class offers methods for deserializing SOAPMessages to ServiceRequest diff --git a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java index c9e3e2d..0b8c609 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/serializer/AbstractServiceResponseSerializer.java @@ -22,6 +22,14 @@ */ package org.niis.xrd4j.server.serializer; +import org.niis.xrd4j.common.exception.XRd4JException; +import org.niis.xrd4j.common.message.ErrorMessage; +import org.niis.xrd4j.common.message.ErrorMessageType; +import org.niis.xrd4j.common.message.ServiceRequest; +import org.niis.xrd4j.common.message.ServiceResponse; +import org.niis.xrd4j.common.serializer.AbstractHeaderSerializer; +import org.niis.xrd4j.common.util.SOAPHelper; + import jakarta.xml.soap.Name; import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPBody; @@ -30,13 +38,6 @@ import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; -import org.niis.xrd4j.common.exception.XRd4JException; -import org.niis.xrd4j.common.message.ErrorMessage; -import org.niis.xrd4j.common.message.ErrorMessageType; -import org.niis.xrd4j.common.message.ServiceRequest; -import org.niis.xrd4j.common.message.ServiceResponse; -import org.niis.xrd4j.common.serializer.AbstractHeaderSerializer; -import org.niis.xrd4j.common.util.SOAPHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -222,7 +223,7 @@ private List childElementsByLocalName(SOAPElement soapElement, Stri } private boolean copyRequestNode(final SOAPElement node, final SOAPBodyElement body, final ServiceResponse response) { - for (Iterator it = node.getChildElements(); it.hasNext(); ) { + for (Iterator it = node.getChildElements(); it.hasNext();) { var childNode = it.next(); if (childNode.getNodeType() == Node.ELEMENT_NODE && childNode instanceof SOAPElement diff --git a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java index 0d0b5c3..ad908ab 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/utils/AdapterUtils.java @@ -22,9 +22,6 @@ */ package org.niis.xrd4j.server.utils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.xml.soap.AttachmentPart; @@ -32,6 +29,8 @@ import jakarta.xml.soap.MimeHeaders; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Enumeration; import java.util.Iterator; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java index 41b5a46..104bc7b 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/CustomRequestDeserializerTest.java @@ -27,11 +27,10 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import java.util.Map; @@ -290,7 +289,7 @@ void testException2() throws SOAPException, XRd4JException { assertEquals(true, request.getSoapMessage() != null); } - private class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { + private final class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { protected String deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { @@ -303,7 +302,7 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) throw } } - private class CustomRequestDeserializerImpl1 extends AbstractCustomRequestDeserializer { + private final class CustomRequestDeserializerImpl1 extends AbstractCustomRequestDeserializer { protected Map deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { if (requestNode == null) { diff --git a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java index 9c03728..1b9be54 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/deserializer/ServiceRequestDeserializerTest.java @@ -27,10 +27,9 @@ import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; diff --git a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java index 81f6cb1..ca0c201 100644 --- a/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java +++ b/src/server/src/test/java/org/niis/xrd4j/server/serializer/ServiceResponseSerializerTest.java @@ -31,12 +31,11 @@ import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.common.util.SOAPHelper; -import org.junit.jupiter.api.Test; - import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.junit.jupiter.api.Test; import java.util.LinkedHashMap; import java.util.Map; @@ -1140,7 +1139,7 @@ void testSOAPNonTechErr3() throws XRd4JException, SOAPException { assertEquals(correctResponse, SOAPHelper.toString(msg)); } - private class ServiceResponseSerializerImpl extends AbstractServiceResponseSerializer { + private final class ServiceResponseSerializerImpl extends AbstractServiceResponseSerializer { public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapResponse.addChildElement(envelope.createName("data")); @@ -1148,7 +1147,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse } } - private class ServiceResponseSerializerImpl1 extends AbstractServiceResponseSerializer { + private final class ServiceResponseSerializerImpl1 extends AbstractServiceResponseSerializer { public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { for (String key : ((Map) response.getResponseData()).keySet()) { @@ -1158,7 +1157,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse } } - private class XMLServiceResponseSerializer extends AbstractServiceResponseSerializer { + private final class XMLServiceResponseSerializer extends AbstractServiceResponseSerializer { @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { @@ -1170,7 +1169,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse } } - private class ServiceResponseSerializerImpl2 extends AbstractServiceResponseSerializer { + private final class ServiceResponseSerializerImpl2 extends AbstractServiceResponseSerializer { public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { SOAPElement data = soapResponse.addChildElement("data", "ns1"); From cf7c1ed159093b88256d84704eddbf65f37db854 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 16:22:19 +0300 Subject: [PATCH 46/73] chore: example adapter build configuration Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index c9ab29b..e0cd1c1 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -45,6 +45,13 @@ publishing { publications.create("maven") { from(components["java"]) } + repositories { + maven { + val releasesRepoUrl = uri("https://artifactory.niis.org/xroad-maven-releases/") + val snapshotsRepoUrl = uri("https://artifactory.niis.org/xroad-maven-snapshots/") + url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + } + } } tasks.withType() { @@ -55,6 +62,12 @@ tasks.withType() { options.encoding = "UTF-8" } +tasks.withType() { + from(rootProject.files("../LICENSE", "3RD-PARTY-NOTICES.txt")) { + into("META-INF") + } +} + cxfCodegen { cxfVersion = "4.0.5" } From aa8905f63448a10737231426f4ec4ddc1edcc213 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 16:22:36 +0300 Subject: [PATCH 47/73] chore: maven configuration file removed Refs: XRDDEV-2628 --- example-adapter/pom.xml | 299 ---------------------------------------- 1 file changed, 299 deletions(-) delete mode 100644 example-adapter/pom.xml diff --git a/example-adapter/pom.xml b/example-adapter/pom.xml deleted file mode 100644 index c7def3d..0000000 --- a/example-adapter/pom.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - 4.0.0 - org.niis - example-adapter - 0.0.6-SNAPSHOT - Example Adapter for X-Road version 6 - 2018 - - This project provides an example implementation of a web service - that's compatible with X-Road version 6. The implementation is based - on XRd4J library. The service contains a single servlet that implements - two services - - https://github.com/nordic-institute/xrd4j/tree/master/example-adapter - war - - org.springframework.boot - spring-boot-starter-parent - 2.7.9 - - - 0.5.0-SNAPSHOT - 2.0.6 - 1.8 - 3.6.3 - UTF-8 - UTF-8 - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-aop - - - org.apache.cxf - cxf-spring-boot-starter-jaxws - ${cxf.version} - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - - org.apache.tomcat.embed - tomcat-embed-jasper - provided - - - - org.yaml - snakeyaml - 1.33 - - - org.niis.xrd4j - common - ${xrd4j.version} - - - org.niis.xrd4j - server - ${xrd4j.version} - - - - - com.sun.xml.messaging.saaj - saaj-impl - 1.3.28 - - - - javax.activation - activation - 1.1.1 - - - - - org.slf4j - slf4j-api - ${slf4j.version} - - - - - org.slf4j - slf4j-reload4j - ${slf4j.version} - - - - junit - junit - 4.13.1 - test - - - - - MIT License - http://www.opensource.org/licenses/mit-license.php - - - - - niis - Nordic Institute for Interoperability Solutions (NIIS) - - architect - developer - - +2 - - - vrk - Population Register Centre (VRK) - - architect - developer - - +2 - - - petkivim - Petteri Kivimäki - - architect - developer - - +2 - - - raits - Raido Kaju - - developer - - +2 - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - maven-resources-plugin - 3.2.0 - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/classes/META-INF - - - . - - 3RD-PARTY-NOTICES.txt - - - - ../ - - LICENSE - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - ${jdk.version} - ${jdk.version} - ${project.build.sourceEncoding} - - - - com.mycila - license-maven-plugin - 3.0 - -

com/mycila/maven/plugin/license/templates/MIT.txt
- - Nordic Institute for Interoperability Solutions (NIIS) - - true - - **/*.java - - - - - license-headers - process-sources - - format - - - - - - org.owasp - dependency-check-maven - 8.1.2 - - 24 - false - false - false - - dependency-check-suppressions.xml - - - - - - check - - - - - - org.apache.cxf - cxf-codegen-plugin - ${cxf.version} - - - generate-sources - generate-sources - - wsdl2java - - - - - ${project.basedir}/src/main/resources/mtomservice.wsdl - - - - - - - - package - - - src/main/resources - true - - - - - - niis-repo - NIIS's Maven repository - https://artifactory.niis.org/xroad-maven-releases - - - niis-snapshot-repo - NIIS's snapshot Maven repository - https://artifactory.niis.org/xroad-maven-snapshots - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.13 - - - - checkstyle - - - - - - - From 599b277715b595713e3c832907a26caafae3a62a Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 16:29:15 +0300 Subject: [PATCH 48/73] chore: gradle version updated to 8.10.1 Refs: XRDDEV-2628 --- example-adapter/gradle/wrapper/gradle-wrapper.properties | 2 +- src/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example-adapter/gradle/wrapper/gradle-wrapper.properties b/example-adapter/gradle/wrapper/gradle-wrapper.properties index a441313..0aaefbc 100644 --- a/example-adapter/gradle/wrapper/gradle-wrapper.properties +++ b/example-adapter/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/gradle/wrapper/gradle-wrapper.properties b/src/gradle/wrapper/gradle-wrapper.properties index a441313..0aaefbc 100644 --- a/src/gradle/wrapper/gradle-wrapper.properties +++ b/src/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 49222e1a66a25627612c5ac496cab8d81b3adc46 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 16 Sep 2024 16:29:30 +0300 Subject: [PATCH 49/73] chore: license headers updated Refs: XRDDEV-2628 --- .../main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index 92d86b2..c31af8e 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -1,4 +1,4 @@ -/** +/* * The MIT License * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) * From 6b072182d709c0352ef3d918973d6cd0fbb4ff43 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Wed, 25 Sep 2024 09:24:15 +0300 Subject: [PATCH 50/73] test: tests for AbstractAdapterServlet Refs: XRDDEV-2628 --- src/server/build.gradle.kts | 37 +++++ .../org/niis/xrd4j/inttest/ServletTest.java | 143 +++++++++++++++++ .../org/niis/xrd4j/inttest/TestServlet.java | 149 ++++++++++++++++++ .../integrationTest/resources/log4j2-test.xml | 16 ++ .../test-data/fault-client-error.xml | 11 ++ .../resources/test-data/hello-request.xml | 26 +++ .../resources/test-data/hello-response.xml | 22 +++ .../resources/test-servlet.wsdl | 109 +++++++++++++ .../xrd4j/server/AbstractAdapterServlet.java | 17 +- 9 files changed, 524 insertions(+), 6 deletions(-) create mode 100644 src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java create mode 100644 src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java create mode 100644 src/server/src/integrationTest/resources/log4j2-test.xml create mode 100644 src/server/src/integrationTest/resources/test-data/fault-client-error.xml create mode 100644 src/server/src/integrationTest/resources/test-data/hello-request.xml create mode 100644 src/server/src/integrationTest/resources/test-data/hello-response.xml create mode 100644 src/server/src/integrationTest/resources/test-servlet.wsdl diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index 76d790f..9f5db7c 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("xrd4j.java-conventions") + `jvm-test-suite` } dependencies { @@ -7,9 +8,45 @@ dependencies { compileOnly(libs.jakarta.servlet.servletApi) testImplementation(libs.bundles.testImplementation) + } pomSettings { name = "XRd4J :: Server" description = "This module provides an abstract servlet that can be used as a base class for Adapter Server implementation." } + + +testing { + suites { + val test by getting(JvmTestSuite::class) { + useJUnitJupiter() + } + + register("integrationTest") { + dependencies { + implementation(project()) + implementation(libs.jakarta.servlet.servletApi) + implementation("org.apache.tomcat.embed:tomcat-embed-core:10.1.30") + + implementation(libs.org.apache.logging.log4j.log4jCore) + implementation(libs.org.apache.logging.log4j.log4jSlf4j2Impl) + implementation("org.assertj:assertj-core:3.26.3") + implementation("org.xmlunit:xmlunit-assertj3:2.10.0") + implementation("org.xmlunit:xmlunit-placeholders:2.10.0") + } + + targets { + all { + testTask.configure { + shouldRunAfter(test) + } + } + } + } + } +} + +tasks.named("check") { + dependsOn(testing.suites.named("integrationTest")) +} diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java new file mode 100644 index 0000000..1d8a07a --- /dev/null +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java @@ -0,0 +1,143 @@ +package org.niis.xrd4j.inttest; + +import org.apache.catalina.Context; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.startup.Tomcat; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xmlunit.assertj3.XmlAssert; +import org.xmlunit.placeholder.PlaceholderDifferenceEvaluator; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.file.Path; + +import static org.apache.catalina.startup.Tomcat.addServlet; +import static org.assertj.core.api.Assertions.assertThat; + +public class ServletTest { + private static final Logger logger = LoggerFactory.getLogger(ServletTest.class); + + @TempDir + private static Path tomcatBaseDir; + private static Tomcat tomcat; + private static int serverPort; + + @BeforeAll + static void startTomcat() throws LifecycleException { + logger.info("Starting server"); + tomcat = new Tomcat(); + tomcat.setBaseDir(tomcatBaseDir.toString()); + tomcat.setPort(0); + Context context = tomcat.addContext("", new File(".").getAbsolutePath()); + + addServlet(context, "TestServlet", new TestServlet()).addMapping("/"); + + tomcat.start(); + serverPort = tomcat.getConnector().getLocalPort(); + logger.info("Server started at port {}", serverPort); + } + + @AfterAll + static void stopTomcat() throws LifecycleException { + tomcat.stop(); + logger.info("Server stopped"); + } + + + @Test + void successfulRequest() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "text/xml") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + XmlAssert.assertThat(response.body()) + .and(Path.of("src/integrationTest/resources/test-data/hello-response.xml")) + .ignoreWhitespace() + .areIdentical(); + + } + + @Test + void invalidContentType() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "invalid") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + + assertSoapFaultClientError(response, "Invalid content type : \"invalid\"."); + + } + + @Test + void noContentType() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + // no content type in request + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + assertSoapFaultClientError(response, "Invalid content type : \"null\"."); + + } + + private void assertSoapFaultClientError(HttpResponse response, String expected) { + XmlAssert.assertThat(response.body()) + .and(Path.of("src/integrationTest/resources/test-data/fault-client-error.xml")) + .ignoreWhitespace() + .withDifferenceEvaluator(new PlaceholderDifferenceEvaluator()) + .areIdentical(); + + XmlAssert.assertThat(response.body()) + .valueByXPath("//faultstring") + .isEqualTo(expected); + } + + @Test + void getWSDL() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .uri(getServerUri().resolve("?wsdl")) + .GET() + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + XmlAssert.assertThat(response.body()) + .and(Path.of("src/integrationTest/resources/test-servlet.wsdl")) + .ignoreWhitespace() + .areIdentical(); + + } + + private URI getServerUri() { + return URI.create("http://localhost:" + serverPort + "/"); + } + + +} diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java new file mode 100644 index 0000000..a8e6bc0 --- /dev/null +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java @@ -0,0 +1,149 @@ +package org.niis.xrd4j.inttest; + +import org.niis.xrd4j.common.exception.XRd4JException; +import org.niis.xrd4j.common.message.ErrorMessage; +import org.niis.xrd4j.common.message.ServiceRequest; +import org.niis.xrd4j.common.message.ServiceResponse; +import org.niis.xrd4j.server.AbstractAdapterServlet; +import org.niis.xrd4j.server.deserializer.AbstractCustomRequestDeserializer; +import org.niis.xrd4j.server.deserializer.CustomRequestDeserializer; +import org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer; +import org.niis.xrd4j.server.serializer.ServiceResponseSerializer; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; +import org.slf4j.Logger; + +import java.io.IOException; + +/** + * Test servlet implementation copied and modified from example-adapter. + */ +class TestServlet extends AbstractAdapterServlet { + private static final long serialVersionUID = 1L; + private static final Logger logger = org.slf4j.LoggerFactory.getLogger(TestServlet.class); + private final String namespaceSerialize = "http://test.x-road.global/consumer"; + private final String namespaceDeserialize = "http://test.x-road.global/producer"; + private final String prefix = "xrdtest"; + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + logger.debug("GET request received."); + super.doGet(request, response); + } + + @Override + protected ServiceResponse handleRequest(ServiceRequest request) throws SOAPException, XRd4JException { + ServiceResponseSerializer serializer; + if ("helloService".equals(request.getProducer().getServiceCode())) { + // Process "helloService" service + logger.info("Process \"helloService\" service."); + // Create a new response serializer that serializes the response + // to SOAP + serializer = new HelloServiceResponseSerializer(); + // Create a custom request deserializer that parses the request + // data from the SOAP request + CustomRequestDeserializer customDeserializer = new CustomRequestDeserializerImpl(); + // Parse the request data from the request + customDeserializer.deserialize(request, this.namespaceDeserialize); + // Create a new ServiceResponse object + ServiceResponse response = createResponse(request); + // Set namespace of the SOAP response + response.getProducer().setNamespaceUrl(this.namespaceSerialize); + response.getProducer().setNamespacePrefix(this.prefix); + logger.debug("Do message prosessing..."); + if (request.getRequestData() != null) { + // If request data is not null, add response data to the + // response object + response.setResponseData("Hello " + request.getRequestData() + "!"); + } else { + // No request data is found - an error message is returned + logger.warn("No \"name\" parameter found. Return a non-techinal error message."); + ErrorMessage error = new ErrorMessage("422", "422 Unprocessable Entity. Missing \"name\" element."); + response.setErrorMessage(error); + } + logger.debug("Message prosessing done!"); + // Serialize the response to SOAP + serializer.serialize(response, request); + // Return the response - AbstractAdapterServlet takes care of + // the rest + return response; + } + + return null; + } + + + @Override + protected String getWSDLPath() { + return "test-servlet.wsdl"; + } + + private ServiceResponse createResponse(ServiceRequest request) throws XRd4JException { + return new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); + } + + /** + * This class is responsible for serializing response data of helloService + * service responses. + */ + private static class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { + + /** + * Serializes the response data. + * + * @param response ServiceResponse holding the application specific + * response object + * @param soapResponse SOAPMessage's response object where the response + * element is added + * @param envelope SOAPMessage's SOAPEnvelope object + */ + @Override + public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { + // Add "message" element + SOAPElement data = soapResponse.addChildElement(envelope.createName("message")); + // Put response data inside the "message" element + data.addTextNode((String) response.getResponseData()); + } + } + + /** + * This class is responsible for deserializing request data of helloService + * service requests. The type declaration "" defines the type of the + * request data, which in this case is String. + */ + private static class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { + + /** + * Deserializes the "request" element. + * + * @param requestNode request element + * @return content of the request element + */ + @Override + protected String deserializeRequest(Node requestNode, SOAPMessage message) { + if (requestNode == null) { + logger.warn("\"requestNode\" is null. Null is returned."); + return null; + } + for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { + // Request data is inside of "name" element + if (requestNode.getChildNodes().item(i).getNodeType() == Node.ELEMENT_NODE + && "name".equals(requestNode.getChildNodes().item(i).getLocalName())) { + logger.debug("Found \"name\" element."); + // "name" element was found - return the text content + return requestNode.getChildNodes().item(i).getTextContent(); + } + } + logger.warn("No \"name\" element found. Null is returned."); + return null; + } + } +} diff --git a/src/server/src/integrationTest/resources/log4j2-test.xml b/src/server/src/integrationTest/resources/log4j2-test.xml new file mode 100644 index 0000000..4685529 --- /dev/null +++ b/src/server/src/integrationTest/resources/log4j2-test.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/server/src/integrationTest/resources/test-data/fault-client-error.xml b/src/server/src/integrationTest/resources/test-data/fault-client-error.xml new file mode 100644 index 0000000..d128af7 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/fault-client-error.xml @@ -0,0 +1,11 @@ + + + + + SOAP-ENV:Client + ${xmlunit.ignore} + + + + + diff --git a/src/server/src/integrationTest/resources/test-data/hello-request.xml b/src/server/src/integrationTest/resources/test-data/hello-request.xml new file mode 100644 index 0000000..4c11f32 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/hello-request.xml @@ -0,0 +1,26 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + helloService + v1 + + ID11234 + EE1234567890 + 4.0 + + + + Test + + + diff --git a/src/server/src/integrationTest/resources/test-data/hello-response.xml b/src/server/src/integrationTest/resources/test-data/hello-response.xml new file mode 100644 index 0000000..c03088e --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/hello-response.xml @@ -0,0 +1,22 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + helloService + v1 + + ID11234 + EE1234567890 + 4.0 + + Hello Test! + diff --git a/src/server/src/integrationTest/resources/test-servlet.wsdl b/src/server/src/integrationTest/resources/test-servlet.wsdl new file mode 100644 index 0000000..99f4838 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-servlet.wsdl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + Name + + + Name + + + + + + + + + + + + + Service response + + + Hello response + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hello service + This service returns a hello message using the given input. + + + + + + + + + + + + v1 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index c31af8e..7c07158 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -129,11 +129,12 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) } // Get incoming SOAP message - if (request.getContentType().toLowerCase().startsWith(Constants.TEXT_XML)) { + var requestContentType = request.getContentType(); + if (contentTypeMatches(requestContentType, Constants.TEXT_XML)) { // Regular SOAP message without attachments LOGGER.info("Request's content type is \"{}\".", Constants.TEXT_XML); soapRequest = SOAPHelper.toSOAP(request.getInputStream()); - } else if (request.getContentType().toLowerCase().startsWith(Constants.MULTIPART_RELATED)) { + } else if (contentTypeMatches(requestContentType, Constants.MULTIPART_RELATED)) { // SOAP message with attachments LOGGER.info("Request's content type is \"{}\".", Constants.MULTIPART_RELATED); MimeHeaders mh = AdapterUtils.getHeaders(request); @@ -141,8 +142,8 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) LOGGER.trace(AdapterUtils.getAttachmentsInfo(soapRequest)); } else { // Invalid content type -> message is not processed - LOGGER.warn("Invalid content type : \"{}\".", request.getContentType()); - errString = "Invalid content type : \"" + request.getContentType() + "\"."; + LOGGER.warn("Invalid content type : \"{}\".", requestContentType); + errString = "Invalid content type : \"" + requestContentType + "\"."; } // Conversion has failed if soapRequest is null. Return SOAP Fault. @@ -173,6 +174,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) writeResponse(soapResponse, response); } + private boolean contentTypeMatches(String contentType, String expected) { + return contentType != null && contentType.toLowerCase().startsWith(expected); + } + /** * Writes the given SOAP response to output stream. Sets the necessary HTTP * headers according to the content of the response. @@ -343,11 +348,11 @@ private ErrorMessage cloneErrorMessage(ErrorMessage errorMsg) { * class. It's needed only for generating SOAP Fault messages. * SerializeResponse method gets never called. */ - private final class DummyServiceResponseSerializer extends AbstractServiceResponseSerializer { + private static final class DummyServiceResponseSerializer extends AbstractServiceResponseSerializer { @Override public void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { - /** + /* * This is needed only for generating SOAP Fault messages. * SerializeResponse method gets never called. */ From e6cac88449f8e252e4fdc555106126d14d95c654 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 26 Sep 2024 15:38:52 +0300 Subject: [PATCH 51/73] test: tests for AbstractAdapterServlet Refs: XRDDEV-2628 --- .../kotlin/xrd4j.java-conventions.gradle.kts | 8 + src/gradle/libs.versions.toml | 1 + src/server/build.gradle.kts | 7 + .../org/niis/xrd4j/inttest/ServletTest.java | 159 +++++++++++++++--- .../org/niis/xrd4j/inttest/TestServlet.java | 127 ++++++++++++-- .../test-data/fault-client-error.xml | 2 - .../test-data/get-attachments-request.xml | 28 +++ .../test-data/get-attachments-response.xml | 33 ++++ .../invalid-service-code-request.xml | 24 +++ .../test-data/store-attachments-request.txt | 47 ++++++ .../test-data/store-attachments-response.xml | 22 +++ 11 files changed, 417 insertions(+), 41 deletions(-) create mode 100644 src/server/src/integrationTest/resources/test-data/get-attachments-request.xml create mode 100644 src/server/src/integrationTest/resources/test-data/get-attachments-response.xml create mode 100644 src/server/src/integrationTest/resources/test-data/invalid-service-code-request.xml create mode 100644 src/server/src/integrationTest/resources/test-data/store-attachments-request.txt create mode 100644 src/server/src/integrationTest/resources/test-data/store-attachments-response.xml diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 0517d57..3ba0ccf 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -97,3 +97,11 @@ license { mapping("java", "SLASHSTAR_STYLE") strictCheck = true } + + +tasks.withType(JacocoReport::class) { + executionData(tasks.withType()) + reports { + xml.required.set(true) + } +} diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 81be57f..95136e0 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -17,6 +17,7 @@ org-json-json = { module = "org.json:json", version.ref = "org-json-json" } org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } +org-apache-james-mime4jCore = { module = "org.apache.james:apache-mime4j-core", version = "0.8.7" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index 9f5db7c..c6b681a 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -34,12 +34,19 @@ testing { implementation("org.assertj:assertj-core:3.26.3") implementation("org.xmlunit:xmlunit-assertj3:2.10.0") implementation("org.xmlunit:xmlunit-placeholders:2.10.0") + implementation(libs.org.apache.james.mime4jCore) } targets { all { testTask.configure { shouldRunAfter(test) + jvmArgs( + "--add-opens=java.base/java.lang=ALL-UNNAMED", + "--add-opens=java.base/java.io=ALL-UNNAMED", + "--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED" + ) + } } } diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java index 1d8a07a..bb37d54 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java @@ -3,10 +3,18 @@ import org.apache.catalina.Context; import org.apache.catalina.LifecycleException; import org.apache.catalina.startup.Tomcat; +import org.apache.james.mime4j.MimeException; +import org.apache.james.mime4j.parser.AbstractContentHandler; +import org.apache.james.mime4j.parser.ContentHandler; +import org.apache.james.mime4j.parser.MimeStreamParser; +import org.apache.james.mime4j.stream.BodyDescriptor; +import org.apache.james.mime4j.stream.MimeConfig; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import org.junit.platform.commons.util.StringUtils; +import org.opentest4j.AssertionFailedError; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xmlunit.assertj3.XmlAssert; @@ -14,17 +22,22 @@ import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.catalina.startup.Tomcat.addServlet; import static org.assertj.core.api.Assertions.assertThat; public class ServletTest { private static final Logger logger = LoggerFactory.getLogger(ServletTest.class); + public static final String TEST_DATA_DIR = "src/integrationTest/resources/test-data/"; @TempDir private static Path tomcatBaseDir; @@ -53,91 +66,183 @@ static void stopTomcat() throws LifecycleException { } + @Test + void getWSDL() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .uri(getServerUri().resolve("?wsdl")) + .GET() + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + } + @Test void successfulRequest() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .header("Content-Type", "text/xml") .uri(getServerUri()) - .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .POST(HttpRequest.BodyPublishers.ofFile(testData("hello-request.xml"))) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); - assertThat(response.statusCode()).isEqualTo(200); - XmlAssert.assertThat(response.body()) - .and(Path.of("src/integrationTest/resources/test-data/hello-response.xml")) - .ignoreWhitespace() - .areIdentical(); + assertResponseSuccess(response, "hello-response.xml"); } @Test - void invalidContentType() throws IOException, InterruptedException { + void multipartRequest() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() - .header("Content-Type", "invalid") + .headers("Content-Type", "multipart/related; start=\"\"; boundary=MIME_boundary") .uri(getServerUri()) - .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .POST(HttpRequest.BodyPublishers.ofFile(testData("store-attachments-request.txt"))) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + assertResponseSuccess(response, "store-attachments-response.xml"); + + } + + @Test + void multipartResponse() throws IOException, InterruptedException, MimeException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "text/xml") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(testData("get-attachments-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofInputStream()); + assertThat(response.statusCode()).isEqualTo(200); + var parts = parseMultipart(response); + assertThat(parts).satisfiesExactly( + part -> assertXmlIdentical(part, "get-attachments-response.xml"), + part -> assertThat(part).hasSize(100), + part -> assertThat(part).hasSize(50) + ); - assertSoapFaultClientError(response, "Invalid content type : \"invalid\"."); } + private List parseMultipart(HttpResponse response) throws MimeException, IOException { + var contentType = response.headers().firstValue("Content-Type") + .orElseThrow(() -> new AssertionFailedError("No Content-Type header")); + List parts = new ArrayList<>(); + MimeStreamParser mimeStreamParser = new MimeStreamParser(MimeConfig.custom().setHeadlessParsing(contentType).build()); + ContentHandler contentHandler = new AbstractContentHandler() { + @Override + public void body(BodyDescriptor bd, InputStream is) throws MimeException, IOException { + parts.add(new String(is.readAllBytes(), UTF_8)); + } + }; + mimeStreamParser.setContentHandler(contentHandler); + mimeStreamParser.parse(response.body()); + return parts; + } + + @Test - void noContentType() throws IOException, InterruptedException { + void invalidServiceCode() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() - // no content type in request + .header("Content-Type", "text/xml") .uri(getServerUri()) - .POST(HttpRequest.BodyPublishers.ofFile(Path.of("src/integrationTest/resources/test-data/hello-request.xml"))) + .POST(HttpRequest.BodyPublishers.ofFile(testData("invalid-service-code-request.xml"))) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); assertThat(response.statusCode()).isEqualTo(200); - assertSoapFaultClientError(response, "Invalid content type : \"null\"."); + assertSoapFaultClientError(response, "Unknown service code."); } - private void assertSoapFaultClientError(HttpResponse response, String expected) { - XmlAssert.assertThat(response.body()) - .and(Path.of("src/integrationTest/resources/test-data/fault-client-error.xml")) - .ignoreWhitespace() - .withDifferenceEvaluator(new PlaceholderDifferenceEvaluator()) - .areIdentical(); + @Test + void invalidRequestBody() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "text/xml") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofString("xml")) + .build(); - XmlAssert.assertThat(response.body()) - .valueByXPath("//faultstring") - .isEqualTo(expected); + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + + assertSoapFaultClientError(response, "Invalid X-Road SOAP message. Unable to parse the request."); } @Test - void getWSDL() throws IOException, InterruptedException { + void invalidContentType() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() - .uri(getServerUri().resolve("?wsdl")) - .GET() + .header("Content-Type", "invalid") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(testData("hello-request.xml"))) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); assertThat(response.statusCode()).isEqualTo(200); + + assertSoapFaultClientError(response, "Invalid content type : \"invalid\"."); + } + + @Test + void noContentType() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + // no content type in request + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(testData("hello-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(200); + assertSoapFaultClientError(response, "Invalid content type : \"null\"."); + } + + private void assertResponseSuccess(HttpResponse response, String expectedContentFilename) { + assertThat(response.statusCode()).isEqualTo(200); + assertXmlIdentical(response.body(), expectedContentFilename); + } + + private void assertXmlIdentical(String actualXml, String expectedContentFilename) { + XmlAssert.assertThat(actualXml) + .and(testData(expectedContentFilename)) + .ignoreWhitespace() + .areIdentical(); + } + + private void assertSoapFaultClientError(HttpResponse response, String expected) { XmlAssert.assertThat(response.body()) - .and(Path.of("src/integrationTest/resources/test-servlet.wsdl")) + .and(testData("fault-client-error.xml")) + .withNodeFilter(node -> StringUtils.isNotBlank(node.getTextContent())) .ignoreWhitespace() + .withDifferenceEvaluator(new PlaceholderDifferenceEvaluator()) .areIdentical(); + XmlAssert.assertThat(response.body()) + .valueByXPath("//faultstring") + .isEqualTo(expected); } private URI getServerUri() { return URI.create("http://localhost:" + serverPort + "/"); } + private Path testData(String filename) { + return Path.of(TEST_DATA_DIR + filename); + } + } diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java index a8e6bc0..2479e2b 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java @@ -1,7 +1,6 @@ package org.niis.xrd4j.inttest; import org.niis.xrd4j.common.exception.XRd4JException; -import org.niis.xrd4j.common.message.ErrorMessage; import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.server.AbstractAdapterServlet; @@ -13,6 +12,7 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import jakarta.xml.soap.AttachmentPart; import jakarta.xml.soap.Node; import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; @@ -21,6 +21,12 @@ import org.slf4j.Logger; import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; /** * Test servlet implementation copied and modified from example-adapter. @@ -58,22 +64,72 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); + response.setResponseData("Hello " + request.getRequestData() + "!"); + // Serialize the response to SOAP + serializer.serialize(response, request); + // Return the response - AbstractAdapterServlet takes care of + // the rest + return response; + } else if ("getAttachments".equals(request.getProducer().getServiceCode())) { + logger.info("Process \"getAttachments\" service."); + // Create a new response serializer that serializes the response + // to SOAP + serializer = new AttachmentsResponseSerializer(); + // Create a custom request deserializer that parses the request + // data from the SOAP request + CustomRequestDeserializer customDeserializer = new GetAttachmentsRequestDeserializer(); + // Parse the request data from the request + customDeserializer.deserialize(request, this.namespaceDeserialize); + // Create a new ServiceResponse object + ServiceResponse> response = createResponse(request); + // Set namespace of the SOAP response + response.getProducer().setNamespaceUrl(this.namespaceSerialize); + response.getProducer().setNamespacePrefix(this.prefix); logger.debug("Do message prosessing..."); - if (request.getRequestData() != null) { - // If request data is not null, add response data to the - // response object - response.setResponseData("Hello " + request.getRequestData() + "!"); - } else { - // No request data is found - an error message is returned - logger.warn("No \"name\" parameter found. Return a non-techinal error message."); - ErrorMessage error = new ErrorMessage("422", "422 Unprocessable Entity. Missing \"name\" element."); - response.setErrorMessage(error); + + Map attachments = new LinkedHashMap<>(); + List requestedSizes = (List) request.getRequestData(); + for (int i = 0; i < requestedSizes.size(); i++) { + attachments.put(String.format("attachment_%d", i), requestedSizes.get(i)); } + response.setResponseData(attachments); + + logger.debug("Message prosessing done!"); + // Serialize the response to SOAP + serializer.serialize(response, request); + // add the attachment parts + for (Map.Entry file: attachments.entrySet()) { + AttachmentPart attachmentPart = response.getSoapMessage().createAttachmentPart(generateCharacters(file.getValue()), + "application/octet-stream"); + attachmentPart.setContentId(file.getKey()); + response.getSoapMessage().addAttachmentPart(attachmentPart); + } + return response; + } else if ("storeAttachments".equals(request.getProducer().getServiceCode())) { + logger.info("Process \"storeAttachments\" service."); + // Create a new response serializer that serializes the response + // to SOAP + serializer = new AttachmentsResponseSerializer(); + // Create a new ServiceResponse object + ServiceResponse> response = createResponse(request); + // Set namespace of the SOAP response + response.getProducer().setNamespaceUrl(this.namespaceSerialize); + response.getProducer().setNamespacePrefix(this.prefix); + logger.debug("Do message prosessing..."); + + Map attachments = new LinkedHashMap<>(); + Iterator it = request.getSoapMessage().getAttachments(); + if (it != null) { + while (it.hasNext()) { + AttachmentPart attachment = (AttachmentPart) it.next(); + attachments.put(attachment.getContentId(), attachment.getSize()); + } + } + response.setResponseData(attachments); + logger.debug("Message prosessing done!"); // Serialize the response to SOAP serializer.serialize(response, request); - // Return the response - AbstractAdapterServlet takes care of - // the rest return response; } @@ -90,6 +146,17 @@ private ServiceResponse createResponse(ServiceRequest reques return new ServiceResponse<>(request.getConsumer(), request.getProducer(), request.getId()); } + private String generateCharacters(Integer size) { + Random random = new Random(); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < size; i++) { + // Generate a random ASCII code of character between 'a' and 'z' + char randomChar = (char) ('a' + random.nextInt('z' - 'a' + 1)); + sb.append(randomChar); + } + return sb.toString(); + } + /** * This class is responsible for serializing response data of helloService * service responses. @@ -146,4 +213,40 @@ protected String deserializeRequest(Node requestNode, SOAPMessage message) { return null; } } + + private static class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { + + @Override + protected void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { + Map attachments = (Map) response.getResponseData(); + for (Map.Entry file : attachments.entrySet()) { + SOAPElement fileElement = soapResponse.addChildElement(envelope.createName("attachment")); + + SOAPElement name = fileElement.addChildElement(envelope.createName("name")); + name.addTextNode(file.getKey()); + + SOAPElement size = fileElement.addChildElement(envelope.createName("size")); + size.addTextNode(Long.toString(file.getValue())); + } + } + } + + private static class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { + + @Override + protected List deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { + if (requestNode == null) { + logger.warn("\"requestNode\" is null. Null is returned."); + return null; + } + List sizes = new ArrayList<>(); + for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { + org.w3c.dom.Node node = requestNode.getChildNodes().item(i); + if (node.getNodeType() == Node.ELEMENT_NODE && "size".equals(node.getLocalName())) { + sizes.add(Integer.parseInt(node.getTextContent())); + } + } + return sizes; + } + } } diff --git a/src/server/src/integrationTest/resources/test-data/fault-client-error.xml b/src/server/src/integrationTest/resources/test-data/fault-client-error.xml index d128af7..7a9df64 100644 --- a/src/server/src/integrationTest/resources/test-data/fault-client-error.xml +++ b/src/server/src/integrationTest/resources/test-data/fault-client-error.xml @@ -4,8 +4,6 @@ SOAP-ENV:Client ${xmlunit.ignore} - - diff --git a/src/server/src/integrationTest/resources/test-data/get-attachments-request.xml b/src/server/src/integrationTest/resources/test-data/get-attachments-request.xml new file mode 100644 index 0000000..d52936f --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/get-attachments-request.xml @@ -0,0 +1,28 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + getAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + 100 + 50 + + + diff --git a/src/server/src/integrationTest/resources/test-data/get-attachments-response.xml b/src/server/src/integrationTest/resources/test-data/get-attachments-response.xml new file mode 100644 index 0000000..d04e830 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/get-attachments-response.xml @@ -0,0 +1,33 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + getAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + attachment_0 + 100 + + + attachment_1 + 50 + + + + diff --git a/src/server/src/integrationTest/resources/test-data/invalid-service-code-request.xml b/src/server/src/integrationTest/resources/test-data/invalid-service-code-request.xml new file mode 100644 index 0000000..0a77ea8 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/invalid-service-code-request.xml @@ -0,0 +1,24 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + UnknownService + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + diff --git a/src/server/src/integrationTest/resources/test-data/store-attachments-request.txt b/src/server/src/integrationTest/resources/test-data/store-attachments-request.txt new file mode 100644 index 0000000..32aca46 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/store-attachments-request.txt @@ -0,0 +1,47 @@ +--MIME_boundary +Content-Type: text/xml; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-ID: + + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + storeAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + + +--MIME_boundary +Content-Type: application/octet-stream; name=attachment-1 +Content-Transfer-Encoding: binary +Content-ID: attachment-1 +Content-Disposition: attachment; name="attachment-1"; filename="attachment-1" + +attachment 1 content + +--MIME_boundary +Content-Type: application/octet-stream; name=attachment-2 +Content-Transfer-Encoding: binary +Content-ID: attachment-2 +Content-Disposition: attachment; name="attachment-2"; filename="attachment-2" + +attachment 2 + +--MIME_boundary-- diff --git a/src/server/src/integrationTest/resources/test-data/store-attachments-response.xml b/src/server/src/integrationTest/resources/test-data/store-attachments-response.xml new file mode 100644 index 0000000..b0e5c07 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/store-attachments-response.xml @@ -0,0 +1,22 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + storeAttachments + v1 + + ID11234 + EE1234567890 + 4.0 + + attachment-121attachment-213 + From 16f3d90bbbb5dbff77a0abff3790a9f03039a312 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 27 Sep 2024 09:43:24 +0300 Subject: [PATCH 52/73] chore: checkstyle and licenses Refs: XRDDEV-2628 --- src/config/checkstyle/suppressions.xml | 4 +- .../org/niis/xrd4j/inttest/ServletTest.java | 30 ++++++++-- .../org/niis/xrd4j/inttest/TestServlet.java | 58 +++++++++++++------ 3 files changed, 68 insertions(+), 24 deletions(-) diff --git a/src/config/checkstyle/suppressions.xml b/src/config/checkstyle/suppressions.xml index 1006880..1b77564 100644 --- a/src/config/checkstyle/suppressions.xml +++ b/src/config/checkstyle/suppressions.xml @@ -2,6 +2,6 @@ - - + + diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java index bb37d54..5885186 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java @@ -1,3 +1,25 @@ +/* + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package org.niis.xrd4j.inttest; import org.apache.catalina.Context; @@ -36,7 +58,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ServletTest { - private static final Logger logger = LoggerFactory.getLogger(ServletTest.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ServletTest.class); public static final String TEST_DATA_DIR = "src/integrationTest/resources/test-data/"; @TempDir @@ -46,7 +68,7 @@ public class ServletTest { @BeforeAll static void startTomcat() throws LifecycleException { - logger.info("Starting server"); + LOGGER.info("Starting server"); tomcat = new Tomcat(); tomcat.setBaseDir(tomcatBaseDir.toString()); tomcat.setPort(0); @@ -56,13 +78,13 @@ static void startTomcat() throws LifecycleException { tomcat.start(); serverPort = tomcat.getConnector().getLocalPort(); - logger.info("Server started at port {}", serverPort); + LOGGER.info("Server started at port {}", serverPort); } @AfterAll static void stopTomcat() throws LifecycleException { tomcat.stop(); - logger.info("Server stopped"); + LOGGER.info("Server stopped"); } diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java index 2479e2b..7bcec1e 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java @@ -1,3 +1,25 @@ +/* + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package org.niis.xrd4j.inttest; import org.niis.xrd4j.common.exception.XRd4JException; @@ -33,7 +55,7 @@ */ class TestServlet extends AbstractAdapterServlet { private static final long serialVersionUID = 1L; - private static final Logger logger = org.slf4j.LoggerFactory.getLogger(TestServlet.class); + private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(TestServlet.class); private final String namespaceSerialize = "http://test.x-road.global/consumer"; private final String namespaceDeserialize = "http://test.x-road.global/producer"; private final String prefix = "xrdtest"; @@ -41,7 +63,7 @@ class TestServlet extends AbstractAdapterServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - logger.debug("GET request received."); + LOGGER.debug("GET request received."); super.doGet(request, response); } @@ -50,7 +72,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t ServiceResponseSerializer serializer; if ("helloService".equals(request.getProducer().getServiceCode())) { // Process "helloService" service - logger.info("Process \"helloService\" service."); + LOGGER.info("Process \"helloService\" service."); // Create a new response serializer that serializes the response // to SOAP serializer = new HelloServiceResponseSerializer(); @@ -71,7 +93,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // the rest return response; } else if ("getAttachments".equals(request.getProducer().getServiceCode())) { - logger.info("Process \"getAttachments\" service."); + LOGGER.info("Process \"getAttachments\" service."); // Create a new response serializer that serializes the response // to SOAP serializer = new AttachmentsResponseSerializer(); @@ -81,11 +103,11 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // Parse the request data from the request customDeserializer.deserialize(request, this.namespaceDeserialize); // Create a new ServiceResponse object - ServiceResponse> response = createResponse(request); + ServiceResponse> response = createResponse(request); // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); - logger.debug("Do message prosessing..."); + LOGGER.debug("Do message prosessing..."); Map attachments = new LinkedHashMap<>(); List requestedSizes = (List) request.getRequestData(); @@ -94,7 +116,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } response.setResponseData(attachments); - logger.debug("Message prosessing done!"); + LOGGER.debug("Message prosessing done!"); // Serialize the response to SOAP serializer.serialize(response, request); // add the attachment parts @@ -106,7 +128,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } return response; } else if ("storeAttachments".equals(request.getProducer().getServiceCode())) { - logger.info("Process \"storeAttachments\" service."); + LOGGER.info("Process \"storeAttachments\" service."); // Create a new response serializer that serializes the response // to SOAP serializer = new AttachmentsResponseSerializer(); @@ -115,7 +137,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // Set namespace of the SOAP response response.getProducer().setNamespaceUrl(this.namespaceSerialize); response.getProducer().setNamespacePrefix(this.prefix); - logger.debug("Do message prosessing..."); + LOGGER.debug("Do message prosessing..."); Map attachments = new LinkedHashMap<>(); Iterator it = request.getSoapMessage().getAttachments(); @@ -127,7 +149,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } response.setResponseData(attachments); - logger.debug("Message prosessing done!"); + LOGGER.debug("Message prosessing done!"); // Serialize the response to SOAP serializer.serialize(response, request); return response; @@ -161,7 +183,7 @@ private String generateCharacters(Integer size) { * This class is responsible for serializing response data of helloService * service responses. */ - private static class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { + private static final class HelloServiceResponseSerializer extends AbstractServiceResponseSerializer { /** * Serializes the response data. @@ -186,7 +208,7 @@ public void serializeResponse(ServiceResponse response, SOAPElement soapResponse * service requests. The type declaration "" defines the type of the * request data, which in this case is String. */ - private static class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { + private static final class CustomRequestDeserializerImpl extends AbstractCustomRequestDeserializer { /** * Deserializes the "request" element. @@ -197,24 +219,24 @@ private static class CustomRequestDeserializerImpl extends AbstractCustomRequest @Override protected String deserializeRequest(Node requestNode, SOAPMessage message) { if (requestNode == null) { - logger.warn("\"requestNode\" is null. Null is returned."); + LOGGER.warn("\"requestNode\" is null. Null is returned."); return null; } for (int i = 0; i < requestNode.getChildNodes().getLength(); i++) { // Request data is inside of "name" element if (requestNode.getChildNodes().item(i).getNodeType() == Node.ELEMENT_NODE && "name".equals(requestNode.getChildNodes().item(i).getLocalName())) { - logger.debug("Found \"name\" element."); + LOGGER.debug("Found \"name\" element."); // "name" element was found - return the text content return requestNode.getChildNodes().item(i).getTextContent(); } } - logger.warn("No \"name\" element found. Null is returned."); + LOGGER.warn("No \"name\" element found. Null is returned."); return null; } } - private static class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { + private static final class AttachmentsResponseSerializer extends AbstractServiceResponseSerializer { @Override protected void serializeResponse(ServiceResponse response, SOAPElement soapResponse, SOAPEnvelope envelope) throws SOAPException { @@ -231,12 +253,12 @@ protected void serializeResponse(ServiceResponse response, SOAPElement soapRespo } } - private static class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { + private static final class GetAttachmentsRequestDeserializer extends AbstractCustomRequestDeserializer> { @Override protected List deserializeRequest(Node requestNode, SOAPMessage message) throws SOAPException { if (requestNode == null) { - logger.warn("\"requestNode\" is null. Null is returned."); + LOGGER.warn("\"requestNode\" is null. Null is returned."); return null; } List sizes = new ArrayList<>(); From 8a8690f066c86cf07369c78fc8c6e6933ec1d73c Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 27 Sep 2024 09:45:14 +0300 Subject: [PATCH 53/73] chore: gradle version updated to 8.10.2 Refs: XRDDEV-2628 --- example-adapter/gradle/wrapper/gradle-wrapper.properties | 2 +- example-adapter/gradlew | 5 ++++- example-adapter/gradlew.bat | 2 ++ src/gradle/wrapper/gradle-wrapper.properties | 2 +- src/gradlew | 5 ++++- src/gradlew.bat | 2 ++ 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/example-adapter/gradle/wrapper/gradle-wrapper.properties b/example-adapter/gradle/wrapper/gradle-wrapper.properties index 0aaefbc..df97d72 100644 --- a/example-adapter/gradle/wrapper/gradle-wrapper.properties +++ b/example-adapter/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/example-adapter/gradlew b/example-adapter/gradlew index b740cf1..f5feea6 100755 --- a/example-adapter/gradlew +++ b/example-adapter/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/example-adapter/gradlew.bat b/example-adapter/gradlew.bat index 7101f8e..9b42019 100644 --- a/example-adapter/gradlew.bat +++ b/example-adapter/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/src/gradle/wrapper/gradle-wrapper.properties b/src/gradle/wrapper/gradle-wrapper.properties index 0aaefbc..df97d72 100644 --- a/src/gradle/wrapper/gradle-wrapper.properties +++ b/src/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/gradlew b/src/gradlew index b740cf1..f5feea6 100755 --- a/src/gradlew +++ b/src/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/src/gradlew.bat b/src/gradlew.bat index 7101f8e..9b42019 100644 --- a/src/gradlew.bat +++ b/src/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## From b415fbde07419125a471f0df63a2a57b997527c4 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 27 Sep 2024 16:55:54 +0300 Subject: [PATCH 54/73] chore: javadocs generation fixed Refs: XRDDEV-2628 --- .gitignore | 1 + src/build.gradle.kts | 19 +++++++++++++++++++ src/buildSrc/build.gradle.kts | 1 + .../kotlin/xrd4j.java-conventions.gradle.kts | 4 +--- src/generate-javadocs.sh | 3 +-- src/gradle/libs.versions.toml | 1 + .../xrd4j/rest/client/AbstractClient.java | 4 ++-- 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 8c64f3c..eae7aea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.class .gradle/ build/ +javadoc/ # Mobile Tools for Java (J2ME) .mtj.tmp/ diff --git a/src/build.gradle.kts b/src/build.gradle.kts index 16433bb..71d0036 100644 --- a/src/build.gradle.kts +++ b/src/build.gradle.kts @@ -1,7 +1,26 @@ plugins { id("org.owasp.dependencycheck") + id("io.freefair.aggregate-javadoc") } +repositories { + mavenCentral() +} + +dependencies { + javadoc(project(":client")) + javadoc(project(":common")) + javadoc(project(":server")) + javadoc(project(":rest")) + + javadocClasspath(libs.jakarta.servlet.servletApi) +} + +tasks.withType() { + outputs.dirs(file("$projectDir/../javadoc")) + options.encoding = "UTF-8" + options.destinationDirectory = file("$projectDir/../javadoc") +} dependencyCheck { suppressionFile = "config/dependency-check-suppressions.xml" diff --git a/src/buildSrc/build.gradle.kts b/src/buildSrc/build.gradle.kts index e53cd19..688de98 100644 --- a/src/buildSrc/build.gradle.kts +++ b/src/buildSrc/build.gradle.kts @@ -10,4 +10,5 @@ repositories { dependencies { implementation(libs.licenseGradlePlugin) implementation(libs.dependencyCheckGradlePlugin) + implementation(libs.javadocAggregateGradlePlugin) } diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 3ba0ccf..0461c3c 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -8,9 +8,7 @@ plugins { repositories { mavenLocal() - maven { - url = uri("https://repo.maven.apache.org/maven2/") - } + mavenCentral() } group = "org.niis.xrd4j" diff --git a/src/generate-javadocs.sh b/src/generate-javadocs.sh index 2bcbfd4..7cda86a 100755 --- a/src/generate-javadocs.sh +++ b/src/generate-javadocs.sh @@ -3,5 +3,4 @@ set -x rm -rf ../javadoc -mkdir -p ../javadoc -javadoc -d ../javadoc -sourcepath common/src/main/java:client/src/main/java:server/src/main/java:rest/src/main/java -subpackages org.niis.xrd4j +./gradlew javadoc diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 95136e0..9530450 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -22,6 +22,7 @@ junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "jun licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } dependencyCheckGradlePlugin = { module = "org.owasp:dependency-check-gradle", version = "10.0.4" } +javadocAggregateGradlePlugin = { module = "io.freefair.gradle:maven-plugin", version = "8.10" } [bundles] testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-apache-logging-log4j-log4jSlf4j2Impl", "org-apache-logging-log4j-log4jCore" ] diff --git a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java index fdf1fde..5efda52 100644 --- a/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java +++ b/src/rest/src/main/java/org/niis/xrd4j/rest/client/AbstractClient.java @@ -61,8 +61,8 @@ public abstract class AbstractClient implements RESTClient { /** * Configures requestConfig so that a http proxy is used for requests - * @param hostName - * @param port + * @param hostName proxy hostname + * @param port proxy port */ public void setProxy(String hostName, int port) { HttpHost proxy = new HttpHost("http", hostName, port); From 038e2e30ca5482a9c3b807ce404abc9d31279df7 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Wed, 2 Oct 2024 17:05:07 +0300 Subject: [PATCH 55/73] build: example adapter war packaging Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index e0cd1c1..c39bee3 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -1,7 +1,9 @@ import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java +import org.springframework.boot.gradle.tasks.bundling.BootWar plugins { java + war `maven-publish` id("org.springframework.boot") version "3.3.2" id("io.mateo.cxf-codegen") version "2.4.0" @@ -30,7 +32,8 @@ dependencies { compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0") - runtimeOnly("org.apache.tomcat.embed:tomcat-embed-jasper:10.1.26") + providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:3.3.2") + providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper:10.1.26") cxfCodegen("org.apache.cxf:cxf-rt-transports-http:4.0.5") } @@ -68,6 +71,14 @@ tasks.withType() { } } +tasks.named("war") { + archiveClassifier = "" +} + +tasks.named("bootWar") { + archiveClassifier = "boot" +} + cxfCodegen { cxfVersion = "4.0.5" } From dff0acfd91411ea5d4e322902afcd36fdb3e4527 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 3 Oct 2024 14:16:25 +0300 Subject: [PATCH 56/73] build: example adapter docker packaging Refs: XRDDEV-2628 --- example-adapter/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example-adapter/Dockerfile b/example-adapter/Dockerfile index e5aae94..92c32af 100644 --- a/example-adapter/Dockerfile +++ b/example-adapter/Dockerfile @@ -1,8 +1,8 @@ -# Base java:11 -FROM eclipse-temurin:11-jre +# Base java:17 +FROM eclipse-temurin:17-jre -# Add Rest Gateway jar to container -ADD target/example-adapter-*.war example-adapter.war +# Copy Example Adapter WAR to container +COPY build/libs/example-adapter-*.*.*-boot.war example-adapter.war # Entry in json format ENTRYPOINT ["java", "-Xms64m", "-Xmx256m", "-jar", "/example-adapter.war"] From 2f370eda6cc241d85f731484f618d274f473f11c Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 3 Oct 2024 15:15:56 +0300 Subject: [PATCH 57/73] docs: documentation updates Refs: XRDDEV-2628 --- README.md | 127 +++++++++++++----- .../Setting-up-Development-Environment.md | 37 +++-- example-adapter/README.md | 86 +++++++----- .../Setting-up-Development-Environment.md | 23 ++-- 4 files changed, 187 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 0171bf6..08e4af8 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,22 @@ [![Go to X-Road Community Slack](https://img.shields.io/badge/Go%20to%20Community%20Slack-grey.svg)](https://jointxroad.slack.com/) [![Get invited](https://img.shields.io/badge/No%20Slack-Get%20invited-green.svg)](https://x-road.global/community) -X-Road Library for Java (XRd4J) provides a Java library for building X-Road Adapter servers and clients. The library implements X-Road [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) v4.0 and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. +X-Road Library for Java (XRd4J) provides a Java library for building X-Road Adapter servers and clients. The library +implements +X-Road [SOAP profile](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) +v4.0 +and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/master/doc/Protocols/pr-meta_x-road_service_metadata_protocol.md). +The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard +X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. The library is compatible with X-Road 6 and 7. ## Library Modules -* `client` : SOAP client that generates X-Road SOAP messages that can be sent to X-Road Security Server. Includes request serializer and response deserializer. -* `server` : Provides an abstract servlet that can be used as a base class for Adapter Server implementations. Includes a request deserializer and a response serializer. +* `client` : SOAP client that generates X-Road SOAP messages that can be sent to X-Road Security Server. Includes + request serializer and response deserializer. +* `server` : Provides an abstract servlet that can be used as a base class for Adapter Server implementations. Includes + a request deserializer and a response serializer. * `common` : General purpose utilities for processing SOAP messages and X-Road message data models. * `rest` : HTTP clients that can be used for sending requests to web services from Adapter Server. @@ -18,11 +26,23 @@ The library is compatible with X-Road 6 and 7. ### Release Repository -All XRd4J release versions are available through the NIIS Maven Repository [https://artifactory.niis.org/xroad-maven-releases](https://artifactory.niis.org/xroad-maven-releases). +All XRd4J release versions are available through the NIIS Maven +Repository [https://artifactory.niis.org/xroad-maven-releases](https://artifactory.niis.org/xroad-maven-releases). -Add the NIIS Maven Repository in your POM-file inside the `` tag: +Add the NIIS Maven Repository to your Gradle build file: + +``` +repositories { + maven { + url = uri("https://artifactory.niis.org/xroad-maven-releases") + } +} +``` + +For Maven POM-file, add the following inside the `` tag: ```XML + niis-repo NIIS's Maven repository @@ -30,22 +50,24 @@ Add the NIIS Maven Repository in your POM-file inside the `` tag: ``` -If running `mvn clean install` generates the error +#### Dependency Declaration -``` -Failed to collect dependencies at org.niis.xrd4j:common:jar:0.2.0: Failed to read artifact descriptor for org.niis.xrd4j:common:jar:0.2.0: Could not transfer artifact org.niis.xrd4j:common:pom:0.2.0 from/to NIIS-repo (https://artifactory.niis.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] -``` -you can either skip the certificate validation with command +Declare the following dependencies in your Gradle build file ``` -mvn install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true +dependencies { + // Module: common + implementation("org.niis.xrd4j:common:${xrd4j.version}") + // Module: client + implementation("org.niis.xrd4j:client:${xrd4j.version}") + // Module: server + implementation("org.niis.xrd4j:server:${xrd4j.version}") + // Module: rest + implementation("org.niis.xrd4j:rest:${xrd4j.version}") +} ``` -or import the NIIS Maven repository certificate as a trusted certificate into `cacerts` keystore. See full [instructions](documentation/Import-a-Certificate-as-a-Trusted-Certificate.md) for more information. - -#### Dependency Declaration - -Declare the following dependencies in your POM-file: +or in Maven POM-file: ```XML @@ -79,52 +101,87 @@ Declare the following dependencies in your POM-file: #### Snapshot Repository -Snapshot versions of XRd4J are available through the NIIS Maven Snapshot repository in [https://artifactory.niis.org/xroad-maven-snapshots](https://artifactory.niis.org/xroad-maven-snapshots). +Snapshot versions of XRd4J are available through the NIIS Maven Snapshot repository +in [https://artifactory.niis.org/xroad-maven-snapshots](https://artifactory.niis.org/xroad-maven-snapshots). + +Include the snapshot repository in your Gradle build file + +``` +repositories { + maven { + url = uri("https://artifactory.niis.org/xroad-maven-snapshots") + } +} +``` -Include the snapshot repository in your POM-file inside the `` tag: +or in Maven POM-file inside the `` tag: ```XML + niis-snapshot-repo NIIS's snapshot Maven repository https://artifactory.niis.org/xroad-maven-snapshots ``` -After this, `x.x.x-SNAPSHOT` versions are available to be declared as dependencies as with release versions above. XRd4J snapshots are meant for development use only. Use release versions for final adapter implementations. + +After this, `x.x.x-SNAPSHOT` versions are available to be declared as dependencies as with release versions above. XRd4J +snapshots are meant for development use only. Use release versions for final adapter implementations. ## Development ### XRd4J Development -Instructions for setting up an environment for XRd4J-related development can be found [here](documentation/Setting-up-Development-Environment.md). +Instructions for setting up an environment for XRd4J-related development can be +found [here](documentation/Setting-up-Development-Environment.md). -Javadocs can be generated with the included script `generate-javadocs.sh`. The script will create `javadoc` folder with HTML documentation. +Javadocs can be generated with the included script `generate-javadocs.sh`. The script will create `javadoc` folder with +HTML documentation. The most essential classes of the library are: -* `org.niis.xrd4j.common.member.ConsumerMember` : represents an X-Road consumer member that acts as a client that initiates a service call by sending a ServiceRequest. +* `org.niis.xrd4j.common.member.ConsumerMember` : represents an X-Road consumer member that acts as a client that + initiates a service call by sending a ServiceRequest. * `org.niis.xrd4j.common.member.ProducerMember` : represents an X-Road producer member that produces services to X-Road. -* `org.niis.xrd4j.common.message.ServiceRequest` : represents an X-Road service request that is sent by a ConsumerMember and received by a ProviderMember. Contains the sent SOAP request. -* `org.niis.xrd4j.common.message.ServiceResponse` : represents an X-Road service response message that is sent by a ProviderMember and received by a ConsumerMember. Contains the SOAP response. -* `org.niis.xrd4j.client.serializer.AbstractServiceRequestSerializer` : an abstract base class for service request serializers. -* `org.niis.xrd4j.server.deserializer.AbstractCustomRequestDeserializer` : an abstract base class for service request deserializers. -* `org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer` : an abstract base class for service response serializers. -* `org.niis.xrd4j.client.deserializer.AbstractResponseDeserializer` : an abstract base class for service response deserializers. -* `org.niis.xrd4j.client.SOAPClientImpl` : a SOAP client that offers two methods for sending SOAPMessage and ServiceRequest objects. -* `org.niis.xrd4j.server.AbstractAdapterServlet` : an abstract base class for Servlets that implement SOAP message processing. Can be used as a base class for Adapter Server implementations. +* `org.niis.xrd4j.common.message.ServiceRequest` : represents an X-Road service request that is sent by a + ConsumerMember and received by a ProviderMember. Contains the sent SOAP request. +* `org.niis.xrd4j.common.message.ServiceResponse` : represents an X-Road service response message that is sent by + a ProviderMember and received by a ConsumerMember. Contains the SOAP response. +* `org.niis.xrd4j.client.serializer.AbstractServiceRequestSerializer` : an abstract base class for service request + serializers. +* `org.niis.xrd4j.server.deserializer.AbstractCustomRequestDeserializer` : an abstract base class for service request + deserializers. +* `org.niis.xrd4j.server.serializer.AbstractServiceResponseSerializer` : an abstract base class for service response + serializers. +* `org.niis.xrd4j.client.deserializer.AbstractResponseDeserializer` : an abstract base class for service response + deserializers. +* `org.niis.xrd4j.client.SOAPClientImpl` : a SOAP client that offers two methods for sending SOAPMessage and + ServiceRequest objects. +* `org.niis.xrd4j.server.AbstractAdapterServlet` : an abstract base class for Servlets that implement SOAP message + processing. Can be used as a base class for Adapter Server implementations. ### Adapter Development Using XRd4J -For implementation details and tips for creating an X-Road service adapter using XRd4J see [adapter implementation overview](documentation/adapter-implementation.md). +For implementation details and tips for creating an X-Road service adapter using XRd4J +see [adapter implementation overview](documentation/adapter-implementation.md). -Testing HTTPS connectivity may require setting up SSL on Tomcat. Basic instructions for this can be found [here](documentation/Setting-up-SSL-on-Tomcat.md). +Testing HTTPS connectivity may require setting up SSL on Tomcat. Basic instructions for this can be +found [here](documentation/Setting-up-SSL-on-Tomcat.md). ### Compatibility Mode With Older X-Road Versions -To enable processing of SOAP Body elements in compatibility mode with older versions of X-Road protocol, method `request.setProcessingWrappers(true)` must be called before serialization or deserialization of messages. This means that request messages must contain `request` wrapper and response messages must contain `request` and `response` wrappers. To skip automatic procession of `request` and `response` wrappers, method `request.setProcessingWrappers(false)` must be called before serialization or deserialization of messages, which is the default. The usage of `setProcessingWrappers` method is demonstrated in the [the adapter implementation examples](documentation/adapter-implementation.md). +To enable processing of SOAP Body elements in compatibility mode with older versions of X-Road protocol, method +`request.setProcessingWrappers(true)` must be called before serialization or deserialization of messages. This means +that request messages must contain `request` wrapper and response messages must contain `request` and `response` +wrappers. To skip automatic procession of `request` and `response` wrappers, method +`request.setProcessingWrappers(false)` must be called before serialization or deserialization of messages, which is the +default. The usage of `setProcessingWrappers` method is demonstrated in +the [the adapter implementation examples](documentation/adapter-implementation.md). ## Credits * XRd4J library was originally developed by Petteri Kivimäki (https://github.com/petkivim) during 2014-2017. -* XRd4J library was maintained and further developed by the Finnish Population Register Centre (VRK) during 06/2017-05/2018. -* In June 2018 it was agreed that Nordic Institute for Interoperability Solutions (NIIS) takes maintenance responsibility. +* XRd4J library was maintained and further developed by the Finnish Population Register Centre (VRK) during + 06/2017-05/2018. +* In June 2018 it was agreed that Nordic Institute for Interoperability Solutions (NIIS) takes maintenance + responsibility. diff --git a/documentation/Setting-up-Development-Environment.md b/documentation/Setting-up-Development-Environment.md index d8ae866..1bf1872 100644 --- a/documentation/Setting-up-Development-Environment.md +++ b/documentation/Setting-up-Development-Environment.md @@ -4,34 +4,49 @@ This document describes the requirements and steps to set up an environment for ### Software Requirements -* Linux or Windows -* Java 8 +* Linux / Windows / MacOS +* Java 11 * Tomcat 6 or 7 or 8 * Maven 3.x ### Getting the code -There are several ways to get the code, e.g. download it as a [zip](https://github.com/nordic-institute/xrd4j/archive/master.zip) file or clone the git repository. +There are several ways to get the code, e.g. download it as +a [zip](https://github.com/nordic-institute/xrd4j/archive/master.zip) file or clone the git repository. ``` git clone https://github.com/nordic-institute/xrd4j.git ``` -The code is located in the `src` folder and the application is made up of four modules `client`, `common`, `server` and `rest`. +The code is located in the `src` folder and the application is made up of four modules `client`, `common`, `server` and +`rest`. ### Building the code -XRd4J uses maven as the build management tool. In order to build the whole project and generate the four war files (client-x.x.x-SNAPSHOT.jar, common-x.x.x-SNAPSHOT.jar, server-x.x.x-SNAPSHOT.jar, rest-x.x.x-SNAPSHOT.jar), you must run the maven command below from the `src` directory. +XRd4J uses gradle as the build management tool. In order to build the whole project and generate the four jar files ( +client-x.x.x-SNAPSHOT.jar, common-x.x.x-SNAPSHOT.jar, server-x.x.x-SNAPSHOT.jar, rest-x.x.x-SNAPSHOT.jar), you must run +the maven command below from the `src` directory. ``` -mvn clean install +./gradlew build ``` -Running the above maven command generates the jar files under the directories presented below: +Running the above gradle command generates the jar files under the directories presented below: ``` -src/client/target/client-x.x.x-SNAPSHOT.jar -src/common/target/common-x.x.x-SNAPSHOT.jar -src/server/target/server-x.x.x-SNAPSHOT.jar -src/rest/target/rest-x.x.x-SNAPSHOT.jar +src/client/build/libs/client-x.x.x-SNAPSHOT.jar +src/common/build/libs/common-x.x.x-SNAPSHOT.jar +src/server/build/libs/server-x.x.x-SNAPSHOT.jar +src/rest/build/libs/rest-x.x.x-SNAPSHOT.jar ``` + +### Using local builds in your project + +If you want to use the local builds in your project, publish the jar files to your local maven repository by running the +following command: + +``` +./gradlew publishToMavenLocal +``` + +and then use maven local repository in your project build file. diff --git a/example-adapter/README.md b/example-adapter/README.md index dd2eea3..6eac9bb 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -1,28 +1,32 @@ # X-Road Example Adapter -X-Road Example Adapter provides an example implementation of a web service that is compatible with the X-Road 6 and X-Road 7. The -Example Adapter support the X-Road Message Protocol for SOAP version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). +X-Road Example Adapter provides an example implementation of a web service that is compatible with X-Road 7. The +Example Adapter support the X-Road Message Protocol for SOAP +version [4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md). -The implementation is based on the [XRd4J](https://github.com/nordic-institute/xrd4j) library. The Example Adapter contains -a single class that implements four services: +The implementation is based on the [XRd4J](https://github.com/nordic-institute/xrd4j) library. The Example Adapter +contains +a single class that implements the following services: * `getRandom` : returns a random number between 1-100 * `helloService` : returns a hello message with the given name * `listPeople` : returns a list of mock people * `personDetails` : returns a mock person based on the given `SSN` * `storeAttachments` : accepts the request with attachments and returns name and size of each attachment -* `getAttachments` : returns the response with attachments. The number of attachments and their size are given in request. +* `getAttachments` : returns the response with attachments. The number of attachments and their size are given in + request. The Example Adapter is meant to illustrate the basic level usage of the XRd4J library in processing X-Road messages. ## Try It Out -The fastest and easiest way to try out the application is by using the Spring Boot Maven plugin. -To do this, you need to have a working installation of [Maven](https://maven.apache.org/). +The fastest and easiest way to try out the application is by using the Spring Boot Gradle plugin. The only requirement +is to have Java 17 or later installed on your machine. +```bash +./gradlew bootRun ``` -mvn spring-boot:run -``` + After that the application is accessible at: ``` @@ -37,44 +41,58 @@ http://localhost:8080/example-adapter/Endpoint?wsdl ## Software Requirements -* Java 8 or Java 11 -* Maven 3.x +* Java 17 or later * Docker (*optional*) ## Development Environment Setting up an environment for example-related development is explained [here](Setting-up-Development-Environment.md). +## Building + +X-Road Example Adapter can be built using the provided Gradle wrapper. The following command will build the project. + +```bash +./gradlew clean build +``` + +When successfully built, the following artifacts are produced in the `build/libs` directory: + +* `example-adapter-x.x.x.war` : a deployable WAR file +* `example-adapter-x.x.x-boot.war` : a Spring Boot executable WAR file + ## Installation X-Road Example Adapter can be installed and run in the following ways: * Deploying `example-adapter-x.x.x.war` into a web container such as Tomcat. -* Using Docker to run X-Road Example Adapter. +* Run the Spring Boot executable WAR file `example-adapter-x.x.x-boot.war` with java -jar command. This can also be done + using Docker. ### Web container Build X-Road Example Adapter and deploy it to a Java application server, e.g., Tomcat. -* Build the project and produce ```example-adapter-x.x.x.war``` file. -* Copy the file ```tomcat.home/webapps``` folder. +* Build the project and produce `example-adapter-x.x.x.war` file. +* Copy the file `tomcat.home/webapps` folder. * Start/restart Tomcat. -* -### Docker -You can create a Docker image to run X-Road Example Adapter inside a container, using the provided Dockerfile. -Before building the image, you must build the war file. +### Spring Boot Executable WAR File + +Spring Boot executable WAR file `example-adapter-x.x.x-boot.war` can be run with `java -jar` command: ```bash -mvn clean verify -``` -If you have not built the war, building the Docker image will fail with message -```bash -Step 2 : ADD src/target/example-adapter-*.war example-adapter.war -No source files were specified +java -jar example-adapter-x.x.x-boot.war ``` -While you are in the project root directory, build the image using the `docker build` command. The `-t` parameter gives your image a tag, so you can run it more easily later. Don’t forget the `.` command, which tells the `docker build` command to look in the current directory for a file called Dockerfile. +#### Docker + +You can create a Docker image to run X-Road Example Adapter inside a container, using the provided Dockerfile. +Before building the Docker image, `example-adapter-x.x.x-boot.war` file has to be [built with Gradle](#building). + +While you are in the project root directory, build the image using the `docker build` command. The `-t` parameter gives +your image a tag, so you can run it more easily later. Don’t forget the `.` command, which tells the `docker build` +command to look in the current directory for a file called Dockerfile. ```bash docker build -t example-adapter . @@ -104,7 +122,8 @@ http://localhost:8080/example-adapter/Endpoint?wsdl ## Usage -This section provides examples for calling the service after it is deployed and running. The example commands require `curl` to be installed. +This section provides examples for calling the service after it is deployed and running. The example commands require +`curl` to be installed. ### getRandom @@ -128,7 +147,8 @@ At the project root, the following command will call `helloService`: curl -d @examples/helloServiceRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/helloServiceResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/helloServiceResponse.xml) (available in the `examples` +directory). ### listPeople @@ -140,7 +160,8 @@ At the project root, the following command will call `listPeople`: curl -d @examples/listPeopleRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/listPeopleResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/listPeopleResponse.xml) (available in the `examples` +directory). ### personDetails @@ -152,7 +173,8 @@ At the project root, the following command will call `personDetails`: curl -d @examples/personDetailsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/personDetailsResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/personDetailsResponse.xml) (available in the `examples` +directory). ### storeAttachments @@ -164,7 +186,8 @@ At the project root, the following command will call `storeAttachments`: curl -X POST -H "Content-Type: multipart/related; start=\"\"; boundary=MIME_boundary" --data-binary @examples/storeAttachmentsRequest.txt -X POST http://localhost:8080/example-adapter/Endpoint ``` -An example of the corresponding [SOAP response](examples/storeAttachmentsResponse.xml) (available in the `examples` directory). +An example of the corresponding [SOAP response](examples/storeAttachmentsResponse.xml) (available in the `examples` +directory). ### getAttachments @@ -176,4 +199,5 @@ At the project root, the following command will call `getAttachments`: curl -d @examples/getAttachmentsRequest.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/example-adapter/Endpoint ``` -The response is multipart MIME message containing SOAP response and attachments. An example of the corresponding [response](examples/getAttachmentsResponse.txt) (available in the `examples` directory). +The response is multipart MIME message containing SOAP response and attachments. An example of the +corresponding [response](examples/getAttachmentsResponse.txt) (available in the `examples` directory). diff --git a/example-adapter/Setting-up-Development-Environment.md b/example-adapter/Setting-up-Development-Environment.md index 8621027..aa62ebe 100644 --- a/example-adapter/Setting-up-Development-Environment.md +++ b/example-adapter/Setting-up-Development-Environment.md @@ -3,8 +3,8 @@ This document describes how a developer's workstation can be setup. ### Software Requirements * Linux / Windows / MacOS -* Java 8 or Java 11 -* Maven 3.x +* Java 17 or later +* Gradle * Docker (*optional*) ### Getting the code @@ -15,18 +15,23 @@ The Example Adapter project is a part of the XRd4J git repository. You can acces git clone https://github.com/nordic-institute/xrd4j.git ``` -The Example Adapter is a separate Maven project and can be found under the `example-adapter` directory. +The Example Adapter is a separate Gradle project and can be found under the `example-adapter` directory. ### Building the code -Example Adapter uses Maven as the build management tool. In order to build the whole project and generate the WAR-file (`example-adapter-x.x.x-SNAPSHOT.war`), you must run the maven command below from the project root directory. +Example Adapter uses Gradle as the build management +tool. [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) +is the recommended way of using Gradle to ensure the correct version. + +In order to build the whole project, you must run the command below from the `example-adapter` +directory. ```bash -mvn clean verify +./gradlew build ``` -Running the above maven command generates the WAR-file under the directory presented below (`x.x.x` being replaced by the version): +Running the above command generates the following WAR-files under the `build/libs` directory (`x.x.x` being replaced by +the version): -``` -target/example-adapter-x.x.x-SNAPSHOT.war -``` +* `build/libs/example-adapter-x.x.x-SNAPSHOT.war` - a deployable WAR file +* `build/libs/example-adapter-x.x.x-SNAPSHOT-boot.war` - a Spring Boot executable WAR file From c3e6d9ecd0ce237db93a3687e4794e8d57a4da7d Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 3 Oct 2024 15:29:34 +0300 Subject: [PATCH 58/73] chore: version no bumped to 0.6.0 Refs: XRDDEV-2628 --- example-adapter/README.md | 1 + example-adapter/build.gradle.kts | 4 ++-- src/CHANGELOG.md | 8 +++++++- src/gradle.properties | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/example-adapter/README.md b/example-adapter/README.md index 6eac9bb..8d57427 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -50,6 +50,7 @@ Setting up an environment for example-related development is explained [here](Se ## Building + X-Road Example Adapter can be built using the provided Gradle wrapper. The following command will build the project. ```bash diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index c39bee3..8a17664 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -27,8 +27,8 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web:3.3.2") implementation("org.apache.cxf:cxf-spring-boot-starter-jaxws:4.0.5") - implementation("org.niis.xrd4j:common:0.5.0-SNAPSHOT") - implementation("org.niis.xrd4j:server:0.5.0-SNAPSHOT") + implementation("org.niis.xrd4j:common:0.6.0-SNAPSHOT") + implementation("org.niis.xrd4j:server:0.6.0-SNAPSHOT") compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0") diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index fe6dc89..0a17e5b 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,9 +1,15 @@ # Changelog +## 0.6.0-SNAPSHOT 2024-10-03 +- Build migrated from Maven to Gradle +- Update dependencies from javax.* to jakarta.* +- Java 17 and 21 support +- Added integration tests for the server module + ## 0.5.0-SNAPSHOT 2023-02-24 - Add JDK 11 support - Update dependencies -- + ## 0.4.0 - 2022-01-05 - XRDDEV-1874 Release version 0.4.0 diff --git a/src/gradle.properties b/src/gradle.properties index 1dd0e26..6c6ce25 100644 --- a/src/gradle.properties +++ b/src/gradle.properties @@ -1 +1 @@ -version=0.5.0-SNAPSHOT +version=0.6.0-SNAPSHOT From 3d9328e2560dce06b97d4fd7c5458c11d78d7e4a Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 3 Oct 2024 15:47:21 +0300 Subject: [PATCH 59/73] chore: documentation updates Refs: XRDDEV-2628 --- documentation/adapter-implementation.md | 12 ++++++------ example-adapter/README.md | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/documentation/adapter-implementation.md b/documentation/adapter-implementation.md index 7d98310..ab51f13 100644 --- a/documentation/adapter-implementation.md +++ b/documentation/adapter-implementation.md @@ -27,7 +27,7 @@ to and processing responses from X-Road; from and producing responses for X-Road. The X-Road-capability of applications within the context of this document refers to the capability of producing and -consuming requests and responses compatible with the [X-Road v6 Message Protocol Version 4.0](https://github.com/ria-ee/X-Road/blob/master/doc/Protocols/pr-mess_x-road_message_protocol.md) +consuming requests and responses compatible with the [X-Road: Message Protocol v4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md) utilizing the XRd4J-library. The examples and code in this document present a simple and minimal implementation that is meant to overview @@ -255,15 +255,15 @@ Server application must implement three classes: A working example of an application implementing a test service with a server adapter utilizing XRd4J can be found under directory `example-adapter` ([documentation](../example-adapter/README.md)). It implements the adapter server with four classes: * `servlet`: - * [ExampleAdapter](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L53-L152) - * Implements the servlet requirement of the server adapter. It provides handling for `helloService` and `getRandom` requests as well as the `getWsdlPath` method. + * [ExampleAdapter](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L55-L280) + * Implements the servlet requirement of the server adapter. It provides handling for example requests as well as the `getWsdlPath` method. * `request deserializer`: - * [CustomRequestDeserializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L207-L233) + * [CustomRequestDeserializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L350-L376) * Implements the required request deserializer that searches for the expected `name` element containing request data necessary for the creation of the `helloService` response. `getRandom` response can be constructed without parsing further data from the request. * `response serializer`: - * [ServiceResponseSerializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L158-L176) + * [ServiceResponseSerializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L301-L319) * Implements the required response serialization for the `getRandom` response. It creates a `data` element for the response value in the response message. - * [HelloServiceResponseSerializer](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L182-L200) + * [HelloServiceResponseSerializer](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L325-L343) * Another implementation for response serialization that is used for creating the `message` element for the `helloService` response data. With these class implementations the example adapter creates a server adapter that has two extremely simple built-in services responding to two types of service requests. diff --git a/example-adapter/README.md b/example-adapter/README.md index 8d57427..61148de 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -50,6 +50,10 @@ Setting up an environment for example-related development is explained [here](Se ## Building +> **Note:** To use locally built XRd4J library in Example Adapter, the XRd4J library has to be built and published to +> the local Maven repository. See +> the [XRd4J documentation](../documentation/Setting-up-Development-Environment.md#using-local-builds-in-your-project) +> for details. X-Road Example Adapter can be built using the provided Gradle wrapper. The following command will build the project. From 8c510e4b41dd5fa800bd6796eb19136999720f5a Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Thu, 3 Oct 2024 15:52:22 +0300 Subject: [PATCH 60/73] chore: documentation updates Refs: XRDDEV-2628 --- documentation/adapter-implementation.md | 140 ++++++++++++++---------- 1 file changed, 82 insertions(+), 58 deletions(-) diff --git a/documentation/adapter-implementation.md b/documentation/adapter-implementation.md index ab51f13..44b7006 100644 --- a/documentation/adapter-implementation.md +++ b/documentation/adapter-implementation.md @@ -1,19 +1,20 @@ # Implementing an X-Road adapter using XRd4J - ## Table of Contents -- [1 Introduction](#1-introduction) -- [2 Client](#2-client) - * [2.1 Client Requirements](#21-client-requirements) - * [2.2 Client Example](#22-client-example) - * [2.2.1 Receiving an Image From Server](#221-receiving-an-image-from-server) -- [3 Server](#3-server) - * [3.1 Server Requirements](#31-server-requirements) - * [3.2 Server Examples](#32-server-examples) - * [3.2.1 Returning an Image From Server](#321-returning-an-image-from-server) +- [Implementing an X-Road adapter using XRd4J](#implementing-an-x-road-adapter-using-xrd4j) + - [Table of Contents](#table-of-contents) + - [1 Introduction](#1-introduction) + - [2 Client](#2-client) + - [2.1 Client Requirements](#21-client-requirements) + - [2.2 Client Example](#22-client-example) + - [2.2.1 Receiving an Image from Server](#221-receiving-an-image-from-server) + - [3 Server](#3-server) + - [3.1 Server requirements](#31-server-requirements) + - [3.2 Server example](#32-server-example) + - [3.2.1 Returning an Image From Server](#321-returning-an-image-from-server) @@ -21,17 +22,20 @@ This document aims to provide basic information on using the XRd4J-library for building and an application that is capable of communicating with X-Road. The document is divided into two parts: + - [**Client**](#2-client) – describes the basic requirements for an application that is capable of producing requests -to and processing responses from X-Road; + to and processing responses from X-Road; - [**Server**](#3-server) – describes the basic requirements for an application that is capable for processing requests -from and producing responses for X-Road. + from and producing responses for X-Road. The X-Road-capability of applications within the context of this document refers to the capability of producing and -consuming requests and responses compatible with the [X-Road: Message Protocol v4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md) +consuming requests and responses compatible with +the [X-Road: Message Protocol v4.0](https://github.com/nordic-institute/X-Road/blob/develop/doc/Protocols/pr-mess_x-road_message_protocol.md) utilizing the XRd4J-library. The examples and code in this document present a simple and minimal implementation that is meant to overview -the basic structure and idea of general adapter functionality. The examples do not constitute a reference/recommended implementation for a service adapter. +the basic structure and idea of general adapter functionality. The examples do not constitute a reference/recommended +implementation for a service adapter. ## 2 Client @@ -40,18 +44,21 @@ the basic structure and idea of general adapter functionality. The examples do n A client application must implement two classes: * `request serializer` is responsible for converting the object representing the request payload to SOAP - * extends `AbstractServiceRequestSerializer` - * serializes all other parts of the SOAP message except request data content - * used through `ServiceRequestSerializer` interface - * must implement `serializeRequest` method that serializes request data content to SOAP -* `response deserializer` parses the incoming SOAP response message and constructs the objects representing the response payload - * extends `AbstractResponseDeserializer` - * deserializes all the other parts of the incoming SOAP message except request and response data content - * type of the request and response data must be given as type parameters - * used through `ServiceResponseSerializer` interface - * must implement `deserializeRequestData` and `deserializeResponseData` methods - -**N.B.** If HTTPS is used between the client and the Security Server, the public key certificate of the Security Server MUST be imported into `cacerts` keystore. [Detailed instructions here](Import-a-Certificate-as-a-Trusted-Certificate.md). + * extends `AbstractServiceRequestSerializer` + * serializes all other parts of the SOAP message except request data content + * used through `ServiceRequestSerializer` interface + * must implement `serializeRequest` method that serializes request data content to SOAP +* `response deserializer` parses the incoming SOAP response message and constructs the objects representing the response + payload + * extends `AbstractResponseDeserializer` + * deserializes all the other parts of the incoming SOAP message except request and response data content + * type of the request and response data must be given as type parameters + * used through `ServiceResponseSerializer` interface + * must implement `deserializeRequestData` and `deserializeResponseData` methods + +**N.B.** If HTTPS is used between the client and the Security Server, the public key certificate of the Security Server +MUST be imported into `cacerts` +keystore. [Detailed instructions here](Import-a-Certificate-as-a-Trusted-Certificate.md). ### 2.2 Client Example @@ -193,13 +200,17 @@ Main class (generated [request](../examples/request1.xml), received [response](. } ``` -`HelloServiceResponseDeserializer`'s `deserializeRequestData` method reads `name` elements's value ("Test message") under request content: +`HelloServiceResponseDeserializer`'s `deserializeRequestData` method reads `name` elements's value ("Test message") +under request content: + ```xml Test message ``` -and `deserializeResponseData` method reads `message` element's value ("Hello Test message! Greetings from adapter server!") under response content: + +and `deserializeResponseData` method reads `message` element's value ("Hello Test message! Greetings from adapter +server!") under response content: ```xml @@ -207,11 +218,13 @@ and `deserializeResponseData` method reads `message` element's value ("Hello Tes ``` -If compatibility mode for request and response wrappers is turned on, the `helloService` and `helloServiceResponse` elements would have `request` and/or `response` wrapper elements and the data elements would be placed within them. +If compatibility mode for request and response wrappers is turned on, the `helloService` and `helloServiceResponse` +elements would have `request` and/or `response` wrapper elements and the data elements would be placed within them. #### 2.2.1 Receiving an Image from Server -The server returns images as base64 coded strings that are placed in SOAP attachments. Before being able to use the image the client must convert the base64 coded string to some other format. For example: +The server returns images as base64 coded strings that are placed in SOAP attachments. Before being able to use the +image the client must convert the base64 coded string to some other format. For example: ```java // Get the attached base64 coded image string @@ -234,47 +247,58 @@ ImageIO.write(newImg, contentType, new File("/image/path")); Server application must implement three classes: * `servlet` is responsible for processing all the incoming SOAP requests and returning a valid SOAP response - * extends `AbstractAdapterServlet` - * serializes and deserializes SOAP headers, handles error processing - * incoming requests are passed as `ServiceRequest` objects - * outgoing responses must be returned as `ServiceResponse` objects - * must implement `handleRequest` and `getWSDLPath` methods -* `request deserializer` parses the incoming SOAP request message and constructs the objects representing the request payload - * extends `AbstractCustomRequestDeserializer` - * type of the request data must be given as type parameter - * used through `CustomRequestDeserializer` interface - * must implement `deserializeRequest` method that deserializes the request data content + * extends `AbstractAdapterServlet` + * serializes and deserializes SOAP headers, handles error processing + * incoming requests are passed as `ServiceRequest` objects + * outgoing responses must be returned as `ServiceResponse` objects + * must implement `handleRequest` and `getWSDLPath` methods +* `request deserializer` parses the incoming SOAP request message and constructs the objects representing the request + payload + * extends `AbstractCustomRequestDeserializer` + * type of the request data must be given as type parameter + * used through `CustomRequestDeserializer` interface + * must implement `deserializeRequest` method that deserializes the request data content * `response serializer` - * extends `AbstractServiceResponseSerializer` - * is responsible for converting the object representing the response payload to SOAP - * used through `ServiceResponseSerializer` interface - * must implement `serializeResponse` method that serializes the response data content to SOAP + * extends `AbstractServiceResponseSerializer` + * is responsible for converting the object representing the response payload to SOAP + * used through `ServiceResponseSerializer` interface + * must implement `serializeResponse` method that serializes the response data content to SOAP ### 3.2 Server example -A working example of an application implementing a test service with a server adapter utilizing XRd4J can be found under directory `example-adapter` ([documentation](../example-adapter/README.md)). It implements the adapter server with four classes: - +A working example of an application implementing a test service with a server adapter utilizing XRd4J can be found under +directory `example-adapter` ([documentation](../example-adapter/README.md)). It implements the adapter server with four +classes: + * `servlet`: - * [ExampleAdapter](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L55-L280) - * Implements the servlet requirement of the server adapter. It provides handling for example requests as well as the `getWsdlPath` method. -* `request deserializer`: - * [CustomRequestDeserializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L350-L376) - * Implements the required request deserializer that searches for the expected `name` element containing request data necessary for the creation of the `helloService` response. `getRandom` response can be constructed without parsing further data from the request. + * [ExampleAdapter](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L55-L280) + * Implements the servlet requirement of the server adapter. It provides handling for example requests as well as + the `getWsdlPath` method. +* `request deserializer`: + * [CustomRequestDeserializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L350-L376) + * Implements the required request deserializer that searches for the expected `name` element containing request + data necessary for the creation of the `helloService` response. `getRandom` response can be constructed + without parsing further data from the request. * `response serializer`: - * [ServiceResponseSerializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L301-L319) - * Implements the required response serialization for the `getRandom` response. It creates a `data` element for the response value in the response message. - * [HelloServiceResponseSerializer](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L325-L343) - * Another implementation for response serialization that is used for creating the `message` element for the `helloService` response data. - -With these class implementations the example adapter creates a server adapter that has two extremely simple built-in services responding to two types of service requests. + * [ServiceResponseSerializerImpl](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L301-L319) + * Implements the required response serialization for the `getRandom` response. It creates a `data` element for + the response value in the response message. + * [HelloServiceResponseSerializer](../example-adapter/src/main/java/org/niis/xrd4j/exampleadapter/ExampleAdapter.java#L325-L343) + * Another implementation for response serialization that is used for creating the `message` element for the + `helloService` response data. + +With these class implementations the example adapter creates a server adapter that has two extremely simple built-in +services responding to two types of service requests. With default settings, the request and response messages would look something like these examples: + * received [request](../examples/request1.xml), * generated [response](../examples/response1.xml). #### 3.2.1 Returning an Image From Server -If the server needs to return images, this can be done converting images to base64 coded strings and returning them as SOAP attachments. For example: +If the server needs to return images, this can be done converting images to base64 coded strings and returning them as +SOAP attachments. For example: ```java // "img" can be BufferedImage or InputStream From d59cfdf5de94c09b2f52bde02fafa144d457056d Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Mon, 7 Oct 2024 12:05:14 +0300 Subject: [PATCH 61/73] build: unignore gradle-wrapper.jar Refs: XRDDEV-2628 --- .gitignore | 5 ----- .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43583 bytes src/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43583 bytes 3 files changed, 5 deletions(-) create mode 100644 example-adapter/gradle/wrapper/gradle-wrapper.jar create mode 100644 src/gradle/wrapper/gradle-wrapper.jar diff --git a/.gitignore b/.gitignore index eae7aea..b3147dd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,6 @@ javadoc/ .mtj.tmp/ example-adapter/.mtj.tmp -# Package Files # -*.jar -*.war -*.ear - # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* diff --git a/example-adapter/gradle/wrapper/gradle-wrapper.jar b/example-adapter/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4b76b9530d66f5e68d973ea569d8e19de379189 GIT binary patch literal 43583 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0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-06)!#Mq<6GhP z-Q?qmgo${aFBApb5p}$1OJKTClfi8%PpnczyVKkoHw7Ml9e7ikrF0d~UB}i3vizos zXW4DN$SiEV9{faLt5bHy2a>33K%7Td-n5C*N;f&ZqAg#2hIqEb(y<&f4u5BWJ>2^4 z414GosL=Aom#m&=x_v<0-fp1r%oVJ{T-(xnomNJ(Dryv zh?vj+%=II_nV+@NR+(!fZZVM&(W6{6%9cm+o+Z6}KqzLw{(>E86uA1`_K$HqINlb1 zKelh3-jr2I9V?ych`{hta9wQ2c9=MM`2cC{m6^MhlL2{DLv7C^j z$xXBCnDl_;l|bPGMX@*tV)B!c|4oZyftUlP*?$YU9C_eAsuVHJ58?)zpbr30P*C`T z7y#ao`uE-SOG(Pi+`$=e^mle~)pRrdwL5)N;o{gpW21of(QE#U6w%*C~`v-z0QqBML!!5EeYA5IQB0 z^l01c;L6E(iytN!LhL}wfwP7W9PNAkb+)Cst?qg#$n;z41O4&v+8-zPs+XNb-q zIeeBCh#ivnFLUCwfS;p{LC0O7tm+Sf9Jn)~b%uwP{%69;QC)Ok0t%*a5M+=;y8j=v z#!*pp$9@!x;UMIs4~hP#pnfVc!%-D<+wsG@R2+J&%73lK|2G!EQC)O05TCV=&3g)C!lT=czLpZ@Sa%TYuoE?v8T8`V;e$#Zf2_Nj6nvBgh1)2 GZ~q4|mN%#X literal 0 HcmV?d00001 diff --git a/src/gradle/wrapper/gradle-wrapper.jar b/src/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4b76b9530d66f5e68d973ea569d8e19de379189 GIT binary patch literal 43583 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDa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_`;WXL6x`0 zDoQ?=?I@Hbr;*VVll1Gmd8*%tiXggMK81a+T(5Gx6;eNb8=uYn z5BG-0g>pP21NPn>$ntBh>`*})Fl|38oC^9Qz>~MAazH%3Q~Qb!ALMf$srexgPZ2@&c~+hxRi1;}+)-06)!#Mq<6GhP z-Q?qmgo${aFBApb5p}$1OJKTClfi8%PpnczyVKkoHw7Ml9e7ikrF0d~UB}i3vizos zXW4DN$SiEV9{faLt5bHy2a>33K%7Td-n5C*N;f&ZqAg#2hIqEb(y<&f4u5BWJ>2^4 z414GosL=Aom#m&=x_v<0-fp1r%oVJ{T-(xnomNJ(Dryv zh?vj+%=II_nV+@NR+(!fZZVM&(W6{6%9cm+o+Z6}KqzLw{(>E86uA1`_K$HqINlb1 zKelh3-jr2I9V?ych`{hta9wQ2c9=MM`2cC{m6^MhlL2{DLv7C^j z$xXBCnDl_;l|bPGMX@*tV)B!c|4oZyftUlP*?$YU9C_eAsuVHJ58?)zpbr30P*C`T z7y#ao`uE-SOG(Pi+`$=e^mle~)pRrdwL5)N;o{gpW21of(QE#U6w%*C~`v-z0QqBML!!5EeYA5IQB0 z^l01c;L6E(iytN!LhL}wfwP7W9PNAkb+)Cst?qg#$n;z41O4&v+8-zPs+XNb-q zIeeBCh#ivnFLUCwfS;p{LC0O7tm+Sf9Jn)~b%uwP{%69;QC)Ok0t%*a5M+=;y8j=v z#!*pp$9@!x;UMIs4~hP#pnfVc!%-D<+wsG@R2+J&%73lK|2G!EQC)O05TCV=&3g)C!lT=czLpZ@Sa%TYuoE?v8T8`V;e$#Zf2_Nj6nvBgh1)2 GZ~q4|mN%#X literal 0 HcmV?d00001 From e8eee44513e538924a9364d1b57a3db70dc2ac45 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 12:49:27 +0300 Subject: [PATCH 62/73] chore: code review fixes Refs: XRDDEV-2628 --- .../Setting-up-Development-Environment.md | 2 +- src/client/build.gradle.kts | 2 +- src/common/build.gradle.kts | 2 +- .../niis/xrd4j/common/util/SOAPHelper.java | 27 ++++++++++--------- src/config/dependency-check-suppressions.xml | 21 ++++----------- ...stServlet.java => ExampleServletImpl.java} | 4 +-- .../org/niis/xrd4j/inttest/ServletTest.java | 13 ++++----- 7 files changed, 32 insertions(+), 39 deletions(-) rename src/server/src/integrationTest/java/org/niis/xrd4j/inttest/{TestServlet.java => ExampleServletImpl.java} (99%) diff --git a/documentation/Setting-up-Development-Environment.md b/documentation/Setting-up-Development-Environment.md index 1bf1872..6acf345 100644 --- a/documentation/Setting-up-Development-Environment.md +++ b/documentation/Setting-up-Development-Environment.md @@ -25,7 +25,7 @@ The code is located in the `src` folder and the application is made up of four m XRd4J uses gradle as the build management tool. In order to build the whole project and generate the four jar files ( client-x.x.x-SNAPSHOT.jar, common-x.x.x-SNAPSHOT.jar, server-x.x.x-SNAPSHOT.jar, rest-x.x.x-SNAPSHOT.jar), you must run -the maven command below from the `src` directory. +the gradle command below from the `src` directory. ``` ./gradlew build diff --git a/src/client/build.gradle.kts b/src/client/build.gradle.kts index 4275da9..a26fd7e 100644 --- a/src/client/build.gradle.kts +++ b/src/client/build.gradle.kts @@ -12,6 +12,6 @@ dependencies { pomSettings { name = "XRd4J :: Client" - description = "This module provides a SOAP client that generates X-Road v6 SOAP messages that can be sent to X-Road Security Server." + description = "This module provides a SOAP client that generates X-Road v7 SOAP messages that can be sent to X-Road Security Server." } diff --git a/src/common/build.gradle.kts b/src/common/build.gradle.kts index 78a860f..c5cb0e1 100644 --- a/src/common/build.gradle.kts +++ b/src/common/build.gradle.kts @@ -11,5 +11,5 @@ dependencies { pomSettings { name = "XRd4J :: Common" - description = "This module provides general purpose utilities for processing SOAP messages and it also contains X-Road v6 message data models." + description = "This module provides general purpose utilities for processing SOAP messages and it also contains X-Road v7 message data models." } diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index e406a1a..fd9ce8e 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -58,6 +58,9 @@ import java.util.Map; import java.util.Scanner; +import static org.w3c.dom.Node.ELEMENT_NODE; +import static org.w3c.dom.Node.TEXT_NODE; + /** * This class offers some helper methods for handling SOAPMessage objects. * @@ -94,7 +97,7 @@ private SOAPHelper() { */ public static Node getNode(Node node, String nodeName) { for (int i = 0; i < node.getChildNodes().getLength(); i++) { - if (node.getChildNodes().item(i).getNodeType() == Node.ELEMENT_NODE + if (node.getChildNodes().item(i).getNodeType() == ELEMENT_NODE && node.getChildNodes().item(i).getLocalName().equals(nodeName)) { return (Node) node.getChildNodes().item(i); } @@ -260,7 +263,7 @@ public static Map nodesToMap(NodeList list, boolean upperCase) { */ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { + if (list.item(i).getNodeType() == ELEMENT_NODE && list.item(i).hasChildNodes()) { nodesToMap(list.item(i).getChildNodes(), upperCase, map); } else { processMapNode(list, i, upperCase, map); @@ -277,10 +280,10 @@ public static void nodesToMap(NodeList list, boolean upperCase, Map map) { - if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { + if (list.item(index).getNodeType() == ELEMENT_NODE && !list.item(index).hasChildNodes()) { String key = list.item(index).getLocalName(); map.put(upperCase ? key.toUpperCase() : key, ""); - } else if (list.item(index).getNodeType() == jakarta.xml.soap.Node.TEXT_NODE) { + } else if (list.item(index).getNodeType() == TEXT_NODE) { String key = list.item(index).getParentNode().getLocalName(); String value = list.item(index).getNodeValue(); value = value.trim(); @@ -314,7 +317,7 @@ public static Map> nodesToMultiMap(NodeList list) { */ public static void nodesToMultiMap(NodeList list, Map> map) { for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && list.item(i).hasChildNodes()) { + if (list.item(i).getNodeType() == ELEMENT_NODE && list.item(i).hasChildNodes()) { nodesToMultiMap(list.item(i).getChildNodes(), map); } else { processMultiMapNode(list, i, map); @@ -330,13 +333,13 @@ public static void nodesToMultiMap(NodeList list, Map> map) * @param map Map for the results */ private static void processMultiMapNode(NodeList list, int index, Map> map) { - if (list.item(index).getNodeType() == jakarta.xml.soap.Node.ELEMENT_NODE && !list.item(index).hasChildNodes()) { + if (list.item(index).getNodeType() == ELEMENT_NODE && !list.item(index).hasChildNodes()) { String key = list.item(index).getLocalName(); if (!map.containsKey(key)) { map.put(key, new ArrayList<>()); } map.get(key).add(""); - } else if (list.item(index).getNodeType() == jakarta.xml.soap.Node.TEXT_NODE) { + } else if (list.item(index).getNodeType() == TEXT_NODE) { String key = list.item(index).getParentNode().getLocalName(); String value = list.item(index).getNodeValue(); value = value.trim(); @@ -360,8 +363,8 @@ private static void processMultiMapNode(NodeList list, int index, Map - - - ^org\.apache\.tomcat:tomcat-annotations-api:.*$ - CVE-2016-5425 - CVE-2016-6325 - CVE-2017-6056 - - - - ^org\.niis\.xrd4j:rest:.*$ - cpe:/a:rest-client_project:rest-client - + + + + + diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java similarity index 99% rename from src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java rename to src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java index 7bcec1e..d2d08e4 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/TestServlet.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java @@ -53,9 +53,9 @@ /** * Test servlet implementation copied and modified from example-adapter. */ -class TestServlet extends AbstractAdapterServlet { +class ExampleServletImpl extends AbstractAdapterServlet { private static final long serialVersionUID = 1L; - private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(TestServlet.class); + private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(ExampleServletImpl.class); private final String namespaceSerialize = "http://test.x-road.global/consumer"; private final String namespaceDeserialize = "http://test.x-road.global/producer"; private final String prefix = "xrdtest"; diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java index 5885186..a5bde74 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java @@ -53,6 +53,7 @@ import java.util.ArrayList; import java.util.List; +import static jakarta.servlet.http.HttpServletResponse.SC_OK; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.catalina.startup.Tomcat.addServlet; import static org.assertj.core.api.Assertions.assertThat; @@ -74,7 +75,7 @@ static void startTomcat() throws LifecycleException { tomcat.setPort(0); Context context = tomcat.addContext("", new File(".").getAbsolutePath()); - addServlet(context, "TestServlet", new TestServlet()).addMapping("/"); + addServlet(context, "TestServlet", new ExampleServletImpl()).addMapping("/"); tomcat.start(); serverPort = tomcat.getConnector().getLocalPort(); @@ -181,7 +182,7 @@ void invalidServiceCode() throws IOException, InterruptedException { var response = client.send(request, HttpResponse.BodyHandlers.ofString()); - assertThat(response.statusCode()).isEqualTo(200); + assertThat(response.statusCode()).isEqualTo(SC_OK); assertSoapFaultClientError(response, "Unknown service code."); } @@ -197,7 +198,7 @@ void invalidRequestBody() throws IOException, InterruptedException { var response = client.send(request, HttpResponse.BodyHandlers.ofString()); - assertThat(response.statusCode()).isEqualTo(200); + assertThat(response.statusCode()).isEqualTo(SC_OK); assertSoapFaultClientError(response, "Invalid X-Road SOAP message. Unable to parse the request."); } @@ -213,7 +214,7 @@ void invalidContentType() throws IOException, InterruptedException { var response = client.send(request, HttpResponse.BodyHandlers.ofString()); - assertThat(response.statusCode()).isEqualTo(200); + assertThat(response.statusCode()).isEqualTo(SC_OK); assertSoapFaultClientError(response, "Invalid content type : \"invalid\"."); } @@ -229,12 +230,12 @@ void noContentType() throws IOException, InterruptedException { var response = client.send(request, HttpResponse.BodyHandlers.ofString()); - assertThat(response.statusCode()).isEqualTo(200); + assertThat(response.statusCode()).isEqualTo(SC_OK); assertSoapFaultClientError(response, "Invalid content type : \"null\"."); } private void assertResponseSuccess(HttpResponse response, String expectedContentFilename) { - assertThat(response.statusCode()).isEqualTo(200); + assertThat(response.statusCode()).isEqualTo(SC_OK); assertXmlIdentical(response.body(), expectedContentFilename); } From 4f2c281eb45553fb571019d1b6830a618511504d Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 13:05:06 +0300 Subject: [PATCH 63/73] build: use the same compiler options that are used in X-Road Refs: XRDDEV-2628 --- .../src/main/kotlin/xrd4j.java-conventions.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 0461c3c..4639fd1 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -27,6 +27,7 @@ interface PomSettings { val name: Property val description: Property } + val pomSettingsExtension = project.extensions.create("pomSettings") publishing { @@ -68,6 +69,16 @@ publishing { tasks.withType() { options.encoding = "UTF-8" + options.compilerArgs.addAll( + listOf( +// "-Xlint:unchecked", +// "-Xlint:deprecation", +// "-Xlint:rawtypes", + "-Xlint:fallthrough", + "-Xlint:finally", + "-parameters" + ) + ) } tasks.withType() { From 563c03abe02b597e40be53ac200c43131d8b3f35 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 13:39:34 +0300 Subject: [PATCH 64/73] docs: table of contents updated in various documents Refs: XRDDEV-2628 --- documentation/adapter-implementation.md | 24 +++++++++---------- example-adapter/README.md | 23 +++++++++++++++++- .../Setting-up-Development-Environment.md | 10 ++++++++ 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/documentation/adapter-implementation.md b/documentation/adapter-implementation.md index 44b7006..f7a8c1b 100644 --- a/documentation/adapter-implementation.md +++ b/documentation/adapter-implementation.md @@ -1,20 +1,18 @@ -# Implementing an X-Road adapter using XRd4J +# Implementing an X-Road adapter using XRd4J -## Table of Contents +## Table of Contents -- [Implementing an X-Road adapter using XRd4J](#implementing-an-x-road-adapter-using-xrd4j) - - [Table of Contents](#table-of-contents) - - [1 Introduction](#1-introduction) - - [2 Client](#2-client) - - [2.1 Client Requirements](#21-client-requirements) - - [2.2 Client Example](#22-client-example) - - [2.2.1 Receiving an Image from Server](#221-receiving-an-image-from-server) - - [3 Server](#3-server) - - [3.1 Server requirements](#31-server-requirements) - - [3.2 Server example](#32-server-example) - - [3.2.1 Returning an Image From Server](#321-returning-an-image-from-server) +- [1 Introduction](#1-introduction) +- [2 Client](#2-client) + - [2.1 Client Requirements](#21-client-requirements) + - [2.2 Client Example](#22-client-example) + - [2.2.1 Receiving an Image from Server](#221-receiving-an-image-from-server) +- [3 Server](#3-server) + - [3.1 Server requirements](#31-server-requirements) + - [3.2 Server example](#32-server-example) + - [3.2.1 Returning an Image From Server](#321-returning-an-image-from-server) diff --git a/example-adapter/README.md b/example-adapter/README.md index 61148de..ebbb5f6 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -1,4 +1,25 @@ -# X-Road Example Adapter +# X-Road Example Adapter + +## Table of Contents + + +- [Try It Out](#try-it-out) +- [Software Requirements](#software-requirements) +- [Development Environment](#development-environment) +- [Building](#building) +- [Installation](#installation) + - [Web container](#web-container) + - [Spring Boot Executable WAR File](#spring-boot-executable-war-file) + - [Docker](#docker) +- [Access the application](#access-the-application) +- [Usage](#usage) + - [getRandom](#getrandom) + - [helloService](#helloservice) + - [listPeople](#listpeople) + - [personDetails](#persondetails) + - [storeAttachments](#storeattachments) + - [getAttachments](#getattachments) + X-Road Example Adapter provides an example implementation of a web service that is compatible with X-Road 7. The Example Adapter support the X-Road Message Protocol for SOAP diff --git a/example-adapter/Setting-up-Development-Environment.md b/example-adapter/Setting-up-Development-Environment.md index aa62ebe..fd915d4 100644 --- a/example-adapter/Setting-up-Development-Environment.md +++ b/example-adapter/Setting-up-Development-Environment.md @@ -1,5 +1,15 @@ +# Setting Up an Environment For Example Adapter Development + This document describes how a developer's workstation can be setup. +### Table of Contents + + +- [Software Requirements](#software-requirements) +- [Getting the code](#getting-the-code) +- [Building the code](#building-the-code) + + ### Software Requirements * Linux / Windows / MacOS From 4865e1b5c43dec64bc07ac73f559ecc5025966b0 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 13:55:35 +0300 Subject: [PATCH 65/73] docs: table of contents updated in various documents Refs: XRDDEV-2628 --- README.md | 19 +++++++++++++++++-- .../Setting-up-Development-Environment.md | 11 ++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 08e4af8..ff411a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# X-Road Library for Java (XRd4J) +# X-Road Library for Java (XRd4J) [![Go to X-Road Community Slack](https://img.shields.io/badge/Go%20to%20Community%20Slack-grey.svg)](https://jointxroad.slack.com/) [![Get invited](https://img.shields.io/badge/No%20Slack-Get%20invited-green.svg)](https://x-road.global/community) @@ -11,7 +11,22 @@ and [Service Metadata Protocol](https://github.com/nordic-institute/X-Road/blob/ The library takes care of serialization and deserialization of SOAP messages offering built-in support for standard X-Road SOAP headers; only processing of application specific request and response content remains to be implemented. -The library is compatible with X-Road 6 and 7. +The library is compatible with X-Road 7. + +## Table of Contents + + +- [Library Modules](#library-modules) +- [Maven Repositories](#maven-repositories) + - [Release Repository](#release-repository) + - [Dependency Declaration](#dependency-declaration) + - [Snapshot Repository](#snapshot-repository) +- [Development](#development) + - [XRd4J Development](#xrd4j-development) + - [Adapter Development Using XRd4J](#adapter-development-using-xrd4j) + - [Compatibility Mode With Older X-Road Versions](#compatibility-mode-with-older-x-road-versions) +- [Credits](#credits) + ## Library Modules diff --git a/documentation/Setting-up-Development-Environment.md b/documentation/Setting-up-Development-Environment.md index 6acf345..b5613dc 100644 --- a/documentation/Setting-up-Development-Environment.md +++ b/documentation/Setting-up-Development-Environment.md @@ -1,7 +1,16 @@ -## Setting Up an Environment For XRd4J Development +# Setting Up an Environment For XRd4J Development This document describes the requirements and steps to set up an environment for XRd4J development. +### Table of Contents + + +- [Software Requirements](#software-requirements) +- [Getting the code](#getting-the-code) +- [Building the code](#building-the-code) +- [Using local builds in your project](#using-local-builds-in-your-project) + + ### Software Requirements * Linux / Windows / MacOS From 87515bd007cf7e7322a187f2affa860a1d945543 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 14:15:14 +0300 Subject: [PATCH 66/73] build: enable dependency check for example adapter Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 11 +++++++++++ .../dependency-check-suppressions.xml | 16 ---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index 8a17664..feeb7b5 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -5,6 +5,7 @@ plugins { java war `maven-publish` + id("org.owasp.dependencycheck") version "10.0.4" id("org.springframework.boot") version "3.3.2" id("io.mateo.cxf-codegen") version "2.4.0" id("com.github.hierynomus.license") version "0.16.1" @@ -96,3 +97,13 @@ tasks.register("wsdlSources", Wsdl2Java::class) { markGenerated = true } } + +dependencyCheck { + suppressionFile = "dependency-check-suppressions.xml" + formats = listOf("HTML", "XML") + nvd.validForHours = 24 + + if (project.hasProperty("nvdApiKey")) { + nvd.apiKey = project.property("nvdApiKey") as String + } +} diff --git a/example-adapter/dependency-check-suppressions.xml b/example-adapter/dependency-check-suppressions.xml index aaa7660..fbf9371 100644 --- a/example-adapter/dependency-check-suppressions.xml +++ b/example-adapter/dependency-check-suppressions.xml @@ -1,19 +1,3 @@ - - - ^pkg:maven/org\.yaml/snakeyaml@.*$ - - CVE-2022-1471 - - - - ^pkg:maven/org\.springframework/spring\-web@.*$ - - CVE-2016-1000027 - From 397eef239cb8cebbaccbf943809f57e94118c1a2 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 14:29:15 +0300 Subject: [PATCH 67/73] chore: example adapter dependencies checked/updated Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 6 ++++-- example-adapter/dependency-check-suppressions.xml | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index feeb7b5..bd3f3e9 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -6,7 +6,7 @@ plugins { war `maven-publish` id("org.owasp.dependencycheck") version "10.0.4" - id("org.springframework.boot") version "3.3.2" + id("org.springframework.boot") version "3.3.4" id("io.mateo.cxf-codegen") version "2.4.0" id("com.github.hierynomus.license") version "0.16.1" } @@ -25,7 +25,7 @@ repositories { } dependencies { - implementation("org.springframework.boot:spring-boot-starter-web:3.3.2") + implementation("org.springframework.boot:spring-boot-starter-web:3.3.4") implementation("org.apache.cxf:cxf-spring-boot-starter-jaxws:4.0.5") implementation("org.niis.xrd4j:common:0.6.0-SNAPSHOT") @@ -103,6 +103,8 @@ dependencyCheck { formats = listOf("HTML", "XML") nvd.validForHours = 24 + skipConfigurations = listOf("cxfCodegen") + if (project.hasProperty("nvdApiKey")) { nvd.apiKey = project.property("nvdApiKey") as String } diff --git a/example-adapter/dependency-check-suppressions.xml b/example-adapter/dependency-check-suppressions.xml index fbf9371..3ab7477 100644 --- a/example-adapter/dependency-check-suppressions.xml +++ b/example-adapter/dependency-check-suppressions.xml @@ -1,3 +1,11 @@ + + + ^pkg:maven/org\.eclipse\.angus/angus-\w+@.*$ + CVE-2021-44549 + From d6655e14ebf2bbbc08baebf0a773b88d7110b687 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 8 Oct 2024 15:53:21 +0300 Subject: [PATCH 68/73] build: integraition test dependencies moved to version catalog Refs: XRDDEV-2628 --- src/gradle/libs.versions.toml | 6 ++++++ src/server/build.gradle.kts | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 9530450..f8ac3f1 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -8,6 +8,8 @@ slf4j = "2.0.13" log4j = "2.23.1" saaj-impl = "3.0.4" junit-jupiter = "5.10.3" +xmlunit = "2.10.0" +assertj = "3.26.3" [libraries] com-sun-xml-messaging-saaj-saajImpl = { module = "com.sun.xml.messaging.saaj:saaj-impl", version.ref = "saaj-impl" } @@ -19,6 +21,10 @@ org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j- org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } org-apache-james-mime4jCore = { module = "org.apache.james:apache-mime4j-core", version = "0.8.7" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } +org-apache-tomcat-embed-core = { group = "org.apache.tomcat.embed", name = "tomcat-embed-core", version = "10.1.30" } +org-assertj-assertjCore = { module = "org.assertj:assertj-core", version.ref = "assertj" } +org-xmlunit-xmlunitAssertj3 = { module = "org.xmlunit:xmlunit-assertj3", version.ref = "xmlunit" } +org-xmlunit-xmlunitPlaceholders = { module = "org.xmlunit:xmlunit-placeholders", version.ref = "xmlunit" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } dependencyCheckGradlePlugin = { module = "org.owasp:dependency-check-gradle", version = "10.0.4" } diff --git a/src/server/build.gradle.kts b/src/server/build.gradle.kts index c6b681a..0fa3839 100644 --- a/src/server/build.gradle.kts +++ b/src/server/build.gradle.kts @@ -27,13 +27,12 @@ testing { dependencies { implementation(project()) implementation(libs.jakarta.servlet.servletApi) - implementation("org.apache.tomcat.embed:tomcat-embed-core:10.1.30") - + implementation(libs.org.apache.tomcat.embed.core) implementation(libs.org.apache.logging.log4j.log4jCore) implementation(libs.org.apache.logging.log4j.log4jSlf4j2Impl) - implementation("org.assertj:assertj-core:3.26.3") - implementation("org.xmlunit:xmlunit-assertj3:2.10.0") - implementation("org.xmlunit:xmlunit-placeholders:2.10.0") + implementation(libs.org.assertj.assertjCore) + implementation(libs.org.xmlunit.xmlunitAssertj3) + implementation(libs.org.xmlunit.xmlunitPlaceholders) implementation(libs.org.apache.james.mime4jCore) } From 818b0aa1a604682bba930c08e3d780f3c0e69c20 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 15 Oct 2024 11:15:14 +0300 Subject: [PATCH 69/73] build: gradle publish settings (#38) * build: maven repository publishing credentials Refs: XRDDEV-2628 * build: disable javadoc jars for individual modules Refs: XRDDEV-2628 --- .../src/main/kotlin/xrd4j.java-conventions.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts index 4639fd1..658339c 100644 --- a/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts +++ b/src/buildSrc/src/main/kotlin/xrd4j.java-conventions.gradle.kts @@ -15,7 +15,6 @@ group = "org.niis.xrd4j" java { toolchain.languageVersion = JavaLanguageVersion.of(11) - withJavadocJar() withSourcesJar() } @@ -63,6 +62,10 @@ publishing { val releasesRepoUrl = uri("https://artifactory.niis.org/xroad-maven-releases/") val snapshotsRepoUrl = uri("https://artifactory.niis.org/xroad-maven-snapshots/") url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + // 'publish' task expects xroadMavenRepositoryUsername xroadMavenRepositoryPassword gradle project + // properties to be present + name = "xroadMavenRepository" + credentials(PasswordCredentials::class) } } } From 9a736a75c76c45af879be56fa71a16bffd8c82e6 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Tue, 15 Oct 2024 17:04:54 +0300 Subject: [PATCH 70/73] ci: enable github actions (#39) * ci: introduce github action for building and running tests Refs: XRDDEV-2628 * build: enable sonarqube gradle plugin Refs: XRDDEV-2628 * ci: enable sonar integration for gh action Refs: XRDDEV-2628 * ci: enable jdk 17 Refs: XRDDEV-2628 * ci: fixed sonar parameters Refs: XRDDEV-2628 * ci: limit building on push to develop only Refs: XRDDEV-2628 --- .github/workflows/build.yml | 72 +++++++++++++++++++++++++++++++++++ src/build.gradle.kts | 1 + src/buildSrc/build.gradle.kts | 1 + src/gradle/libs.versions.toml | 1 + 4 files changed, 75 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..28e0e28 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +name: Build and test +on: + # Capture this event so that gradle caches are updated when a PR is merged to develop + # More information on why: https://github.com/gradle/gradle-build-action#using-the-caches-read-only + push: + branches: + - develop + paths: + - 'src/**' + - '.github/**' + pull_request: + types: [opened, synchronize, reopened] + paths: + - 'src/**' + - '.github/**' +permissions: + contents: write # Required for https://github.com/gradle/actions/tree/main/setup-gradle#github-dependency-graph-support + pull-requests: write # https://github.com/gradle/actions/tree/main/setup-gradle#adding-job-summary-as-a-pull-request-comment + actions: read # Required for https://github.com/dorny/test-reporter + checks: write # Required for https://github.com/dorny/test-reporter +# Cancels previous workflow run on PR if a new one is started (does not affect push to develop). +# This is because github.head_ref is empty on push events so defaults to the unique github.run_id. +# More info: https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + BuildAndPackageWithUnitTests: + name: Build, test and package code + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # SonarCloud: Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + with: + cache-read-only: ${{ github.ref != 'refs/heads/develop' }} + gradle-home-cache-cleanup: true + dependency-graph: generate-and-submit + add-job-summary-as-pr-comment: always + - name: Build and test source + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + working-directory: ./src + run: ./gradlew build jacocoTestReport sonar -Dsonar.projectKey=nordic-institute_xrd4j -Dsonar.organization=nordic-institute -Dsonar.host.url=https://sonarcloud.io + - name: Test report + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: Unit and integration tests + path: src/**/build/test-results/**/TEST-*.xml + reporter: java-junit + list-suites: 'failed' + list-tests: 'failed' diff --git a/src/build.gradle.kts b/src/build.gradle.kts index 71d0036..ea6f9d3 100644 --- a/src/build.gradle.kts +++ b/src/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("org.owasp.dependencycheck") id("io.freefair.aggregate-javadoc") + id("org.sonarqube") } repositories { diff --git a/src/buildSrc/build.gradle.kts b/src/buildSrc/build.gradle.kts index 688de98..20884ad 100644 --- a/src/buildSrc/build.gradle.kts +++ b/src/buildSrc/build.gradle.kts @@ -11,4 +11,5 @@ dependencies { implementation(libs.licenseGradlePlugin) implementation(libs.dependencyCheckGradlePlugin) implementation(libs.javadocAggregateGradlePlugin) + implementation(libs.sonarqubeGradlePlugin) } diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index f8ac3f1..9cc9b19 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -29,6 +29,7 @@ org-xmlunit-xmlunitPlaceholders = { module = "org.xmlunit:xmlunit-placeholders", licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } dependencyCheckGradlePlugin = { module = "org.owasp:dependency-check-gradle", version = "10.0.4" } javadocAggregateGradlePlugin = { module = "io.freefair.gradle:maven-plugin", version = "8.10" } +sonarqubeGradlePlugin = { module = "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin", version="5.1.0.4882" } [bundles] testImplementation = [ "junit-jupiter", "org-slf4j-slf4jApi", "org-apache-logging-log4j-log4jSlf4j2Impl", "org-apache-logging-log4j-log4jCore" ] From 56850ff75229a2c58ec7633022050606b6229566 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 18 Oct 2024 11:26:46 +0300 Subject: [PATCH 71/73] chore: fixed critical sonar issues (#40) * fix: fixed some sonar issues Refs: XRDDEV-2628 * test: added coverage for SOAPHelper Refs: XRDDEV-2628 * chore: fixed some sonar issues Refs: XRDDEV-2628 * chore: fixed some sonar issues Refs: XRDDEV-2628 * chore: fixed some sonar issues Refs: XRDDEV-2628 * test: added coverage Refs: XRDDEV-2628 * ci: build example-adapter Refs: XRDDEV-2628 --- .github/workflows/build.yml | 7 ++ example-adapter/README.md | 6 ++ src/build.gradle.kts | 1 + src/client/build.gradle.kts | 3 + .../org/niis/xrd4j/client/SOAPClientImpl.java | 28 ++++-- .../niis/xrd4j/client/util/ClientUtil.java | 3 +- .../org/niis/xrd4j/client/SOAPClientTest.java | 31 +++++- .../xrd4j/client/util/ClientUtilTest.java | 95 +++++++++++++++++++ src/client/src/test/resources/log4j2-test.xml | 3 + .../common/security/SymmetricEncrypter.java | 1 + .../niis/xrd4j/common/util/SOAPHelper.java | 48 ++++------ .../xrd4j/common/util/SOAPHelperTest.java | 49 ++++++++++ src/gradle/libs.versions.toml | 4 +- .../xrd4j/inttest/ExampleServletImpl.java | 6 ++ .../org/niis/xrd4j/inttest/ServletTest.java | 33 +++++++ .../integrationTest/resources/log4j2-test.xml | 3 + .../internal-server-error-request.xml | 24 +++++ .../test-data/user-error-request.xml | 24 +++++ .../xrd4j/server/AbstractAdapterServlet.java | 40 +++++++- 19 files changed, 360 insertions(+), 49 deletions(-) create mode 100644 src/client/src/test/java/org/niis/xrd4j/client/util/ClientUtilTest.java create mode 100644 src/server/src/integrationTest/resources/test-data/internal-server-error-request.xml create mode 100644 src/server/src/integrationTest/resources/test-data/user-error-request.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28e0e28..4b2f8b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # SonarCloud: Shallow clones should be disabled for a better relevancy of analysis + + # Setting up both JDK 11 and 17 + # 11 is used for compiling and running tests + # 17 is required by sonar - name: Set up JDK 11 uses: actions/setup-java@v4 with: @@ -70,3 +74,6 @@ jobs: reporter: java-junit list-suites: 'failed' list-tests: 'failed' + - name: Build example-adapter + working-directory: ./example-adapter + run: ./gradlew --include-build ../src build diff --git a/example-adapter/README.md b/example-adapter/README.md index ebbb5f6..9229c93 100644 --- a/example-adapter/README.md +++ b/example-adapter/README.md @@ -82,6 +82,12 @@ X-Road Example Adapter can be built using the provided Gradle wrapper. The follo ./gradlew clean build ``` +To build the project with locally built XRd4J library, the following command can be used: + +```bash +./gradlew --include-build ../src build +``` + When successfully built, the following artifacts are produced in the `build/libs` directory: * `example-adapter-x.x.x.war` : a deployable WAR file diff --git a/src/build.gradle.kts b/src/build.gradle.kts index ea6f9d3..1654df9 100644 --- a/src/build.gradle.kts +++ b/src/build.gradle.kts @@ -21,6 +21,7 @@ tasks.withType() { outputs.dirs(file("$projectDir/../javadoc")) options.encoding = "UTF-8" options.destinationDirectory = file("$projectDir/../javadoc") + (options as StandardJavadocDocletOptions).addBooleanOption("Xdoclint:none", true) } dependencyCheck { diff --git a/src/client/build.gradle.kts b/src/client/build.gradle.kts index a26fd7e..037e75c 100644 --- a/src/client/build.gradle.kts +++ b/src/client/build.gradle.kts @@ -7,6 +7,9 @@ dependencies { api(project(":rest")) testImplementation(libs.bundles.testImplementation) + testImplementation(libs.org.wiremock.wiremock) + testImplementation(libs.org.assertj.assertjCore) + testImplementation(libs.org.mockito.mockitoCore) } diff --git a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java index 6ca7eb3..909652c 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/SOAPClientImpl.java @@ -70,7 +70,16 @@ public class SOAPClientImpl implements SOAPClient { * @throws SOAPException if there's a SOAP error */ public SOAPClientImpl() throws SOAPException { - this.connectionFactory = SOAPConnectionFactory.newInstance(); + this(SOAPConnectionFactory.newInstance()); + } + + /** + * Constructs and initializes a new SOAPClientImpl. + * + * @param connectionFactory SOAPConnectionFactory object + */ + SOAPClientImpl(SOAPConnectionFactory connectionFactory) { + this.connectionFactory = connectionFactory; } /** @@ -93,14 +102,15 @@ public SOAPMessage send(final SOAPMessage request, final String url) throws SOAP LOGGER.error(ex.getMessage(), ex); throw new XRd4JRuntimeException(ex.getMessage()); } - SOAPConnection connection = connectionFactory.createConnection(); - LOGGER.debug(SEND_SOAP_TO, url); - LOGGER.trace("Outgoing SOAP request : \"{}\".", SOAPHelper.toString(request)); - SOAPMessage response = connection.call(request, client); - LOGGER.debug("SOAP response received."); - LOGGER.trace("Incoming SOAP response : \"{}\".", SOAPHelper.toString(response)); - connection.close(); - return response; + + try (SOAPConnection connection = connectionFactory.createConnection()) { + LOGGER.debug(SEND_SOAP_TO, url); + LOGGER.trace("Outgoing SOAP request : \"{}\".", SOAPHelper.toString(request)); + SOAPMessage response = connection.call(request, client); + LOGGER.debug("SOAP response received."); + LOGGER.trace("Incoming SOAP response : \"{}\".", SOAPHelper.toString(response)); + return response; + } } /** diff --git a/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java b/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java index 0dd63b6..b5a0400 100644 --- a/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java +++ b/src/client/src/main/java/org/niis/xrd4j/client/util/ClientUtil.java @@ -69,6 +69,7 @@ private ClientUtil() { */ public static void doTrustToCertificates() throws XRd4JException { // Create a trust manager that does not validate certificate chains + @SuppressWarnings("java:S4830") // Sonar rule: "Server certificates should be verified during SSL/TLS connections" TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @@ -91,7 +92,7 @@ public void checkClientTrusted(X509Certificate[] certs, String authType) throws try { // Install the all-trusting trust manager - SSLContext sc = SSLContext.getInstance("SSL"); + SSLContext sc = SSLContext.getInstance("TLSv1.2"); sc.init(null, trustAllCerts, new SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); HostnameVerifier hv = (String urlHostName, SSLSession session) -> { diff --git a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java index f6e2926..5fcc9e4 100644 --- a/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java +++ b/src/client/src/test/java/org/niis/xrd4j/client/SOAPClientTest.java @@ -29,16 +29,23 @@ import org.niis.xrd4j.common.member.ConsumerMember; import org.niis.xrd4j.common.member.ProducerMember; import org.niis.xrd4j.common.message.ServiceRequest; +import org.niis.xrd4j.common.util.SOAPHelper; import jakarta.xml.soap.Node; +import jakarta.xml.soap.SOAPConnection; +import jakarta.xml.soap.SOAPConnectionFactory; import jakarta.xml.soap.SOAPElement; import jakarta.xml.soap.SOAPEnvelope; import jakarta.xml.soap.SOAPException; import jakarta.xml.soap.SOAPMessage; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.fail; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; /** * Test cases for SOAPClientImpl class. Test cases cover only cases where SOAP @@ -63,7 +70,7 @@ void setUp() throws Exception { ProducerMember producer = new ProducerMember("FI", "COM", "MEMBER2", "subsystem", "getRandom", "v1"); producer.setNamespacePrefix("ns1"); producer.setNamespaceUrl("http://consumer.x-road.ee"); - this.request = new ServiceRequest(consumer, producer, "1234567890"); + this.request = new ServiceRequest<>(consumer, producer, "1234567890"); this.request.setUserId("EE1234567890"); this.request.setRequestData("1234567890"); @@ -198,6 +205,28 @@ void testException4() throws SOAPException { // OK } }*/ + + + @Test + void testSendRequest() throws SOAPException { + var connectionFactory = mock(SOAPConnectionFactory.class); + var connection = mock(SOAPConnection.class); + when(connectionFactory.createConnection()).thenReturn(connection); + var response = SOAPHelper.toSOAP( + "\n" + + " \n" + + " 1234567890\n" + + " \n" + + ""); + when(connection.call(any(), any())).thenReturn(response); + + var client = new SOAPClientImpl(connectionFactory); + var receivedResponse = client.send(request.getSoapMessage(), "http://localhost:8080"); + + Assertions.assertThat(receivedResponse).isEqualTo(response); + } + + private final class TestRequestSerializer extends AbstractServiceRequestSerializer { protected void serializeRequest(ServiceRequest serviceRequest, SOAPElement soapRequest, SOAPEnvelope envelope) throws SOAPException { diff --git a/src/client/src/test/java/org/niis/xrd4j/client/util/ClientUtilTest.java b/src/client/src/test/java/org/niis/xrd4j/client/util/ClientUtilTest.java new file mode 100644 index 0000000..75cd42d --- /dev/null +++ b/src/client/src/test/java/org/niis/xrd4j/client/util/ClientUtilTest.java @@ -0,0 +1,95 @@ +/* + * The MIT License + * Copyright © 2018 Nordic Institute for Interoperability Solutions (NIIS) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package org.niis.xrd4j.client.util; + +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; +import com.github.tomakehurst.wiremock.junit5.WireMockTest; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLSocketFactory; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.ok; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static jakarta.servlet.http.HttpServletResponse.SC_OK; +import static org.assertj.core.api.Assertions.assertThat; + +@WireMockTest(httpsEnabled = true) +class ClientUtilTest { + + private SSLSocketFactory defaultSSLSocketFactory; + private HostnameVerifier defaultHostnameVerifier; + + @BeforeEach + void setUp() { + defaultSSLSocketFactory = HttpsURLConnection.getDefaultSSLSocketFactory(); + defaultHostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier(); + } + + @AfterEach + void tearDown() { + HttpsURLConnection.setDefaultSSLSocketFactory(defaultSSLSocketFactory); + HttpsURLConnection.setDefaultHostnameVerifier(defaultHostnameVerifier); + } + + + @Test + void certificateNotTrusted(WireMockRuntimeInfo wm) throws Exception { + stubFor(get("/").willReturn(ok())); + + URL url = new URL(wm.getHttpsBaseUrl()); + var connection = (HttpURLConnection) url.openConnection(); + + Assertions.assertThatThrownBy(connection::getResponseCode) + .isInstanceOf(SSLHandshakeException.class) + .hasMessageStartingWith("PKIX path building failed"); + + } + + @Test + void doTrustToCertificates(WireMockRuntimeInfo wm) throws Exception { + stubFor(get("/").willReturn(ok())); + + ClientUtil.doTrustToCertificates(); + + var responseCode = getResponseCode(wm.getHttpsBaseUrl()); + + assertThat(responseCode).isEqualTo(SC_OK); + } + + private int getResponseCode(String url) throws IOException { + var connection = (HttpURLConnection) new URL(url).openConnection(); + return connection.getResponseCode(); + } + +} diff --git a/src/client/src/test/resources/log4j2-test.xml b/src/client/src/test/resources/log4j2-test.xml index 7fd54a6..c48b997 100644 --- a/src/client/src/test/resources/log4j2-test.xml +++ b/src/client/src/test/resources/log4j2-test.xml @@ -12,5 +12,8 @@ + + + diff --git a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java index ccdc6e8..5549609 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/security/SymmetricEncrypter.java @@ -89,6 +89,7 @@ public SymmetricEncrypter(Key key, byte[] iv, String transformation) { * @throws BadPaddingException if there's an error */ @Override + @SuppressWarnings("java:S3329") protected byte[] encrypt(byte[] plaintext) throws NoSuchAlgorithmException, InvalidKeyException, InvalidAlgorithmParameterException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { Cipher cipher = Cipher.getInstance(this.transformation); diff --git a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java index fd9ce8e..31db4d2 100644 --- a/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java +++ b/src/common/src/main/java/org/niis/xrd4j/common/util/SOAPHelper.java @@ -51,6 +51,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -58,6 +59,7 @@ import java.util.Map; import java.util.Scanner; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.w3c.dom.Node.ELEMENT_NODE; import static org.w3c.dom.Node.TEXT_NODE; @@ -67,8 +69,7 @@ * @author Petteri Kivimäki */ public final class SOAPHelper { - - private static final String CHARSET = "UTF-8"; + private static final Charset CHARSET = UTF_8; private static final Logger LOGGER = LoggerFactory.getLogger(SOAPHelper.class); private static final MessageFactory MSG_FACTORY; @@ -132,7 +133,7 @@ public static String toString(SOAPMessage message) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); message.writeTo(out); - return new String(out.toByteArray(), CHARSET); + return out.toString(CHARSET); } catch (Exception ex) { LOGGER.error(ex.getMessage(), ex); return ""; @@ -150,8 +151,10 @@ public static String toString(Node node) { try { TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); + factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); + factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer t = factory.newTransformer(); - t.setOutputProperty(OutputKeys.ENCODING, CHARSET); + t.setOutputProperty(OutputKeys.ENCODING, CHARSET.toString()); t.transform(new DOMSource(node), new StreamResult(sw)); return sw.toString(); } catch (Exception ex) { @@ -410,7 +413,7 @@ public static void removeNamespace(Node node) { * @param attachments list of attachments to be searched * @return string value of the attachment or null */ - public static String getStringAttachment(String contentId, Iterator attachments) { + public static String getStringAttachment(String contentId, Iterator attachments) { if (attachments == null) { return null; } @@ -454,10 +457,7 @@ public static boolean hasAttachments(SOAPMessage message) { if (message == null) { return false; } - if (message.countAttachments() == 0) { - return false; - } - return true; + return message.countAttachments() != 0; } /** @@ -507,35 +507,19 @@ public static SOAPElement xmlStrToSOAPElement(String xml) { public static Document xmlStrToDoc(String xml) { LOGGER.debug("Convert XML string to XML document."); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); + builderFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); + builderFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); builderFactory.setNamespaceAware(true); - InputStream stream = null; - Document doc = null; + InputStream stream; + Document doc; try { stream = new ByteArrayInputStream(xml.getBytes()); doc = builderFactory.newDocumentBuilder().parse(stream); LOGGER.debug("Converting XML string to XML document succeeded."); } catch (Exception e) { - // If exception starts with "Invalid byte", it means that ISO-8859-1 - // character set is probably used. Try to convert the string to - // UTF-8. - if (e.getLocalizedMessage().startsWith("Invalid byte")) { - LOGGER.warn("Invalid characters detected."); - try { - LOGGER.debug("Try to convert XML string from ISO-8859-1 to UTF-8."); - stream = new ByteArrayInputStream(new String(xml.getBytes(), "ISO-8859-1").getBytes(CHARSET)); - doc = builderFactory.newDocumentBuilder().parse(stream); - LOGGER.debug("Converting XML string from ISO-8859-1 to UTF-8 succeeded."); - } catch (Exception ex) { - LOGGER.error(ex.getMessage()); - LOGGER.warn("Converting XML string to XML document failed."); - LOGGER.warn("Converting XML string from ISO-8859-1 to UTF-8 failed."); - return null; - } - } else { - LOGGER.error(e.getMessage()); - LOGGER.warn("Converting XML string to XML document failed."); - return null; - } + LOGGER.error(e.getMessage()); + LOGGER.warn("Converting XML string to XML document failed."); + return null; } return doc; } diff --git a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java index 2f2a05e..b01cfed 100644 --- a/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java +++ b/src/common/src/test/java/org/niis/xrd4j/common/util/SOAPHelperTest.java @@ -23,6 +23,7 @@ package org.niis.xrd4j.common.util; import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPMessage; import org.junit.jupiter.api.Test; import org.w3c.dom.NodeList; @@ -30,7 +31,10 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; /** @@ -352,4 +356,49 @@ void testGetXRdVersionInfo4() { assertEquals(0, results.size()); } + @Test + void testNodeToString() { + var doc = SOAPHelper.xmlStrToSOAPElement("a"); + + var string = SOAPHelper.toString(doc); + + assertEquals("a", string); + } + + @Test + void testSoapToString() { + String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; + + SOAPMessage msg = SOAPHelper.toSOAP(soapString); + + assertEquals(soapString, SOAPHelper.toString(msg)); + } + + @Test + void testSoapToByteArray() { + String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; + + SOAPMessage msg = SOAPHelper.toSOAP(soapString); + + assertArrayEquals(soapString.getBytes(), SOAPHelper.toByteArray(msg)); + } + + @Test + void testHasAttachments() { + String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; + + SOAPMessage msg = SOAPHelper.toSOAP(soapString); + msg.addAttachmentPart(msg.createAttachmentPart()); + + assertTrue(SOAPHelper.hasAttachments(msg)); + } + + @Test + void testHasAttachmentsFalse() { + String soapString = "FIGOVMEMBER1subsystemFICOMMEMBER2subsystemgetRandomv1EE1234567890ID-12345678904.5ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==9876543210"; + + SOAPMessage msg = SOAPHelper.toSOAP(soapString); + + assertFalse(SOAPHelper.hasAttachments(msg)); + } } diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 9cc9b19..7dce55f 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -21,10 +21,12 @@ org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j- org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } org-apache-james-mime4jCore = { module = "org.apache.james:apache-mime4j-core", version = "0.8.7" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } -org-apache-tomcat-embed-core = { group = "org.apache.tomcat.embed", name = "tomcat-embed-core", version = "10.1.30" } +org-apache-tomcat-embed-core = { module = "org.apache.tomcat.embed:tomcat-embed-core", version = "10.1.30" } org-assertj-assertjCore = { module = "org.assertj:assertj-core", version.ref = "assertj" } org-xmlunit-xmlunitAssertj3 = { module = "org.xmlunit:xmlunit-assertj3", version.ref = "xmlunit" } org-xmlunit-xmlunitPlaceholders = { module = "org.xmlunit:xmlunit-placeholders", version.ref = "xmlunit" } +org-wiremock-wiremock = { module = "org.wiremock:wiremock", version = "3.9.1" } +org-mockito-mockitoCore = { module = "org.mockito:mockito-core", version = "5.14.2" } licenseGradlePlugin = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version = "0.16.1" } dependencyCheckGradlePlugin = { module = "org.owasp:dependency-check-gradle", version = "10.0.4" } diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java index d2d08e4..9ca57a3 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ExampleServletImpl.java @@ -23,6 +23,7 @@ package org.niis.xrd4j.inttest; import org.niis.xrd4j.common.exception.XRd4JException; +import org.niis.xrd4j.common.message.ErrorMessage; import org.niis.xrd4j.common.message.ServiceRequest; import org.niis.xrd4j.common.message.ServiceResponse; import org.niis.xrd4j.server.AbstractAdapterServlet; @@ -153,6 +154,11 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // Serialize the response to SOAP serializer.serialize(response, request); return response; + } else if ("userError".equals(request.getProducer().getServiceCode())) { + request.setErrorMessage(new ErrorMessage("SOAP-ENV:Client", "user-error")); + throw new XRd4JException("Server error with user defined error message"); + } else if ("internalServerError".equals(request.getProducer().getServiceCode())) { + throw new XRd4JException("Server error with out error message"); } return null; diff --git a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java index a5bde74..4403062 100644 --- a/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java +++ b/src/server/src/integrationTest/java/org/niis/xrd4j/inttest/ServletTest.java @@ -171,6 +171,39 @@ public void body(BodyDescriptor bd, InputStream is) throws MimeException, IOExce } + @Test + void userError() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "text/xml") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(testData("user-error-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(SC_OK); + + assertSoapFaultClientError(response, "user-error"); + } + + + @Test + void internalServerError() throws IOException, InterruptedException { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .header("Content-Type", "text/xml") + .uri(getServerUri()) + .POST(HttpRequest.BodyPublishers.ofFile(testData("internal-server-error-request.xml"))) + .build(); + + var response = client.send(request, HttpResponse.BodyHandlers.ofString()); + + assertThat(response.statusCode()).isEqualTo(SC_OK); + + assertSoapFaultClientError(response, "500 Internal Server Error"); + } + @Test void invalidServiceCode() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); diff --git a/src/server/src/integrationTest/resources/log4j2-test.xml b/src/server/src/integrationTest/resources/log4j2-test.xml index 4685529..b0d2e86 100644 --- a/src/server/src/integrationTest/resources/log4j2-test.xml +++ b/src/server/src/integrationTest/resources/log4j2-test.xml @@ -12,5 +12,8 @@ + + + diff --git a/src/server/src/integrationTest/resources/test-data/internal-server-error-request.xml b/src/server/src/integrationTest/resources/test-data/internal-server-error-request.xml new file mode 100644 index 0000000..7166114 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/internal-server-error-request.xml @@ -0,0 +1,24 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + internalServerError + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + diff --git a/src/server/src/integrationTest/resources/test-data/user-error-request.xml b/src/server/src/integrationTest/resources/test-data/user-error-request.xml new file mode 100644 index 0000000..039c5c9 --- /dev/null +++ b/src/server/src/integrationTest/resources/test-data/user-error-request.xml @@ -0,0 +1,24 @@ + + + + FI_TEST + GOV + 1234567-8 + TestClient + + + FI_TEST + GOV + 9876543-1 + DemoService + userError + v1 + + ID11234 + EE1234567890 + 4.0 + + + + + diff --git a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java index 7c07158..6ba4487 100644 --- a/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java +++ b/src/server/src/main/java/org/niis/xrd4j/server/AbstractAdapterServlet.java @@ -36,6 +36,7 @@ import org.niis.xrd4j.server.utils.AdapterUtils; import jakarta.servlet.ServletException; +import jakarta.servlet.ServletInputStream; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -50,6 +51,8 @@ import java.io.IOException; import java.io.PrintWriter; +import static java.nio.charset.StandardCharsets.UTF_8; + /** * This an abstract base class for Servlets that implement SOAP message * processing. @@ -133,13 +136,15 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) if (contentTypeMatches(requestContentType, Constants.TEXT_XML)) { // Regular SOAP message without attachments LOGGER.info("Request's content type is \"{}\".", Constants.TEXT_XML); - soapRequest = SOAPHelper.toSOAP(request.getInputStream()); + soapRequest = SOAPHelper.toSOAP(getInputStream(request)); } else if (contentTypeMatches(requestContentType, Constants.MULTIPART_RELATED)) { // SOAP message with attachments LOGGER.info("Request's content type is \"{}\".", Constants.MULTIPART_RELATED); MimeHeaders mh = AdapterUtils.getHeaders(request); - soapRequest = SOAPHelper.toSOAP(request.getInputStream(), mh); - LOGGER.trace(AdapterUtils.getAttachmentsInfo(soapRequest)); + soapRequest = SOAPHelper.toSOAP(getInputStream(request), mh); + if (LOGGER.isTraceEnabled()) { + LOGGER.trace(AdapterUtils.getAttachmentsInfo(soapRequest)); + } } else { // Invalid content type -> message is not processed LOGGER.warn("Invalid content type : \"{}\".", requestContentType); @@ -149,7 +154,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) // Conversion has failed if soapRequest is null. Return SOAP Fault. if (soapRequest == null) { LOGGER.warn("Unable to deserialize the request to SOAP. SOAP Fault is returned."); - LOGGER.trace("Incoming message : \"{}\"", request.getInputStream().toString()); + logIncomingMessage(request); ErrorMessage errorMessage = new ErrorMessage(FAULT_CODE_CLIENT, errString, "", ""); soapResponse = this.errorToSOAP(errorMessage, null); } @@ -174,6 +179,31 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) writeResponse(soapResponse, response); } + private void logIncomingMessage(HttpServletRequest request) { + if (LOGGER.isTraceEnabled()) { + String msg = null; + try { + ServletInputStream inputStream = getInputStream(request); + if (inputStream != null) { + msg = new String(inputStream.readAllBytes(), UTF_8) + .replaceAll("[\r\n]", " "); // sonar javasecurity:S5145 + } + LOGGER.trace("Incoming message : \"{}\"", msg); + } catch (IOException e) { + LOGGER.trace("Error reading incoming message", e); + } + } + } + + private ServletInputStream getInputStream(HttpServletRequest request) { + try { + return request.getInputStream(); + } catch (IOException e) { + LOGGER.error("Error getting InputStream from request", e); + return null; + } + } + private boolean contentTypeMatches(String contentType, String expected) { return contentType != null && contentType.toLowerCase().startsWith(expected); } @@ -267,7 +297,7 @@ private SOAPMessage processServiceRequest(ServiceRequest serviceRequest) { } } catch (XRd4JException ex) { LOGGER.error(ex.getMessage(), ex); - if (serviceRequest.hasError()) { + if (serviceRequest != null && serviceRequest.hasError()) { return this.errorToSOAP(this.cloneErrorMessage(serviceRequest.getErrorMessage()), null); } else { return this.errorToSOAP(this.errInternalServerErr, null); From ff1f9d5c33f2a0b4f9074c4264d2e052535ddc83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:18:41 +0000 Subject: [PATCH 72/73] build(deps): bump org.apache.james:apache-mime4j-core in /src (#41) --- src/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gradle/libs.versions.toml b/src/gradle/libs.versions.toml index 7dce55f..7131324 100644 --- a/src/gradle/libs.versions.toml +++ b/src/gradle/libs.versions.toml @@ -19,7 +19,7 @@ org-json-json = { module = "org.json:json", version.ref = "org-json-json" } org-slf4j-slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } org-apache-logging-log4j-log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } org-apache-logging-log4j-log4jSlf4j2Impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } -org-apache-james-mime4jCore = { module = "org.apache.james:apache-mime4j-core", version = "0.8.7" } +org-apache-james-mime4jCore = { module = "org.apache.james:apache-mime4j-core", version = "0.8.10" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } org-apache-tomcat-embed-core = { module = "org.apache.tomcat.embed:tomcat-embed-core", version = "10.1.30" } org-assertj-assertjCore = { module = "org.assertj:assertj-core", version.ref = "assertj" } From 3a2d50b539558b1f41058169c7ce3b24e953c0a1 Mon Sep 17 00:00:00 2001 From: Madis Loitmaa Date: Fri, 18 Oct 2024 14:59:51 +0300 Subject: [PATCH 73/73] chore: version no bumped to 0.6.0 Refs: XRDDEV-2628 --- example-adapter/build.gradle.kts | 6 +++--- src/CHANGELOG.md | 2 +- src/gradle.properties | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example-adapter/build.gradle.kts b/example-adapter/build.gradle.kts index bd3f3e9..457c788 100644 --- a/example-adapter/build.gradle.kts +++ b/example-adapter/build.gradle.kts @@ -28,8 +28,8 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web:3.3.4") implementation("org.apache.cxf:cxf-spring-boot-starter-jaxws:4.0.5") - implementation("org.niis.xrd4j:common:0.6.0-SNAPSHOT") - implementation("org.niis.xrd4j:server:0.6.0-SNAPSHOT") + implementation("org.niis.xrd4j:common:0.6.0") + implementation("org.niis.xrd4j:server:0.6.0") compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0") @@ -40,7 +40,7 @@ dependencies { } group = "org.niis" -version = "0.0.6-SNAPSHOT" +version = "0.0.7" description = "Example Adapter for X-Road" java.toolchain.languageVersion = JavaLanguageVersion.of(17) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 0a17e5b..737af0d 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.6.0-SNAPSHOT 2024-10-03 +## 0.6.0 - 2024-10-18 - Build migrated from Maven to Gradle - Update dependencies from javax.* to jakarta.* - Java 17 and 21 support diff --git a/src/gradle.properties b/src/gradle.properties index 6c6ce25..af0eb1c 100644 --- a/src/gradle.properties +++ b/src/gradle.properties @@ -1 +1 @@ -version=0.6.0-SNAPSHOT +version=0.6.0