Search in sources :

Example 1 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class SMPClientReadOnlyTest method testGetSMPHostURI_BDXR.

@Test
@Ignore("Because it may take some time to resolve it")
@IgnoredNaptrTest
public void testGetSMPHostURI_BDXR() throws SMPClientException, SMPDNSResolutionException {
    final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:test");
    // CEF URL provider
    final SMPClientReadOnly aSMPClient = new SMPClientReadOnly(BDXLURLProvider.INSTANCE, aPI, ESML.DIGIT_TEST);
    assertEquals("http://test-infra.peppol.at/", aSMPClient.getSMPHostURI());
    assertNotNull(aSMPClient.getServiceGroupOrNull(aPI));
}
Also used : IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 2 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BDXRClientReadOnlyTest method testReadConnectivityTest.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testReadConnectivityTest() throws SMPDNSResolutionException, SMPClientException {
    final IParticipantIdentifier aPI = SimpleIdentifierFactory.INSTANCE.createParticipantIdentifier("connectivity-partid-qns", "dynceftest1party59gw");
    final IDocumentTypeIdentifier aDocTypeID = SimpleIdentifierFactory.INSTANCE.createDocumentTypeIdentifier("connectivity-docid-qns", "doc_id1");
    // TOOP SML
    final ISMLInfo aSMLInfo = new SMLInfo("cef-connectivity", "CEF ConnectivityTest", "connectivitytest.acc.edelivery.tech.ec.europa.eu.", "https://acc.edelivery.tech.ec.europa.eu/edelivery-sml", true);
    // PEPPOL URL provider
    final BDXRClientReadOnly aBDXRClient = new BDXRClientReadOnly(BDXLURLProvider.INSTANCE, aPI, aSMLInfo);
    // We don't have the truststore at hand - ignore it
    aBDXRClient.setVerifySignature(false);
    assertEquals("https://gateway-edelivery.westeurope.cloudapp.azure.com:444/", aBDXRClient.getSMPHostURI());
    final SignedServiceMetadataType aMetadata = aBDXRClient.getServiceMetadata(aPI, aDocTypeID);
    assertNotNull(aMetadata);
}
Also used : ISMLInfo(com.helger.peppol.sml.ISMLInfo) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) SignedServiceMetadataType(com.helger.xsds.bdxr.smp1.SignedServiceMetadataType) SMLInfo(com.helger.peppol.sml.SMLInfo) ISMLInfo(com.helger.peppol.sml.ISMLInfo) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 3 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BDXRClientReadOnlyTest method testGetBDXRHostURI_BDXR.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testGetBDXRHostURI_BDXR() throws SMPDNSResolutionException {
    final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:test");
    // BDXR URL provider
    final BDXRClientReadOnly aBDXRClient = new BDXRClientReadOnly(BDXLURLProvider.INSTANCE, aPI, ESML.DIGIT_TEST);
    assertEquals("http://test-infra.peppol.at/", aBDXRClient.getSMPHostURI());
}
Also used : IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 4 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BDXRClientReadOnlyTest method testReadTOOP.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testReadTOOP() throws SMPDNSResolutionException, SMPClientException {
    final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9930:167064991");
    final IDocumentTypeIdentifier aDocTypeID = SimpleIdentifierFactory.INSTANCE.createDocumentTypeIdentifier("toop-doctypeid-qns", "urn:eu:toop:ns:dataexchange-1p40::Response##urn:eu.toop.response.registeredorganization::1.40");
    // TOOP SML
    final ISMLInfo aSMLInfo = new SMLInfo("toop", "SMK", "toop.acc.edelivery.tech.ec.europa.eu.", "https://acc.edelivery.tech.ec.europa.eu/edelivery-sml", true);
    // PEPPOL URL provider
    final BDXRClientReadOnly aBDXRClient = new BDXRClientReadOnly(BDXLURLProvider.INSTANCE, aPI, aSMLInfo);
    aBDXRClient.setVerifySignature(false);
    assertEquals("http://smp.toop.egov.iwvi.uni-koblenz.de/", aBDXRClient.getSMPHostURI());
    if (false) {
        final SignedServiceMetadataType aMetadata = aBDXRClient.getServiceMetadata(aPI, aDocTypeID);
        assertNotNull(aMetadata);
    }
}
Also used : ISMLInfo(com.helger.peppol.sml.ISMLInfo) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) SignedServiceMetadataType(com.helger.xsds.bdxr.smp1.SignedServiceMetadataType) SMLInfo(com.helger.peppol.sml.SMLInfo) ISMLInfo(com.helger.peppol.sml.ISMLInfo) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 5 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BDXRClientReadOnlyTest method testReadDE4A.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testReadDE4A() throws Exception {
    final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9999:at000000271");
    final IDocumentTypeIdentifier aDocTypeID = SimpleIdentifierFactory.INSTANCE.createDocumentTypeIdentifier("urn:de4a-eu:CanonicalEvidenceType", "CompanyRegistration");
    final KeyStore aTS = KeyStoreHelper.loadKeyStoreDirect(EKeyStoreType.JKS, "truststores/de4a-truststore-test-smp-pw-de4a.jks", "de4a");
    assertNotNull(aTS);
    // TOOP SML
    final ISMLInfo aSMLInfo = new SMLInfo("dea4", "SMK", "de4a.acc.edelivery.tech.ec.europa.eu.", "https://acc.edelivery.tech.ec.europa.eu/edelivery-sml", true);
    // BDXL URL provider
    final BDXRClientReadOnly aBDXRClient = new BDXRClientReadOnly(BDXLURLProvider.INSTANCE, aPI, aSMLInfo);
    // Custom truststore is needed atm
    aBDXRClient.setTrustStore(aTS);
    assertEquals("https://de4a-smp.egovlab.eu/", aBDXRClient.getSMPHostURI());
    {
        final SignedServiceMetadataType aMetadata = aBDXRClient.getServiceMetadata(aPI, aDocTypeID);
        assertNotNull(aMetadata);
    }
}
Also used : ISMLInfo(com.helger.peppol.sml.ISMLInfo) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) SignedServiceMetadataType(com.helger.xsds.bdxr.smp1.SignedServiceMetadataType) SMLInfo(com.helger.peppol.sml.SMLInfo) ISMLInfo(com.helger.peppol.sml.ISMLInfo) KeyStore(java.security.KeyStore) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Aggregations

IgnoredNaptrTest (com.helger.smpclient.IgnoredNaptrTest)8 Ignore (org.junit.Ignore)8 Test (org.junit.Test)8 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)6 ISMLInfo (com.helger.peppol.sml.ISMLInfo)3 SMLInfo (com.helger.peppol.sml.SMLInfo)3 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)3 SignedServiceMetadataType (com.helger.xsds.bdxr.smp1.SignedServiceMetadataType)3 SimpleParticipantIdentifier (com.helger.peppolid.simple.participant.SimpleParticipantIdentifier)2 URI (java.net.URI)2 URL (java.net.URL)1 KeyStore (java.security.KeyStore)1