diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c21bbdf..6b79da8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,8 @@ jobs: distribution: 'corretto' - name: Publish package env: - JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }} - JRELEASER_NEXUS2_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_PASSWORD }} + JRELEASER_NEXUS2_USERNAME: ${{ secrets.TOKEN_JRELEASER_NEXUS2_USERNAME }} + JRELEASER_NEXUS2_TOKEN: ${{ secrets.TOKEN_JRELEASER_NEXUS2_TOKEN }} JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} diff --git a/src/main/java/ch/digitalfondue/vatchecker/Utils.java b/src/main/java/ch/digitalfondue/vatchecker/Utils.java index 5128563..fcdb620 100644 --- a/src/main/java/ch/digitalfondue/vatchecker/Utils.java +++ b/src/main/java/ch/digitalfondue/vatchecker/Utils.java @@ -176,6 +176,7 @@ static ExtractionResult doCallAndExtract(Document document, String body = Utils.prepareTemplate(document, params); try (InputStream is = documentFetcher.apply(endpointUrl, body); Reader isr = new InputStreamReader(is, StandardCharsets.UTF_8)) { Document result = Utils.toDocument(isr); + Node validNode = (Node) validElementMatcher.evaluate(result, XPathConstants.NODE); Node faultNode = (Node) SOAP_FAULT_MATCHER.evaluate(result, XPathConstants.NODE); List extracted = new ArrayList<>(validElementExtractors.length); diff --git a/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java b/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java index 0c1cb5b..18bb2dd 100644 --- a/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java +++ b/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java @@ -33,7 +33,7 @@ public void testSuccess() { @Test public void testCorrectCountryCodeButInvalidVAT() { - EUVatCheckResponse resp = EUVatChecker.doCheck("IT", "00950501000"); + EUVatCheckResponse resp = EUVatChecker.doCheck("NL", "85187947B01"); Assert.assertEquals(false, resp.isValid()); Assert.assertEquals("---", resp.getName()); Assert.assertEquals("---", resp.getAddress());