Skip to content

Commit

Permalink
Merge pull request #141 from digipost/jakarta-soap
Browse files Browse the repository at this point in the history
Jakarta SOAP
  • Loading branch information
runeflobakk authored Dec 6, 2023
2 parents 367dec2 + 201847b commit ff50bdc
Show file tree
Hide file tree
Showing 25 changed files with 197 additions and 352 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
build:
strategy:
matrix:
java: [ '8', '11' ]
java: [ '17', '21' ]
name: Build on Java ${{ matrix.java }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-java@v3
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Pbuild-sources-and-javadoc
-Pbuild-sources-and-javadoc,dependency-analyze,include-NOTICE
64 changes: 64 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Digipost XSD

Copyright 2014 Posten Norge AS. All Rights Reserved.

This product includes software developed by Posten Norge AS. - https://www.posten.no/
Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html


This software includes third party software subject to the following licenses:

Angus Activation Registries under EDL 1.0
Apache Commons Codec under Apache License, Version 2.0
Apache Commons Lang under Apache-2.0
Apache HttpClient under Apache License, Version 2.0
Apache HttpCore under Apache License, Version 2.0
Apache WSS4J DOM WS-Security under Apache-2.0
Apache WSS4J WS-Security Common under Apache-2.0
Apache XML Security for Java under Apache-2.0
Bouncy Castle Provider under Bouncy Castle Licence
Cryptacular Library under Apache 2 or GNU Lesser General Public License
Digipost JAXB Resolver - com.sun.xml.bind under The Apache Software License, Version 2.0
Extended StAX API under Eclipse Distribution License - v 1.0
Guava InternalFutureFailureAccess and InternalFutures under The Apache Software License, Version 2.0
Guava: Google Core Libraries for Java under Apache License, Version 2.0
istack common utility code runtime under Eclipse Distribution License - v 1.0
Jakarta Activation API under EDL 1.0
Jakarta Mail API under EPL 2.0 or GPL2 w/ CPE or EDL 1.0
Jakarta SOAP Implementation under Eclipse Distribution License - v 1.0
Jakarta SOAP with Attachments API under Eclipse Distribution License - v 1.0
Jakarta XML Binding API under Eclipse Distribution License - v 1.0
JASYPT: Java Simplified Encryption under The Apache Software License, Version 2.0
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE
JAXB Core under Eclipse Distribution License - v 1.0
JAXB Runtime under Eclipse Distribution License - v 1.0
jaxb-api under CDDL 1.1 or GPL2 w/ CPE
JAXB2 Basics - Runtime under BSD-Style License
JCL 1.2 implemented over SLF4J under Apache License, Version 2.0
JUL to SLF4J bridge under MIT License
micrometer-commons under The Apache Software License, Version 2.0
micrometer-observation under The Apache Software License, Version 2.0
Old JAXB Core under CDDL+GPL License
Old JAXB Runtime under Eclipse Distribution License - v 1.0
SDP Shared under The Apache Software License, Version 2.0
SDP Shared - API Client under The Apache Software License, Version 2.0
SDP Shared - API Commons under The Apache Software License, Version 2.0
SDP Shared - XSD & JAXB under The Apache Software License, Version 2.0
SLF4J API Module under MIT License
Spring AOP under Apache License, Version 2.0
Spring Beans under Apache License, Version 2.0
Spring Commons Logging Bridge under Apache License, Version 2.0
Spring Context under Apache License, Version 2.0
Spring Core under Apache License, Version 2.0
Spring Expression Language (SpEL) under Apache License, Version 2.0
Spring Object/XML Marshalling under Apache License, Version 2.0
Spring Transaction under Apache License, Version 2.0
Spring Web under Apache License, Version 2.0
Spring Web MVC under Apache License, Version 2.0
spring-security-core under Apache License, Version 2.0
spring-security-crypto under Apache License, Version 2.0
spring-ws-core under Apache License, Version 2.0
spring-ws-security under Apache License, Version 2.0
spring-xml under Apache License, Version 2.0
TXW2 Runtime under Eclipse Distribution License - v 1.0

24 changes: 16 additions & 8 deletions api-client/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,39 @@ Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html

This software includes third party software subject to the following licenses:

Angus Activation Registries under EDL 1.0
Apache Commons Codec under Apache License, Version 2.0
Apache Commons Lang under Apache License, Version 2.0
Apache Commons Lang under Apache-2.0
Apache HttpClient under Apache License, Version 2.0
Apache HttpCore under Apache License, Version 2.0
Apache WSS4J DOM WS-Security under Apache License, Version 2.0
Apache WSS4J WS-Security Common under Apache License, Version 2.0
Apache XML Security for Java under Apache License, Version 2.0
Apache WSS4J DOM WS-Security under Apache-2.0
Apache WSS4J WS-Security Common under Apache-2.0
Apache XML Security for Java under Apache-2.0
Bouncy Castle Provider under Bouncy Castle Licence
Cryptacular Library under Apache 2 or GNU Lesser General Public License
Digipost JAXB Resolver - com.sun.xml.bind under The Apache Software License, Version 2.0
Extended StAX API under Eclipse Distribution License - v 1.0
Guava InternalFutureFailureAccess and InternalFutures under The Apache Software License, Version 2.0
Guava: Google Core Libraries for Java under Apache License, Version 2.0
istack common utility code runtime under Eclipse Distribution License - v 1.0
Jakarta Activation API under EDL 1.0
Jakarta Mail API under EPL 2.0 or GPL2 w/ CPE or EDL 1.0
Jakarta SOAP Implementation under Eclipse Distribution License - v 1.0
Jakarta SOAP with Attachments API under Eclipse Distribution License - v 1.0
Jakarta XML Binding API under Eclipse Distribution License - v 1.0
JASYPT: Java Simplified Encryption under The Apache Software License, Version 2.0
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE
javax.xml.soap API under CDDL + GPLv2 with classpath exception
JAXB Core under Eclipse Distribution License - v 1.0
JAXB Runtime under Eclipse Distribution License - v 1.0
jaxb-api under CDDL 1.1 or GPL2 w/ CPE
JAXB2 Basics - Runtime under BSD-Style License
JCL 1.2 implemented over SLF4J under Apache License, Version 2.0
Joda-Time under Apache License, Version 2.0
JUL to SLF4J bridge under MIT License
Log4j Implemented Over SLF4J under Apache Software Licenses
MIME streaming extension under Eclipse Distribution License - v 1.0
micrometer-commons under The Apache Software License, Version 2.0
micrometer-observation under The Apache Software License, Version 2.0
Old JAXB Core under CDDL+GPL License
Old JAXB Runtime under Eclipse Distribution License - v 1.0
saaj-impl under Eclipse Distribution License - v 1.0
SDP Shared - API Commons under The Apache Software License, Version 2.0
SDP Shared - XSD & JAXB under The Apache Software License, Version 2.0
SLF4J API Module under MIT License
Expand All @@ -52,4 +59,5 @@ This software includes third party software subject to the following licenses:
spring-ws-core under Apache License, Version 2.0
spring-ws-security under Apache License, Version 2.0
spring-xml under Apache License, Version 2.0
TXW2 Runtime under Eclipse Distribution License - v 1.0

40 changes: 9 additions & 31 deletions api-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<dependencies>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
<dependency>
<groupId>no.digipost</groupId>
Expand All @@ -36,8 +36,8 @@

<!-- SAAJ API-->
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>javax.xml.soap-api</artifactId>
<groupId>jakarta.xml.soap</groupId>
<artifactId>jakarta.xml.soap-api</artifactId>
</dependency>

<!-- SAAJ RI https://javaee.github.io/metro-saaj/ -->
Expand All @@ -55,10 +55,6 @@
<artifactId>jcl-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
Expand All @@ -68,6 +64,11 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>no.digipost</groupId>
<artifactId>jul-to-slf4j-junit-extension</artifactId>
<scope>test</scope>
</dependency>

<!-- Spring -->

Expand Down Expand Up @@ -117,27 +118,4 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>check-dependency-declarations-vs-usage</id>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<ignoreNonCompile>true</ignoreNonCompile>
<failOnWarning>true</failOnWarning>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jasig.maven</groupId>
<artifactId>maven-notice-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package no.digipost.api;

import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPException;
import jakarta.xml.soap.MessageFactory;
import jakarta.xml.soap.SOAPConstants;
import jakarta.xml.soap.SOAPException;


@FunctionalInterface
Expand Down
4 changes: 2 additions & 2 deletions api-client/src/main/java/no/digipost/api/MessageSender.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package no.digipost.api;


import jakarta.xml.soap.MessageFactory;
import jakarta.xml.soap.SOAPException;
import no.digipost.api.exceptions.MessageSenderFaultMessageResolver;
import no.digipost.api.handlers.ApplikasjonsKvitteringReceiver;
import no.digipost.api.handlers.BekreftelseSender;
Expand Down Expand Up @@ -46,8 +48,6 @@
import org.springframework.ws.soap.saaj.SaajSoapMessageFactory;
import org.springframework.ws.transport.http.HttpComponentsMessageSender;

import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.digipost.api.handlers;

import jakarta.activation.DataHandler;
import no.digipost.api.SdpMeldingSigner;
import no.digipost.api.interceptors.steps.AddUserMessageStep;
import no.digipost.api.representations.EbmsAktoer;
Expand All @@ -17,7 +18,6 @@
import org.springframework.ws.soap.SoapMessage;
import org.w3c.dom.Document;

import javax.activation.DataHandler;
import javax.xml.transform.TransformerException;
import javax.xml.transform.stream.StreamSource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public boolean handleResponse(MessageContext messageContext) throws WebServiceCl
X509Certificate cert = (X509Certificate) messageContext.getProperty(Wss4jInterceptor.INCOMING_CERTIFICATE);
Organisasjonsnummer responder = extractor.from(cert);
if (!tekniskMottaker.orgnr.equals(responder)) {
throw new MessageSenderValidationException(format("Unexpected signer in incoming message. Expected: [%s] Extracted: [%s] from %s", tekniskMottaker.orgnr, responder, cert.getSubjectDN().getName()));
throw new MessageSenderValidationException(format("Unexpected signer in incoming message. Expected: [%s] Extracted: [%s] from %s", tekniskMottaker.orgnr, responder, cert.getSubjectX500Principal().getName()));
}
}
return true;
Expand Down
11 changes: 0 additions & 11 deletions api-client/src/main/notice/NOTICE.template

This file was deleted.

23 changes: 0 additions & 23 deletions api-client/src/main/notice/license-mappings.xml

This file was deleted.

1 change: 1 addition & 0 deletions api-client/src/test/resources/junit-platform.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
junit.jupiter.extensions.autodetection.enabled=true
23 changes: 15 additions & 8 deletions api-commons/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,35 @@ Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html

This software includes third party software subject to the following licenses:

Angus Activation Registries under EDL 1.0
Apache Commons Codec under Apache License, Version 2.0
Apache Commons Lang under Apache License, Version 2.0
Apache Commons Lang under Apache-2.0
Apache HttpCore under Apache License, Version 2.0
Apache WSS4J DOM WS-Security under Apache License, Version 2.0
Apache WSS4J WS-Security Common under Apache License, Version 2.0
Apache XML Security for Java under Apache License, Version 2.0
Apache WSS4J DOM WS-Security under Apache-2.0
Apache WSS4J WS-Security Common under Apache-2.0
Apache XML Security for Java under Apache-2.0
Bouncy Castle Provider under Bouncy Castle Licence
Cryptacular Library under Apache 2 or GNU Lesser General Public License
Digipost JAXB Resolver - com.sun.xml.bind under The Apache Software License, Version 2.0
Extended StAX API under Eclipse Distribution License - v 1.0
Guava InternalFutureFailureAccess and InternalFutures under The Apache Software License, Version 2.0
Guava: Google Core Libraries for Java under Apache License, Version 2.0
istack common utility code runtime under Eclipse Distribution License - v 1.0
Jakarta Activation API under EDL 1.0
Jakarta Mail API under EPL 2.0 or GPL2 w/ CPE or EDL 1.0
Jakarta SOAP Implementation under Eclipse Distribution License - v 1.0
Jakarta XML Binding API under Eclipse Distribution License - v 1.0
JASYPT: Java Simplified Encryption under The Apache Software License, Version 2.0
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE
javax.xml.soap API under CDDL + GPLv2 with classpath exception
JAXB Core under Eclipse Distribution License - v 1.0
JAXB Runtime under Eclipse Distribution License - v 1.0
jaxb-api under CDDL 1.1 or GPL2 w/ CPE
JAXB2 Basics - Runtime under BSD-Style License
JCL 1.2 implemented over SLF4J under Apache License, Version 2.0
Joda-Time under Apache License, Version 2.0
MIME streaming extension under Eclipse Distribution License - v 1.0
micrometer-commons under The Apache Software License, Version 2.0
micrometer-observation under The Apache Software License, Version 2.0
Old JAXB Core under CDDL+GPL License
Old JAXB Runtime under Eclipse Distribution License - v 1.0
saaj-impl under Eclipse Distribution License - v 1.0
SDP Shared - XSD & JAXB under The Apache Software License, Version 2.0
SLF4J API Module under MIT License
Spring AOP under Apache License, Version 2.0
Expand All @@ -48,4 +54,5 @@ This software includes third party software subject to the following licenses:
spring-ws-core under Apache License, Version 2.0
spring-ws-security under Apache License, Version 2.0
spring-xml under Apache License, Version 2.0
TXW2 Runtime under Eclipse Distribution License - v 1.0

Loading

0 comments on commit ff50bdc

Please sign in to comment.