Skip to content

Commit

Permalink
Replaced no.difi.commons libraries with network.oxalis commons and pe…
Browse files Browse the repository at this point in the history
…ppol libraries
  • Loading branch information
aaron-kumar committed Jul 29, 2022
1 parent a5b2f12 commit 4408a97
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 68 deletions.
10 changes: 5 additions & 5 deletions peppol-lookup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@
<artifactId>peppol-security</artifactId>
</dependency>

<!-- Difi Commons -->
<!-- Peppol Specifications -->
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-busdox</artifactId>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-busdox</artifactId>
</dependency>
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-bdx</artifactId>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-bdx</artifactId>
</dependency>

<!-- SLF4J -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import network.oxalis.vefa.peppol.security.lang.PeppolSecurityException;
import network.oxalis.vefa.peppol.security.xmldsig.DomUtils;
import network.oxalis.vefa.peppol.security.xmldsig.XmldsigVerifier;
import no.difi.commons.bdx.jaxb.smp._2014._07.*;
import network.oxalis.peppol.bdx.jaxb.smp._2014._07.*;
import org.kohsuke.MetaInfServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import network.oxalis.vefa.peppol.security.lang.PeppolSecurityException;
import network.oxalis.vefa.peppol.security.xmldsig.DomUtils;
import network.oxalis.vefa.peppol.security.xmldsig.XmldsigVerifier;
import no.difi.commons.bdx.jaxb.smp._2016._05.*;
import network.oxalis.peppol.bdx.jaxb.smp._2016._05.*;
import org.kohsuke.MetaInfServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import network.oxalis.vefa.peppol.security.lang.PeppolSecurityException;
import network.oxalis.vefa.peppol.security.xmldsig.DomUtils;
import network.oxalis.vefa.peppol.security.xmldsig.XmldsigVerifier;
import no.difi.commons.busdox.jaxb.smp.*;
import network.oxalis.peppol.busdox.jaxb.smp.*;
import org.apache.commons.codec.binary.Base64;
import org.kohsuke.MetaInfServices;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ public void inValidServiceExpirationDateAndServiceActivationDate() throws Except
@Test
public void serviceMetadata() throws Exception {
ServiceMetadata result = reader.parseServiceMetadata(new FetcherResponse(
getClass().getResourceAsStream("/busdox-servicemetadata-0192-991825827.xml"))).getContent();
getClass().getResourceAsStream("/busdox-servicemetadata-9908-923829644.xml"))).getContent();

ProcessIdentifier processIdentifier = ProcessIdentifier.of("urn:fdc:peppol.eu:2017:poacc:billing:01:1.0");
ProcessIdentifier processIdentifier = ProcessIdentifier.of("urn:www.cenbii.eu:profile:bii05:ver2.0");
ServiceInformation<Endpoint> serviceInformation = result.getServiceInformation();

try {
Expand All @@ -182,12 +182,10 @@ public void serviceMetadata() throws Exception {
// Expected
}

assertNotNull(serviceInformation.getEndpoint(processIdentifier, TransportProfile.PEPPOL_AS2_2_0));

assertEquals(
serviceInformation.getEndpoint(processIdentifier, TransportProfile.PEPPOL_AS4_2_0)
.getCertificate().getSubjectDN().toString(),
"C=NO, O=TietoEVRY, OU=PEPPOL PRODUCTION AP, CN=PNO000051"
"C=FI, O=Basware, OU=PEPPOL TEST AP, CN=POP000010"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public void bdxr201605DocumentIdentifers() throws Exception {
@Test
public void busdoxServiceMetadata() throws Exception {
ServiceMetadata result = reader.parseServiceMetadata(new FetcherResponse(
getClass().getResourceAsStream("/busdox-servicemetadata-0192-991825827.xml"))).getContent();
getClass().getResourceAsStream("/busdox-servicemetadata-9908-923829644.xml"))).getContent();

ProcessIdentifier processIdentifier = ProcessIdentifier.of("urn:fdc:peppol.eu:2017:poacc:billing:01:1.0");
ProcessIdentifier processIdentifier = ProcessIdentifier.of("urn:www.cenbii.eu:profile:bii05:ver2.0");
ServiceInformation<Endpoint> serviceInformation = result.getServiceInformation();

try {
Expand All @@ -74,12 +74,10 @@ public void busdoxServiceMetadata() throws Exception {
// Expected
}

assertNotNull(serviceInformation.getEndpoint(processIdentifier, TransportProfile.PEPPOL_AS2_2_0));

assertEquals(
serviceInformation.getEndpoint(processIdentifier, TransportProfile.PEPPOL_AS4_2_0)
.getCertificate().getSubjectDN().toString(),
"C=NO, O=TietoEVRY, OU=PEPPOL PRODUCTION AP, CN=PNO000051"
"C=FI, O=Basware, OU=PEPPOL TEST AP, CN=POP000010"
);
}

Expand Down
12 changes: 6 additions & 6 deletions peppol-publisher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<artifactId>peppol-mode</artifactId>
</exclusion>
<exclusion>
<groupId>no.difi.commons</groupId>
<groupId>network.oxalis.commons</groupId>
<artifactId>commons-certvalidator</artifactId>
</exclusion>
<exclusion>
Expand All @@ -112,14 +112,14 @@
</exclusions>
</dependency>

<!-- Difi Commons -->
<!-- Peppol Specifications -->
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-busdox</artifactId>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-busdox</artifactId>
</dependency>
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-bdx</artifactId>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-bdx</artifactId>
</dependency>

<!-- SLF4J -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import network.oxalis.vefa.peppol.publisher.model.PublisherEndpoint;
import network.oxalis.vefa.peppol.publisher.model.PublisherServiceMetadata;
import network.oxalis.vefa.peppol.publisher.model.ServiceGroup;
import no.difi.commons.bdx.jaxb.smp._2016._05.*;
import network.oxalis.peppol.bdx.jaxb.smp._2016._05.*;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import network.oxalis.vefa.peppol.publisher.model.PublisherEndpoint;
import network.oxalis.vefa.peppol.publisher.model.PublisherServiceMetadata;
import network.oxalis.vefa.peppol.publisher.model.ServiceGroup;
import no.difi.commons.busdox.jaxb.addressing.AttributedURIType;
import no.difi.commons.busdox.jaxb.addressing.EndpointReferenceType;
import no.difi.commons.busdox.jaxb.addressing.MetadataType;
import no.difi.commons.busdox.jaxb.addressing.ReferenceParametersType;
import no.difi.commons.busdox.jaxb.identifiers.DocumentIdentifierType;
import no.difi.commons.busdox.jaxb.identifiers.ParticipantIdentifierType;
import no.difi.commons.busdox.jaxb.identifiers.ProcessIdentifierType;
import no.difi.commons.busdox.jaxb.smp.*;
import network.oxalis.peppol.busdox.jaxb.addressing.AttributedURIType;
import network.oxalis.peppol.busdox.jaxb.addressing.EndpointReferenceType;
import network.oxalis.peppol.busdox.jaxb.addressing.MetadataType;
import network.oxalis.peppol.busdox.jaxb.addressing.ReferenceParametersType;
import network.oxalis.peppol.busdox.jaxb.identifiers.DocumentIdentifierType;
import network.oxalis.peppol.busdox.jaxb.identifiers.ParticipantIdentifierType;
import network.oxalis.peppol.busdox.jaxb.identifiers.ProcessIdentifierType;
import network.oxalis.peppol.busdox.jaxb.smp.*;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
Expand Down
6 changes: 3 additions & 3 deletions peppol-sbdh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
<artifactId>peppol-common</artifactId>
</dependency>

<!-- Difi commons -->
<!-- Peppol Specifications -->
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-sbdh</artifactId>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-sbdh</artifactId>
</dependency>

<!-- Google Guava -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package network.oxalis.vefa.peppol.sbdh;

import no.difi.commons.sbdh.jaxb.*;
import network.oxalis.peppol.sbdh.jaxb.*;
import network.oxalis.vefa.peppol.common.lang.PeppolRuntimeException;
import network.oxalis.vefa.peppol.common.model.ArgumentIdentifier;
import network.oxalis.vefa.peppol.common.model.DocumentTypeIdentifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

package network.oxalis.vefa.peppol.sbdh;

import no.difi.commons.sbdh.jaxb.DocumentIdentification;
import no.difi.commons.sbdh.jaxb.PartnerIdentification;
import no.difi.commons.sbdh.jaxb.Scope;
import no.difi.commons.sbdh.jaxb.StandardBusinessDocumentHeader;
import network.oxalis.peppol.sbdh.jaxb.DocumentIdentification;
import network.oxalis.peppol.sbdh.jaxb.PartnerIdentification;
import network.oxalis.peppol.sbdh.jaxb.Scope;
import network.oxalis.peppol.sbdh.jaxb.StandardBusinessDocumentHeader;
import network.oxalis.vefa.peppol.common.model.*;
import network.oxalis.vefa.peppol.sbdh.lang.SbdhException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

package network.oxalis.vefa.peppol.sbdh;

import no.difi.commons.sbdh.jaxb.DocumentIdentification;
import no.difi.commons.sbdh.jaxb.Scope;
import no.difi.commons.sbdh.jaxb.StandardBusinessDocumentHeader;
import network.oxalis.peppol.sbdh.jaxb.DocumentIdentification;
import network.oxalis.peppol.sbdh.jaxb.Scope;
import network.oxalis.peppol.sbdh.jaxb.StandardBusinessDocumentHeader;
import network.oxalis.vefa.peppol.common.model.Header;
import network.oxalis.vefa.peppol.sbdh.lang.SbdhException;

Expand Down
4 changes: 2 additions & 2 deletions peppol-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@
<artifactId>peppol-mode</artifactId>
</dependency>

<!-- Difi commons -->
<!-- commons -->
<dependency>
<groupId>no.difi.commons</groupId>
<groupId>network.oxalis.commons</groupId>
<artifactId>commons-certvalidator</artifactId>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

import network.oxalis.vefa.peppol.security.api.CertificateValidator;
import network.oxalis.vefa.peppol.security.lang.PeppolSecurityException;
import no.difi.certvalidator.ValidatorGroup;
import no.difi.certvalidator.ValidatorLoader;
import no.difi.certvalidator.api.CertificateValidationException;
import no.difi.certvalidator.lang.ValidatorParsingException;
import network.oxalis.commons.certvalidator.ValidatorGroup;
import network.oxalis.commons.certvalidator.ValidatorLoader;
import network.oxalis.commons.certvalidator.api.CertificateValidationException;
import network.oxalis.commons.certvalidator.lang.ValidatorParsingException;
import network.oxalis.vefa.peppol.common.code.Service;
import network.oxalis.vefa.peppol.common.lang.PeppolLoadingException;
import network.oxalis.vefa.peppol.mode.Mode;
Expand Down
2 changes: 1 addition & 1 deletion peppol-security/src/main/resources/pki/local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ See the Licence for the specific language governing
~ permissions and limitations under the Licence.
-->
<ValidatorRecipe xmlns="http://difi.no/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<ValidatorRecipe xmlns="http://oxalis.network/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<Validator>
<Expiration/>
<Signing type="SELF_SIGNED"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ See the Licence for the specific language governing
~ permissions and limitations under the Licence.
-->
<ValidatorRecipe xmlns="http://difi.no/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<ValidatorRecipe xmlns="http://oxalis.network/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<Validator>
<Expiration/>
<Signing type="PUBLIC_SIGNED"/>
Expand Down
2 changes: 1 addition & 1 deletion peppol-security/src/main/resources/pki/peppol-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ See the Licence for the specific language governing
~ permissions and limitations under the Licence.
-->
<ValidatorRecipe xmlns="http://difi.no/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<ValidatorRecipe xmlns="http://oxalis.network/xsd/certvalidator/1.0" name="peppol-test" version="2018-02-20">
<Validator>
<Expiration/>
<Signing type="PUBLIC_SIGNED"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package network.oxalis.vefa.peppol.security;

import no.difi.certvalidator.Validator;
import network.oxalis.commons.certvalidator.Validator;
import network.oxalis.vefa.peppol.common.lang.PeppolLoadingException;
import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
package network.oxalis.vefa.peppol.security.util;

import com.typesafe.config.ConfigFactory;
import no.difi.certvalidator.Validator;
import no.difi.certvalidator.api.CertificateValidationException;
import network.oxalis.commons.certvalidator.Validator;
import network.oxalis.commons.certvalidator.api.CertificateValidationException;
import network.oxalis.vefa.peppol.common.code.Service;
import network.oxalis.vefa.peppol.common.lang.PeppolLoadingException;
import network.oxalis.vefa.peppol.mode.Mode;
Expand Down
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,26 @@
<version>2.3.1-SNAPSHOT</version>
</dependency>

<!-- Difi Commons -->
<!-- Commons -->
<dependency>
<groupId>no.difi.commons</groupId>
<groupId>network.oxalis.commons</groupId>
<artifactId>commons-certvalidator</artifactId>
<version>2.2.1</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-bdx</artifactId>
<version>0.9.5</version>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-bdx</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-busdox</artifactId>
<version>0.9.5</version>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-busdox</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>no.difi.commons</groupId>
<artifactId>commons-sbdh</artifactId>
<version>0.9.5</version>
<groupId>network.oxalis.peppol</groupId>
<artifactId>peppol-sbdh</artifactId>
<version>1.0.0</version>
</dependency>

<!-- Apache Http Components -->
Expand Down

0 comments on commit 4408a97

Please sign in to comment.