diff --git a/.travis.yml b/.travis.yml index 4b06dda..7364663 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false -dist: trusty +dist: focal group: deprecated language: java @@ -8,15 +8,16 @@ notifications: email: false jdk: - - oraclejdk8 + - oraclejdk17 before_install: - - wget --no-check-certificate https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz - - sha512sum -c apache-maven-3.6.3-bin.tar.gz.sha512 - - tar xzvf apache-maven-3.6.3-bin.tar.gz - - export PATH=`pwd`/apache-maven-3.6.3/bin:$PATH + - wget https://archive.apache.org/dist/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz + - sha512sum -c apache-maven-3.9.5-bin.tar.gz.sha512 + - tar xzvf apache-maven-3.9.5-bin.tar.gz + - export PATH=`pwd`/apache-maven-3.9.5/bin:$PATH - mvn -v script: - mvn --version + # Skip unit test in CI - mvn clean install diff --git a/README.md b/README.md index d8a94b4..67ce9a3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ # RSU B2B Sample Web Service Client written in Java -[![Build Status](https://travis-ci.com/skat/rsu-b2b-sample-client-java.svg?token=pXpLRS1qCgHe3KVdbFyA&branch=master)](https://travis-ci.com/skat/rsu-b2b-sample-client-java) - -> **ModtagMomsangivelseForeloebig** is as of 2024 able to accept corrections to previous VAT returns going three (3) years back (as of current date). The service will return a notification code in the response telling if the submitted draft was (A) handled as the first VAT returns draft *OR* (B) if it was handled as a draft with the purpose of correcting a previously approved VAT returns. If your submitted draft is handled as a correction you will get code `5002` in `5002`. See the section [Notification codes related to transactions](#notification-codes-related-to-transactions) for futher details on these notification codes. - +[![Build Status](https://travis-ci.com/skat/rsu-b2b-sample-client-java.svg?token=pXpLRS1qCgHe3KVdbFyA&branch=master)](https://travis-ci.com/skat/rsu-b2b-sample-client-java) ![Java17](https://img.shields.io/badge/Java-17-green.svg) This GitHub contains documentation and a sample client for the RSU B2B Web Service Gateway, that provides APIs (SOAP Web Services) to submit **VAT returns**. The [sample client](#about-the-client) is developed in Java and using open source libraries demonstrating how the APIs works. @@ -44,7 +41,6 @@ This GitHub contains documentation and a sample client for the RSU B2B Web Servi * [Run clients](#run-clients) * [Prerequisites](#prerequisites) * [Build and Run](#build-and-run) - * [Run on Tomcat](#run-on-tomcat) * [Change endpoints](#change-endpoints) * [Add new environment and endpoints](#add-new-environment-and-endpoints) * [Add another OCES3 certificate](#add-another-oces3-certificate) @@ -68,11 +64,7 @@ The following diagram shows how the Web Services works. The first web service to use is **VirksomhedKalenderHent**. This Web Service returns dates for which the legal entity has to submit VAT Returns by. These dates are required, when submitting VAT Returns. -The second web service is **ModtagMomsangivelseForeloebig**. This Web Services submits a draft of the VAT Returns to skat.dk with all the fields you need to fill in. The Web Service returns a deep link to skat.dk, where the legal entity can access the submitted VAT Returns and approve it. - - **ModtagMomsangivelseForeloebig** is as of 2024 able to accept corrections to previous VAT returns going three (3) years back (as of current date). The service will return a notification code in the response telling if the submitted draft was (A) handled as the first VAT returns draft *OR* (B) if it was handled as a draft with the purpose of correcting a previously approved VAT returns. If your submitted draft is handled as a correction you will get code `5002` in `5002`. - -See the section [Notification codes related to transactions](#notification-codes-related-to-transactions) for futher details on these notification codes. This feature will enable RSU systems and their users to submit draft corrections to a VAT returns approved previously. The company still has to login on skat.dk and approve the submitted draft with corrections. +The second web service is **ModtagMomsangivelseForeloebig**. This Web Services submits a draft of the VAT Returns to skat.dk with all the fields you need to fill in. The Web Service returns a deep link to skat.dk, where the legal entity can access the submitted VAT Returns and approve it. The last web service is **MomsangivelseKvitteringHent**. This Web Service provide a receipt for the VAT Returns given that the legal entity has approved it. This service also includes payment information on how to pay any outstanding balance. @@ -94,23 +86,26 @@ The web services are implemented as SOAP Web Services. This GitHub contains WSDL ### Security -The Web Services are protected using both TLS over HTTPS and by WS-Security using a certificate to both encrypt and sign the requests. +The Web Services are protected using both TLS over HTTPS and by WS-Security (using a certificate for signing the request and +response). **Transport Layer Security (TLS)** -To be able to use the services, you need to add the server certificate to your trust store. You can find the certificates for both test and production in [pem/README.md](/pem/README.md). +To be able to use the services, you need to add the server certificate to your trust store. You can find the certificates for both test and production here [https://github.com/skat/emcs-b2b-ws/tree/master/crt](https://github.com/skat/emcs-b2b-ws/tree/master/crt) -The sample client in this GitHub already has the server certificate for the test environment in the trust store. +The sample client in this GitHub repository comes prepared with server certificate for the test environment in the trust store. **WS-Security Protocol** To be able to use the Web Services you also need a company certificate (VOCES3) from MitID Erhverv (OCES3). A company certificate for the test environment is provided by contacting Skattestyrelsen. -To be able to use the services in production, you need to get an official company certificate. Information on how to get this is attached when you get access to the test environment. +To be able to use the services in production, you need to get an official company certificate. +Information on how to get this is attached when you get access to the test environment. See more on the security & certificates here: +[https://github.com/skat/emcs-b2b-ws#security](https://github.com/skat/emcs-b2b-ws#security) -The company certificate is used to sign (seal) the soap:body of the request and other additional security headers such a timestamp. The certificate is also used to validate the response. +The company certificate is used to sign the payload. The certificate is also used to validate and decrypt the response. -An example of a signed request can be found here: [rsu-b2b-sample-client/src/test/resources/VirksomhedKalenderHent_I_Document_Complete_With_SOAPENV.xml](rsu-b2b-sample-client/src/test/resources/VirksomhedKalenderHent_I_Document_Complete_With_SOAPENV.xml) +An example of a signed payload can be found here: [rsu-b2b-sample-client/src/test/resources/VirksomhedKalenderHent_I_Document_Complete_With_SOAPENV.xml](/rsu-b2b-sample-client/src/test/resources/VirksomhedKalenderHent_I_Document_Complete_With_SOAPENV.xml) ### Legal Entity Identification @@ -342,8 +337,6 @@ The RSU B2B Gateway generates two types of error code. Error code | Error Description (EN) | Error Description (DA) ------------ | ------------- | ----------------------- - 471 | There are no VAT returns for the company | Der findes ingen angivelser for virksomheden - 475 | There are no VAT returns for the requested periods in which the company has reported | Der findes ingen angivelser for de ønskede perioder hvor virksomheden har indberettet 4801 | RSU is not delegated by the legal entity (See [Onboard Legal Entities](#onboard-legal-entities)) | RSU er ikke delegeret af virksomheden 4802 | The VAT period is not open | Ikke åben periode 4803 | The VAT period has not ended | Periode ikke afsluttet @@ -356,43 +349,11 @@ Error code | Error Description (EN) | Error Description (DA) 4817 | The search start date is later than the search end date | Søgedato start er efter søgedatoslut -### Notification codes related to transactions - -The service **ModtagMomsangivelseForeloebig** will for every successful submition of a VAT declaration return a formal notice related to the transaction in the **Advis** section of the **HovedOplysningerSvar/SvarStruktur** structure. Example: - -```xml - - ... - ... - ... - - - 5001 - Dette er en foreløbig ordinær angivelse - - - -``` - -Please observe that notification codes are NOT the same as error codes - -The service will return either one of the two codes: - -Error code | Error Description (EN) | Error Description (DA) ------------- | ------------- | ----------------------- -5001 | This is a preliminary ordinary declaration pending user approval | Dette er en foreløbig ordinær angivelse -5002 | This is a preliminary post declaration pending user approval | Dette er en foreløbig efterangivelse - -The service **MomsangivelseKvitteringHent** will - similar to **ModtagMomsangivelseForeloebig** - return the following notice codes once the user has approved the declaration submitted via **ModtagMomsangivelseForeloebig** via skat.dk: - -Error code | Error Description (EN) | Error Description (DA) ------------- | ------------- | ----------------------- -5003 | The post declaration has now been approved, a receipt is available on skat.dk | Din efterangivelse er nu godkendt, en kvittering er tilgængelig på skat.dk -5004 | The ordinary declaration has now been approved, a receipt is available on skat.dk | Din ordinær angivelse er nu godkendt, en kvittering er tilgængelig på skat.dk - ## About the client -The following is documentation of a sample client for the RSU B2B Web Service Gateway. The sample client is implemented based on the [Apache CXF](http://cxf.apache.org/) framework, the Spring Framework, and Java 8. See `pom.xml` file in this repo for details regarding the current versions of the mentioned frameworks in use. +The following is documentation of a sample client for the RSU B2B Web Service Gateway. The sample client is implemented based on the [Apache CXF](http://cxf.apache.org/) framework, the Spring Framework, and Java 17. See `pom.xml` file in this repo for details regarding the current versions of the mentioned frameworks in use. + +For a **Java 8** based client please take a look at release [v1.3](https://github.com/skat/rsu-b2b-sample-client-java/releases/tag/v1.3) > **Looking for a .NET Core sample?** Skatteforvaltningen provides a sample Web Service Client written in .NET Core > [here](https://github.com/skat/rsu-b2b-sample-client-dotnet). @@ -484,17 +445,14 @@ call the test environment of RSU B2B Web Service Gateway. The parameters (provided as a file named `app.conf`) can be obtained by contacting Skattestyrelsen. -In the following sections we describe two methods for running the sample: - -* **Build and Run** - Clone repo, build repo, and run locally. -* **Run on Tomcat** - Clone repo, build repo, and run on a Tomcat server. +In the following sections we describe a simple method for running the sample. ### Prerequisites -For both methods the following tools are required: +The following tools are required: -* JDK 1.8 -* Maven 3.3 (or above) +* JDK 17 +* Maven 3.9.5 ### Build and Run @@ -519,47 +477,6 @@ Once Jetty is running open URL: http://localhost:8080/rsu-b2b-sample-client-gui ``` -### Run on Tomcat - -Clone this repository. Then execute: - -```sh -$ mvn clean install -``` - -On your **server** create a directory named `rsu-b2b-sample-client-gui`. - -Copy these files to the directory `rsu-b2b-sample-client-gui`: - -``` -rsu-b2b-sample-client-gui/target/rsu-b2b-sample-client-gui--war-exec.jar -rsu-b2b-sample-client/src/main/resources/keystore/client-keystore.jks -rsu-b2b-sample-client/src/main/resources/keystore/server-keystore.jks -``` - -Organize the files as follows: - -``` -rsu-b2b-sample-client-gui/ - rsu-b2b-sample-client-gui--war-exec.jar - keystore/ - client-keystore.jks - server-keystore.jks - app.conf -``` - -Then inside `rsu-b2b-sample-client-gui` run: - -```sh -$ java -jar rsu-b2b-sample-client-gui--war-exec.jar -``` - -Once Tomcat is running open URL: - -``` -http://localhost:8080/rsu-b2b-sample-client-gui -``` - ### Change endpoints If you want to have the test client call the built-in Log Servlet modify `app.conf` and @@ -669,10 +586,10 @@ $ keytool -delete -alias skatserver -keystore client-truststore.jks -storepass s Then you can add the new certificate to the trust store. ```sh -$ keytool -import -alias skatserver -file newcert.crt -keystore client-truststore.jks -storepass storepassword +$ keytool -import -alias skatserver -file emcs-b2b-server-prod-as-of-20171026.crt -keystore client-truststore.jks -storepass storepassword ``` ## References * [Apache CXF](http://cxf.apache.org/) -* [Apache CXF Samples](https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples) +* [Apache CXF Samples](https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples) \ No newline at end of file diff --git a/apache-maven-3.9.5-bin.tar.gz.sha512 b/apache-maven-3.9.5-bin.tar.gz.sha512 new file mode 100644 index 0000000..88ff458 --- /dev/null +++ b/apache-maven-3.9.5-bin.tar.gz.sha512 @@ -0,0 +1 @@ +4810523ba025104106567d8a15a8aa19db35068c8c8be19e30b219a1d7e83bcab96124bf86dc424b1cd3c5edba25d69ec0b31751c136f88975d15406cab3842b apache-maven-3.9.5-bin.tar.gz diff --git a/assets/rsu_sample_gui_snapshot.png b/assets/rsu_sample_gui_snapshot.png index 6912b73..c261d00 100644 Binary files a/assets/rsu_sample_gui_snapshot.png and b/assets/rsu_sample_gui_snapshot.png differ diff --git a/build-tomcat-package.sh b/build-tomcat-package.sh deleted file mode 100755 index b573240..0000000 --- a/build-tomcat-package.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -rm -f rsu-b2b-sample-client-gui-tomcat-dist.zip -rm -rf target -PACKAGE_DIR=target/rsu-b2b-sample-client-gui -mkdir -p $PACKAGE_DIR - - -cp -r rsu-b2b-sample-client/src/main/resources/keystore $PACKAGE_DIR/ -cp rsu-b2b-sample-client-gui/target/rsu-b2b-sample-client-gui-*.war $PACKAGE_DIR/ -cp rsu-b2b-sample-client-gui/target/rsu-b2b-sample-client-gui-*-war-exec.jar $PACKAGE_DIR/ -cp rsu-b2b-sample-client-gui/src/main/resources/reference.conf $PACKAGE_DIR/app.conf -cp start-tomcat.sh $PACKAGE_DIR/ - -cd target -zip -r rsu-b2b-sample-client-gui-tomcat-dist.zip rsu-b2b-sample-client-gui -cd ../ -unzip -t target/rsu-b2b-sample-client-gui-tomcat-dist.zip diff --git a/jetty-run.sh b/jetty-run.sh index 5e80634..3bac0ae 100755 --- a/jetty-run.sh +++ b/jetty-run.sh @@ -1,8 +1,8 @@ #!/bin/sh # remove symbolic link -rm -f keystore +# rm -f keystore # create symbolic link -ln -s rsu-b2b-sample-client/src/main/resources/keystore keystore +# ln -s rsu-b2b-sample-client/src/main/resources/keystore keystore mvn jetty:run -f rsu-b2b-sample-client-gui/pom.xml \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2c25d35..3d4dc66 100644 --- a/pom.xml +++ b/pom.xml @@ -1,31 +1,41 @@ - - 4.0.0 - dk.skat.rsu.b2b.sample - rsu-b2b-sample-client-java - pom - 1.3 - rsu-b2b-sample-client-java - http://www.skat.dk - - rsu-b2b-sample-client - rsu-b2b-sample-client-gui - - - UTF-8 - UTF-8 - - - - - - - - - com.typesafe - config - 1.3.0 - - - + 4.0.0 + dk.skat.rsu.b2b.sample + rsu-b2b-sample-client-java + pom + 1.4 + rsu-b2b-sample-client-java + http://www.skat.dk + + rsu-b2b-sample-client + rsu-b2b-sample-client-gui + + + UTF-8 + UTF-8 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 17 + 17 + + + + + + + + com.typesafe + config + 1.4.2 + + + diff --git a/prep-local-tomcat.sh b/prep-local-tomcat.sh deleted file mode 100755 index b948f45..0000000 --- a/prep-local-tomcat.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cp -r rsu-b2b-sample-client/src/main/resources/keystore rsu-b2b-sample-client-gui/target/keystore -cp app.conf rsu-b2b-sample-client-gui/target -cp start-tomcat.sh rsu-b2b-sample-client-gui/target \ No newline at end of file diff --git a/rsu-b2b-sample-client-gui/pom.xml b/rsu-b2b-sample-client-gui/pom.xml index 37bb7f7..e4870a3 100644 --- a/rsu-b2b-sample-client-gui/pom.xml +++ b/rsu-b2b-sample-client-gui/pom.xml @@ -1,107 +1,131 @@ - - 4.0.0 - - dk.skat.rsu.b2b.sample - rsu-b2b-sample-client-java - 1.3 - - rsu-b2b-sample-client-gui - war - rsu-b2b-sample-client-gui - - - - org.eclipse.jetty - jetty-maven-plugin - 9.4.8.v20171121 - - 10 - - /rsu-b2b-sample-client-gui - - - - - org.apache.tomcat.maven - tomcat8-maven-plugin - 3.0-r1756463 - - - tomcat-run - - exec-war-only - - package - - - - - - - dk.skat.rsu.b2b.sample - rsu-b2b-sample-client-gui - war - 1.0 - - / - - - - true - - - - - - - - - + 4.0.0 + + dk.skat.rsu.b2b.sample + rsu-b2b-sample-client-java + 1.4 + + rsu-b2b-sample-client-gui + war + rsu-b2b-sample-client-gui + + + + org.eclipse.jetty + jetty-maven-plugin + 11.0.11 + + 1 + + /rsu-b2b-sample-client-gui + + + + + + - - junit - junit - 4.13.1 - test - - - org.apache.struts - struts2-core - 6.3.0.1 - - - commons-io - commons-io - 2.7 - - - commons-fileupload - commons-fileupload - 1.5 - - - javax.servlet - servlet-api - 2.5 - provided - - - com.typesafe - config - - - dk.skat.rsu.b2b.sample - rsu-b2b-sample-client - ${project.version} - + + org.springframework + spring-framework-bom + 6.0.10 + pom + import + + + org.springframework.security + spring-security-bom + pom + import + 6.0.2 + + + org.slf4j + slf4j-api + 2.0.6 + - - - artifacts.alfresco.com - https://artifacts.alfresco.com/nexus/content/repositories/public/ - - + + + + org.springframework + spring-webmvc + + + junit + junit + 4.13.2 + test + + + org.springframework.webflow + spring-webflow + 3.0.0 + + + commons-io + commons-io + 2.11.0 + + + jakarta.servlet + jakarta.servlet-api + 6.0.0 + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api + provided + 4.0.0.Beta2 + + + org.springframework.security + spring-security-web + + + org.springframework.security + spring-security-taglibs + + + org.springframework.security + spring-security-config + + + org.hibernate.validator + hibernate-validator + 8.0.0.Final + + + jakarta.validation + jakarta.validation-api + 3.0.2 + + + com.typesafe + config + + + dk.skat.rsu.b2b.sample + rsu-b2b-sample-client + ${project.version} + + + org.thymeleaf + thymeleaf + 3.1.1.RELEASE + + + org.thymeleaf + thymeleaf-spring6 + 3.1.1.RELEASE + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity6 + 3.1.0.RELEASE + + diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadReceipt.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadController.java similarity index 55% rename from rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadReceipt.java rename to rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadController.java index 0e690b0..d8c7757 100644 --- a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadReceipt.java +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/DownloadController.java @@ -1,28 +1,19 @@ package dk.skat.rsu.b2b.sample.mvc; import com.google.common.base.Strings; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; -/** - * DownloadReceipt - Simple download servlet - Minimal efforts put into this. - * However, it does name receipts by the transaction id - makes it easier to find - * the receipt in the Download folder. - * - * @author SKAT - * @since 1.0 - */ -public class DownloadReceipt extends HttpServlet { +@Controller +public class DownloadController { - /** - * Download receipt stored in memory. - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { - String transactionId = request.getParameter("transactionId"); + @GetMapping("/download/{transactionId}") + public void download(@PathVariable String transactionId, HttpServletResponse response) throws IOException { if (Strings.isNullOrEmpty(transactionId)) { response.sendError(HttpServletResponse.SC_BAD_REQUEST); return; @@ -41,6 +32,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t byte[] result = receipt.getReceipt(); out.write(result); out.flush(); - } + } } diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/LocalLogServlet.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/LocalLogServlet.java deleted file mode 100644 index 4af98f4..0000000 --- a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/LocalLogServlet.java +++ /dev/null @@ -1,43 +0,0 @@ -package dk.skat.rsu.b2b.sample.mvc; - -import org.apache.commons.io.IOUtils; - -import java.io.*; -import java.util.logging.Logger; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.servlet.http.HttpServlet; - -/** - * LocalLogServlet - Just an endpoint to receive a SOAP POST on localhost. - * The response cannot be processed by the sample clients, but will return - * a soap fault. - * - * @author SKAT - * @since 1.0 - */ -public class LocalLogServlet extends HttpServlet { - - private static final Logger LOGGER = Logger.getLogger(LocalLogServlet.class.getName()); - - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - - // Set response content type - response.setContentType("text/xml"); - String requestAsString = IOUtils.toString(request.getReader()); - LOGGER.info("Received request: " + requestAsString); - String responseAsString = "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "env:Server\n" + - "Request received, logged, but not processed. See logs for request submitted.\n" + - "\n" + - "\n" + - ""; - PrintWriter out = response.getWriter(); - out.println(responseAsString); - } -} diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestAction.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestAction.java index bcd324e..195bc1d 100644 --- a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestAction.java +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestAction.java @@ -1,68 +1,53 @@ package dk.skat.rsu.b2b.sample.mvc; -import com.opensymphony.xwork2.ActionSupport; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.AdvisStrukturType; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.FejlStrukturType; -import dk.skat.rsu.b2b.sample.ModtagMomsangivelseForeloebigClient; -import dk.skat.rsu.b2b.sample.MomsangivelseKvitteringHentClient; -import dk.skat.rsu.b2b.sample.MomsangivelseKvitteringHentMarshalling; -import dk.skat.rsu.b2b.sample.VirksomhedKalenderHentClient; +import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerSvarType; +import dk.skat.rsu.b2b.sample.*; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.Unmarshaller; import oio.skat.nemvirksomhed.ws._1_0.ModtagMomsangivelseForeloebigOType; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentIType; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentOType; +import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentOType; import org.apache.commons.io.IOUtils; -import org.apache.struts2.ServletActionContext; +import org.springframework.binding.message.MessageBuilder; +import org.springframework.binding.message.MessageContext; import org.springframework.util.StringUtils; -import javax.servlet.http.HttpServletRequest; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Unmarshaller; import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; +import java.util.logging.Logger; +import java.io.Serializable; /** * ServiceTestAction * * @author SKAT * @since 1.0 */ -public class ServiceTestAction extends ActionSupport { + +public class ServiceTestAction implements Serializable { private static final Logger LOGGER = Logger.getLogger(ServiceTestAction.class.getName()); private ServiceTestForm serviceTestForm; - private String serviceResponse; - - public String getServiceResponse() { - return serviceResponse; - } - - public void setServiceResponse(String serviceResponse) { - this.serviceResponse = serviceResponse; - } - - public ServiceTestForm getServiceTestForm() { - return serviceTestForm; - } public void setServiceTestForm(ServiceTestForm serviceTestForm) { this.serviceTestForm = serviceTestForm; } - public String init() + public TestResponse execute(ServiceTestForm serviceTestForm1, MessageContext context) throws Exception { - this.serviceTestForm = new ServiceTestForm(); - return SUCCESS; - } + TestResponse testResponse = new TestResponse(); - @Override - public String execute() - throws Exception { + testResponse.setDeepLink(""); + testResponse.setTransactionId(""); - if (serviceTestForm == null){ - this.serviceTestForm = new ServiceTestForm(); + if (this.serviceTestForm == null) { + this.setServiceTestForm(serviceTestForm1); } LOGGER.info("Testing service : " + this.serviceTestForm.getService()); @@ -82,7 +67,6 @@ public String execute() String requestAsString = this.serviceTestForm.getRequest(); String configurationPrefix = "endpoints." + environment + "." + service; - String serviceResponse = ""; try { String endpoint = ConfigHelper.getConfiguration().getString(configurationPrefix); @@ -94,19 +78,29 @@ public String execute() if ("VirksomhedKalenderHent".equals(service)) { VirksomhedKalenderHentClient client = new VirksomhedKalenderHentClient(endpoint, policy); - serviceResponse = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); + VirksomhedKalenderHentOType out = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); + serviceResponse = VirksomhedKalenderHentMarshalling.toString(out); + if (out != null && out.getHovedOplysningerSvar() != null) { + addMessages(out.getHovedOplysningerSvar(), context); + } } if ("ModtagMomsangivelseForeloebig".equals(service)) { ModtagMomsangivelseForeloebigClient client = new ModtagMomsangivelseForeloebigClient(endpoint, policy); - serviceResponse = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); + ModtagMomsangivelseForeloebigOType out = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); + serviceResponse = ModtagMomsangivelseForeloebigMarshalling.toString(out); + if (out != null && out.getHovedOplysningerSvar() != null) { + addMessages(out.getHovedOplysningerSvar(), context); + } + // Get receipt and store PDF in memory for later download InputStream inputStream = IOUtils.toInputStream(serviceResponse, "UTF-8"); JAXBContext jc = JAXBContext.newInstance(ModtagMomsangivelseForeloebigOType.class); Unmarshaller unmarshaller = jc.createUnmarshaller(); ModtagMomsangivelseForeloebigOType asObject = (ModtagMomsangivelseForeloebigOType) unmarshaller.unmarshal(inputStream); if (asObject.getDybtlink() != null) { - addActionMessage("Confirm Link: " + asObject.getDybtlink().getUrlIndicator() + ""); + testResponse.setDeepLink("Confirm Link: " + asObject.getDybtlink().getUrlIndicator() + ""); } + } if ("MomsangivelseKvitteringHent".equals(service)) { MomsangivelseKvitteringHentClient client = new MomsangivelseKvitteringHentClient(endpoint, policy); @@ -119,27 +113,25 @@ public String execute() MomsangivelseKvitteringHentIType requestAsObject = MomsangivelseKvitteringHentMarshalling.toObject(requestAsString); String receiptTransactionId = requestAsObject.getTransaktionIdentifier(); - serviceResponse = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); - + MomsangivelseKvitteringHentOType asObject = client.invoke(requestAsString, cert, this.serviceTestForm.isOverrideTxInfo()); + serviceResponse = MomsangivelseKvitteringHentMarshalling.toString(asObject); // Get receipt and store PDF in memory for later download - InputStream inputStream = IOUtils.toInputStream(serviceResponse, "UTF-8"); - JAXBContext jc = JAXBContext.newInstance(MomsangivelseKvitteringHentOType.class); - Unmarshaller unmarshaller = jc.createUnmarshaller(); - MomsangivelseKvitteringHentOType asObject = (MomsangivelseKvitteringHentOType) unmarshaller.unmarshal(inputStream); - - List advisStrukturOrFejlStruktur = asObject.getHovedOplysningerSvar().getSvarStruktur().getAdvisStrukturOrFejlStruktur(); boolean failed = false; - for (Object o : advisStrukturOrFejlStruktur) { - if (o instanceof AdvisStrukturType) { - AdvisStrukturType advisStrukturType = (AdvisStrukturType) o; - addActionMessage(advisStrukturType.getAdvisIdentifikator().toString() + " : " + advisStrukturType.getAdvisTekst()); - failed = true; - } - if (o instanceof FejlStrukturType) { - FejlStrukturType fejlStrukturType = (FejlStrukturType) o; - String message = fejlStrukturType.getFejlIdentifikator().toString() + fejlStrukturType.getFejlTekst(); - addActionError(fejlStrukturType.getFejlIdentifikator().toString() + " : " + fejlStrukturType.getFejlTekst()); - failed = true; + if (asObject != null && asObject.getHovedOplysningerSvar() != null) { + addMessages(asObject.getHovedOplysningerSvar(), context); + List advisStrukturOrFejlStruktur = asObject.getHovedOplysningerSvar().getSvarStruktur().getAdvisStrukturOrFejlStruktur(); + for (Object o : advisStrukturOrFejlStruktur) { + if (o instanceof AdvisStrukturType) { + AdvisStrukturType advisStrukturType = (AdvisStrukturType) o; + String advisId = advisStrukturType.getAdvisIdentifikator().toString(); + if ("4810".equals(advisId) || "4812".equals(advisId)) { + // 4810 = VAT return has yet to be approved in self service app. + failed = true; + } + } + if (o instanceof FejlStrukturType) { + failed = true; + } } } if (!failed && asObject.getPDFkvittering() != null) { @@ -147,21 +139,42 @@ public String execute() receipt.setTransactionId(receiptTransactionId); receipt.setReceipt(asObject.getPDFkvittering().getDokumentFilIndholdData()); ReceiptsStorage.put(receipt); - HttpServletRequest request = ServletActionContext.getRequest(); - String contextPath = request.getContextPath(); - addActionMessage("Download receipt (PDF): Download PDF"); + testResponse.setTransactionId(receiptTransactionId); } } } catch (Exception e) { - LOGGER.log(Level.SEVERE, "Error", e); - serviceResponse = e.getMessage(); - addActionMessage("error.test.request.failed" + serviceResponse); + context.addMessage(new MessageBuilder().info().source("ERROR") + .defaultText("Error occurred - see below").build()); + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + e.printStackTrace(pw); + serviceResponse = sw.toString(); + pw.close(); + sw.close(); } - this.serviceResponse = serviceResponse; + testResponse.setServiceResponse(serviceResponse); LOGGER.info("response = " + serviceResponse); - return SUCCESS; + return testResponse; } - + private void addMessages(HovedOplysningerSvarType hovedOplysningerSvarType, MessageContext context) { + List advisStrukturOrFejlStruktur = hovedOplysningerSvarType.getSvarStruktur().getAdvisStrukturOrFejlStruktur(); + for (Object o : advisStrukturOrFejlStruktur) { + if (o instanceof AdvisStrukturType) { + AdvisStrukturType advisStrukturType = (AdvisStrukturType) o; + String advisId = advisStrukturType.getAdvisIdentifikator().toString(); + String advisText = advisStrukturType.getAdvisTekst(); + context.addMessage(new MessageBuilder().info().source("INFO") + .defaultText(advisId + " - " + advisText).build()); + } + if (o instanceof FejlStrukturType) { + FejlStrukturType fejlStrukturType = (FejlStrukturType) o; + String fejlId = fejlStrukturType.getFejlIdentifikator().toString(); + String fejlText = fejlStrukturType.getFejlTekst(); + context.addMessage(new MessageBuilder().info().source("ERROR") + .defaultText(fejlId + " - " + fejlText).build()); + } + } + } } diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestForm.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestForm.java index 9c6e595..3a59cfe 100644 --- a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestForm.java +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/ServiceTestForm.java @@ -1,7 +1,11 @@ package dk.skat.rsu.b2b.sample.mvc; import com.typesafe.config.Config; +import org.springframework.core.io.ClassPathResource; + +import java.io.*; import java.util.*; +import java.util.stream.Collectors; /** * ServiceTestForm @@ -9,7 +13,8 @@ * @author SKAT * @since 1.0 */ -public class ServiceTestForm { + +public class ServiceTestForm implements Serializable { private String environment; @@ -154,70 +159,25 @@ public ServiceTestForm() { this.environment = config.getString("default.environment"); this.policy = config.getString("default.policy"); this.certificateAlias = config.getString("default.certificateAlias"); - - String virksomhedSENummerIdentifikator = "12345678"; - // Just a sample request to get started! - requestMMF = "\n" + - "\n" + - " \n" + - " 62c55920-e4d6-4b1f-a482-5bf201bfbd7e\n" + - " 2022-02-21T14:41:26.478+01:00\n" + - " \n" + - " \n" + - " \n" + - " " + virksomhedSENummerIdentifikator + "\n" + - " \n" + - " \n" + - " 2017-07-01+02:00\n" + - " 2017-09-30+02:00\n" + - " \n" + - " \n" + - " 1500\n" + - " 500\n" + - " 2000\n" + - " \n" + - " \n" + - ""; - - requestMKH = "\n" + - "\n" + - " \n" + - " 53919099-3b28-45d5-81f3-d7fc371e0c25\n" + - " 2022-02-21T14:18:03.431+01:00\n" + - " \n" + - " f3f772b0-dc02-4af3-bfde-16f1fa04804f\n" + - " \n" + - " " + virksomhedSENummerIdentifikator + "\n" + - " \n" + - "\n"; - - requestVKH = "\n" + - "\n" + - " \n" + - " 33593B0D-E7CF-40A2-AE76-530B72DE6AE3\n" + - " 2017-04-24T12:00:00.146+02:00\n" + - " \n" + - " " + virksomhedSENummerIdentifikator + "\n" + - " qwerty\n" + - " \n" + - " 2017-01-01\n" + - " 2017-03-31\n" + - " \n" + - ""; - + requestMMF = getDocument("ModtagMomsangivelseForeloebig_I_Sample.xml"); + requestMKH = getDocument("MomsangivelseKvitteringHent_I_Sample.xml"); + requestVKH = getDocument("VirksomhedKalenderHent_I_Sample.xml"); request = requestVKH; } catch (Exception e) { e.printStackTrace(); } } + + private String getDocument(String filename) throws IOException { + String document = ""; + InputStream resource = new ClassPathResource( + filename).getInputStream(); + try ( BufferedReader reader = new BufferedReader( + new InputStreamReader(resource)) ) { + document = reader.lines() + .collect(Collectors.joining("\n")); + } + return document; + } } diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/TestResponse.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/TestResponse.java new file mode 100644 index 0000000..6ca12cb --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/TestResponse.java @@ -0,0 +1,34 @@ +package dk.skat.rsu.b2b.sample.mvc; + +import java.io.Serializable; + +public class TestResponse implements Serializable { + private String serviceResponse; + private String transactionId; + private String deepLink; + + public String getDeepLink() { + return deepLink; + } + + public void setDeepLink(String deepLink) { + this.deepLink = deepLink; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getServiceResponse() { + return serviceResponse; + } + + public void setServiceResponse(String serviceResponse) { + this.serviceResponse = serviceResponse; + } + +} diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/DispatcherServletInitializer.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/DispatcherServletInitializer.java new file mode 100644 index 0000000..3c42884 --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/DispatcherServletInitializer.java @@ -0,0 +1,34 @@ +package dk.skat.rsu.b2b.sample.mvc.configuration; + +import jakarta.servlet.Filter; + +import org.springframework.web.filter.HiddenHttpMethodFilter; +import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; + +public class DispatcherServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { + + @Override + protected Class[] getRootConfigClasses() { + return new Class[] { + WebMvcConfig.class, + WebFlowConfig.class + }; + } + + @Override + protected Class[] getServletConfigClasses() { + return null; + } + + @Override + protected String[] getServletMappings() { + return new String[] { "/" }; + } + + @Override + protected Filter[] getServletFilters() { + return new Filter[] { new HiddenHttpMethodFilter() }; + } + +} + diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebFlowConfig.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebFlowConfig.java new file mode 100644 index 0000000..a844459 --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebFlowConfig.java @@ -0,0 +1,59 @@ +package dk.skat.rsu.b2b.sample.mvc.configuration; + +import java.util.Collections; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.webflow.config.AbstractFlowConfiguration; +import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; +import org.springframework.webflow.engine.builder.support.FlowBuilderServices; +import org.springframework.webflow.executor.FlowExecutor; +import org.springframework.webflow.mvc.builder.MvcViewFactoryCreator; +import org.springframework.webflow.security.SecurityFlowExecutionListener; + +@Configuration +public class WebFlowConfig extends AbstractFlowConfiguration { + + @Autowired + private WebMvcConfig webMvcConfig; + + @Bean + public FlowExecutor flowExecutor() { + return getFlowExecutorBuilder(flowRegistry()) + .addFlowExecutionListener(new SecurityFlowExecutionListener(), "*") + .build(); + } + + @Bean + public FlowDefinitionRegistry flowRegistry() { + return getFlowDefinitionRegistryBuilder(flowBuilderServices()) + .setBasePath("/WEB-INF/flows") + .addFlowLocationPattern("/**/*-flow.xml").build(); + } + + @Bean + public FlowBuilderServices flowBuilderServices() { + return getFlowBuilderServicesBuilder() + .setViewFactoryCreator(mvcViewFactoryCreator()) + .setValidator(validator()) + .setDevelopmentMode(true) + .build(); + } + + @Bean + public MvcViewFactoryCreator mvcViewFactoryCreator() { + MvcViewFactoryCreator factoryCreator = new MvcViewFactoryCreator(); + factoryCreator.setViewResolvers(Collections.singletonList(this.webMvcConfig.thymeleafViewResolver())); + factoryCreator.setUseSpringBeanBinding(true); + return factoryCreator; + } + + @Bean + public LocalValidatorFactoryBean validator() { + return new LocalValidatorFactoryBean(); + } + +} diff --git a/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebMvcConfig.java b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebMvcConfig.java new file mode 100644 index 0000000..ed6d9cc --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/java/dk/skat/rsu/b2b/sample/mvc/configuration/WebMvcConfig.java @@ -0,0 +1,101 @@ +package dk.skat.rsu.b2b.sample.mvc.configuration; + +import java.util.LinkedHashSet; +import java.util.Set; + +import jakarta.servlet.ServletContext; +import org.springframework.context.annotation.ComponentScan; +import org.thymeleaf.dialect.IDialect; +import org.thymeleaf.extras.springsecurity6.dialect.SpringSecurityDialect; +import org.thymeleaf.spring6.SpringTemplateEngine; +import org.thymeleaf.spring6.webflow.view.AjaxThymeleafViewResolver; +import org.thymeleaf.spring6.webflow.view.FlowAjaxThymeleafView; +import org.thymeleaf.templateresolver.WebApplicationTemplateResolver; +import org.thymeleaf.web.IWebApplication; +import org.thymeleaf.web.servlet.JakartaServletWebApplication; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.context.ServletContextAware; +import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.webflow.mvc.servlet.FlowHandlerAdapter; +import org.springframework.webflow.mvc.servlet.FlowHandlerMapping; + +@EnableWebMvc +@Configuration +@ComponentScan({ + "dk.skat.rsu.b2b.sample.mvc" +}) +public class WebMvcConfig implements WebMvcConfigurer, ServletContextAware { + + @Autowired + private WebFlowConfig webFlowConfig; + + private ServletContext servletContext; + + + public void setServletContext(ServletContext servletContext) { + this.servletContext = servletContext; + } + + + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/resources/**").addResourceLocations("/", "classpath:/META-INF/web-resources/"); + } + + + public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { + configurer.enable(); + } + + @Bean + public FlowHandlerMapping flowHandlerMapping() { + FlowHandlerMapping handlerMapping = new FlowHandlerMapping(); + handlerMapping.setOrder(-1); + handlerMapping.setFlowRegistry(this.webFlowConfig.flowRegistry()); + return handlerMapping; + } + + @Bean + public FlowHandlerAdapter flowHandlerAdapter() { + FlowHandlerAdapter handlerAdapter = new FlowHandlerAdapter(); + handlerAdapter.setFlowExecutor(this.webFlowConfig.flowExecutor()); + handlerAdapter.setSaveOutputToFlashScopeOnRedirect(true); + return handlerAdapter; + } + + @Bean + public AjaxThymeleafViewResolver thymeleafViewResolver() { + AjaxThymeleafViewResolver viewResolver = new AjaxThymeleafViewResolver(); + viewResolver.setViewClass(FlowAjaxThymeleafView.class); + viewResolver.setTemplateEngine(templateEngine()); + return viewResolver; + } + + @Bean + public SpringTemplateEngine templateEngine(){ + + Set dialects = new LinkedHashSet(); + dialects.add(new SpringSecurityDialect()); + + SpringTemplateEngine templateEngine = new SpringTemplateEngine(); + templateEngine.setTemplateResolver(templateResolver()); + templateEngine.setAdditionalDialects(dialects); + return templateEngine; + } + + @Bean + public WebApplicationTemplateResolver templateResolver() { + IWebApplication application = JakartaServletWebApplication.buildApplication(this.servletContext); + WebApplicationTemplateResolver resolver = new WebApplicationTemplateResolver(application); + resolver.setPrefix("/WEB-INF/"); + resolver.setSuffix(".html"); + resolver.setTemplateMode("HTML5"); + return resolver; + } + +} diff --git a/rsu-b2b-sample-client-gui/src/main/resources/ModtagMomsangivelseForeloebig_I_Sample.xml b/rsu-b2b-sample-client-gui/src/main/resources/ModtagMomsangivelseForeloebig_I_Sample.xml new file mode 100644 index 0000000..0d35283 --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/resources/ModtagMomsangivelseForeloebig_I_Sample.xml @@ -0,0 +1,24 @@ + + + + 62c55920-e4d6-4b1f-a482-5bf201bfbd7e + 2022-02-21T14:41:26.478+01:00 + + + + 12345678 + + + 2017-07-01+02:00 + 2017-09-30+02:00 + + + 1500 + 500 + 2000 + + + \ No newline at end of file diff --git a/rsu-b2b-sample-client-gui/src/main/resources/MomsangivelseKvitteringHent_I_Sample.xml b/rsu-b2b-sample-client-gui/src/main/resources/MomsangivelseKvitteringHent_I_Sample.xml new file mode 100644 index 0000000..1cf11f5 --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/resources/MomsangivelseKvitteringHent_I_Sample.xml @@ -0,0 +1,14 @@ + + + + 53919099-3b28-45d5-81f3-d7fc371e0c25 + 2022-02-21T14:18:03.431+01:00 + + f3f772b0-dc02-4af3-bfde-16f1fa04804f + + 12345678" + + \ No newline at end of file diff --git a/rsu-b2b-sample-client-gui/src/main/resources/VirksomhedKalenderHent_I_Sample.xml b/rsu-b2b-sample-client-gui/src/main/resources/VirksomhedKalenderHent_I_Sample.xml new file mode 100644 index 0000000..5dda5aa --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/resources/VirksomhedKalenderHent_I_Sample.xml @@ -0,0 +1,16 @@ + + + + 33593B0D-E7CF-40A2-AE76-530B72DE6AE3 + 2017-04-24T12:00:00.146+02:00 + + 12345678 + qwerty + + 2017-01-01 + 2017-03-31 + + \ No newline at end of file diff --git a/rsu-b2b-sample-client-gui/src/main/resources/dk/skat/rsu/b2b/mvc/Messages.properties b/rsu-b2b-sample-client-gui/src/main/resources/dk/skat/rsu/b2b/mvc/Messages.properties deleted file mode 100644 index c8b0083..0000000 --- a/rsu-b2b-sample-client-gui/src/main/resources/dk/skat/rsu/b2b/mvc/Messages.properties +++ /dev/null @@ -1,6 +0,0 @@ -error.test.request.required = Please provide a service request -error.test.request.failed = Request failed due to: {0} -error.test.response.failed = Service responded: {0} -lastResponse = {0} -downloadReceipt = {0} -confirmUrl = {0} \ No newline at end of file diff --git a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/flows/app/rsu-flow.xml b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/flows/app/rsu-flow.xml new file mode 100644 index 0000000..79d779c --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/flows/app/rsu-flow.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/views/index.html b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/views/index.html new file mode 100644 index 0000000..f16d614 --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/views/index.html @@ -0,0 +1,197 @@ + + + + + + + + + RSU Sample GUI + + + + + + + + + +
+ +
+
  +
+
+ +
+ +
+ +
+ +
+ Service Request +
+
+ +
+ + + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ Service Response +
+ +
+ +
+ +
+
+ +
+ + + + + + +
+ +
+
+
+ +
+ +
+ +
+ + + + + + + + + + + + diff --git a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/web.xml b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 0177c58..0000000 --- a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - FileUploadServletExample - - struts2 - org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter - - - - struts2 - /app/* - - - - DownloadReceipt - dk.skat.rsu.b2b.sample.mvc.DownloadReceipt - - - DownloadReceipt - /receipt - - - - log - dk.skat.rsu.b2b.sample.mvc.LocalLogServlet - - - - log - /log - - - - WEB-INF/start.jsp - - diff --git a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/weblogic.xml b/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/weblogic.xml deleted file mode 100644 index 0370c0f..0000000 --- a/rsu-b2b-sample-client-gui/src/main/webapp/WEB-INF/weblogic.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - rsu-b2b-sample-client-gui - - - /* - UTF-8 - - - diff --git a/rsu-b2b-sample-client-gui/src/main/webapp/index.html b/rsu-b2b-sample-client-gui/src/main/webapp/index.html new file mode 100644 index 0000000..8d7e96d --- /dev/null +++ b/rsu-b2b-sample-client-gui/src/main/webapp/index.html @@ -0,0 +1,5 @@ + + + + + diff --git a/rsu-b2b-sample-client/README.md b/rsu-b2b-sample-client/README.md new file mode 100644 index 0000000..141bcab --- /dev/null +++ b/rsu-b2b-sample-client/README.md @@ -0,0 +1,7 @@ +This module compiles and runs with Java 17. + +Requirements: + +* Java 17 +* Apache Maven 3.9.5 +* Put **app.conf** inside root of the *r*su-b2b-sample-client** module \ No newline at end of file diff --git a/rsu-b2b-sample-client/pom.xml b/rsu-b2b-sample-client/pom.xml index 6c105fd..2f2267d 100644 --- a/rsu-b2b-sample-client/pom.xml +++ b/rsu-b2b-sample-client/pom.xml @@ -1,159 +1,185 @@ - - 4.0.0 - - dk.skat.rsu.b2b.sample - rsu-b2b-sample-client-java - 1.3 - - rsu-b2b-sample-client - jar - rsu-b2b-sample-client - - 3.1.9 - 5.3.27 - - - - org.apache.cxf - cxf-rt-frontend-jaxws - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http-jetty - ${cxf.version} - - - org.apache.cxf - cxf-rt-ws-security - ${cxf.version} - - - org.apache.cxf - cxf-rt-ws-policy - ${cxf.version} - - - org.springframework - spring-core - ${cxf.spring.version} - - - org.springframework - spring-beans - ${cxf.spring.version} - - - org.springframework - spring-context - ${cxf.spring.version} - - - - commons-io - commons-io - 2.7 - - - org.slf4j - jcl-over-slf4j - 1.7.22 - - - junit - junit - 4.13.1 - test - - - com.typesafe - config - - - - - - - org.apache.cxf - cxf-codegen-plugin - 3.1.9 - - - generate-sources - generate-sources - - ${project.build.directory}/generated/cxf - - - ${basedir}/src/main/resources/VirksomhedKalenderHent/VirksomhedKalenderHent.wsdl - classpath:VirksomhedKalenderHent/VirksomhedKalenderHent.wsdl - - - ${basedir}/src/main/resources/ModtagMomsangivelseForeloebig/ModtagMomsangivelseForeloebig.wsdl - classpath:ModtagMomsangivelseForeloebig/ModtagMomsangivelseForeloebig.wsdl - - - ${basedir}/src/main/resources/MomsangivelseKvitteringHent/MomsangivelseKvitteringHent.wsdl - classpath:MomsangivelseKvitteringHent/MomsangivelseKvitteringHent.wsdl - - - - - wsdl2java - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - generate-sources - - run - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - add-source - generate-sources - - add-source - - - - target/generated/cxf - - - - - - - + 4.0.0 + + dk.skat.rsu.b2b.sample + rsu-b2b-sample-client-java + 1.4 + + rsu-b2b-sample-client + jar + rsu-b2b-sample-client + + 4.0.0 + 6.0.6 + + + + org.apache.cxf + cxf-rt-frontend-jaxws + ${cxf.version} + + + org.apache.cxf + cxf-rt-transports-http + ${cxf.version} + + + org.apache.cxf + cxf-rt-transports-http-jetty + ${cxf.version} + + + org.apache.cxf + cxf-rt-ws-security + ${cxf.version} + + + org.ehcache + ehcache + + + + + org.apache.cxf + cxf-rt-ws-policy + ${cxf.version} + + + org.springframework + spring-core + ${cxf.spring.version} + + + org.springframework + spring-beans + ${cxf.spring.version} + + + org.springframework + spring-context + ${cxf.spring.version} + + + + commons-io + commons-io + 2.11.0 + + + org.slf4j + jcl-over-slf4j + 2.0.5 + + + junit + junit + 4.13.2 + test + + + com.typesafe + config + 1.4.2 + + + + + + + org.apache.cxf + cxf-codegen-plugin + ${cxf.version} + + + generate-sources + generate-sources + + ${project.build.directory}/generated/cxf + + + + ${basedir}/src/main/resources/VirksomhedKalenderHent/VirksomhedKalenderHent.wsdl + + + classpath:VirksomhedKalenderHent/VirksomhedKalenderHent.wsdl + + + + + ${basedir}/src/main/resources/ModtagMomsangivelseForeloebig/ModtagMomsangivelseForeloebig.wsdl + + + classpath:ModtagMomsangivelseForeloebig/ModtagMomsangivelseForeloebig.wsdl + + + + + ${basedir}/src/main/resources/MomsangivelseKvitteringHent/MomsangivelseKvitteringHent.wsdl + + + classpath:MomsangivelseKvitteringHent/MomsangivelseKvitteringHent.wsdl + + + + + + wsdl2java + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + generate-sources + + run + + + + + + + + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + add-source + generate-sources + + add-source + + + + target/generated/cxf + + + + + + + diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigClient.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigClient.java index 5620bb9..15d8762 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigClient.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigClient.java @@ -1,14 +1,14 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.ws.BindingProvider; import oio.skat.nemvirksomhed.ws._1_0.ModtagMomsangivelseForeloebigIType; import oio.skat.nemvirksomhed.ws._1_0.ModtagMomsangivelseForeloebigOType; import oio.skat.nemvirksomhed.ws._1_0_0.ModtagMomsangivelseForeloebigServiceBindingQSService; import oio.skat.nemvirksomhed.ws._1_0_0.ModtagMomsangivelseForeloebigServicePortType; import org.apache.commons.io.IOUtils; -import javax.xml.bind.JAXBException; import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.ws.BindingProvider; import java.io.IOException; import java.io.InputStream; import java.util.logging.Logger; @@ -51,7 +51,7 @@ public ModtagMomsangivelseForeloebigClient(String endpointURL, String policy) { * @throws JAXBException N/A * @throws DatatypeConfigurationException N/A */ - public String invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) + public ModtagMomsangivelseForeloebigOType invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) throws IOException, JAXBException, DatatypeConfigurationException { configureBus(certicateAlias); @@ -73,6 +73,6 @@ public String invoke(String document, String certicateAlias, boolean overrideHov } ModtagMomsangivelseForeloebigOType out = port.getModtagMomsangivelseForeloebig(modtagMomsangivelseForeloebigIType); - return ModtagMomsangivelseForeloebigMarshalling.toString(out); + return out; } } diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigMarshalling.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigMarshalling.java index 1dbe434..10c5e0b 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigMarshalling.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/ModtagMomsangivelseForeloebigMarshalling.java @@ -1,12 +1,12 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import oio.skat.nemvirksomhed.ws._1_0.ModtagMomsangivelseForeloebigIType; import oio.skat.nemvirksomhed.ws._1_0.ModtagMomsangivelseForeloebigOType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; import java.io.InputStream; import java.io.StringWriter; diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentClient.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentClient.java index bbd0223..75974a1 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentClient.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentClient.java @@ -1,14 +1,14 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.ws.BindingProvider; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentIType; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentOType; import oio.skat.nemvirksomhed.ws._1_0_0.MomsangivelseKvitteringHentServiceBindingQSService; import oio.skat.nemvirksomhed.ws._1_0_0.MomsangivelseKvitteringHentServicePortType; import org.apache.commons.io.IOUtils; -import javax.xml.bind.JAXBException; import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.ws.BindingProvider; import java.io.IOException; import java.io.InputStream; import java.util.logging.Logger; @@ -51,7 +51,7 @@ public MomsangivelseKvitteringHentClient(String endpointURL, String policy) { * @throws JAXBException N/A * @throws DatatypeConfigurationException N/A */ - public String invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) + public MomsangivelseKvitteringHentOType invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) throws IOException, DatatypeConfigurationException, JAXBException { configureBus(certicateAlias); @@ -73,7 +73,7 @@ public String invoke(String document, String certicateAlias, boolean overrideHov } MomsangivelseKvitteringHentOType out = port.getMomsangivelseKvitteringHent(momsangivelseKvitteringHentIType); - return MomsangivelseKvitteringHentMarshalling.toString(out); + return out; } } diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentMarshalling.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentMarshalling.java index 7db3c10..2c113ed 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentMarshalling.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/MomsangivelseKvitteringHentMarshalling.java @@ -1,13 +1,13 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentIType; import oio.skat.nemvirksomhed.ws._1_0.MomsangivelseKvitteringHentOType; import org.apache.commons.io.IOUtils; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClient.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClient.java index 6633ec1..5dbedda 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClient.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClient.java @@ -1,13 +1,13 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.ws.BindingProvider; import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentIType; import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentOType; import oio.skat.nemvirksomhed.ws._1_0_0.VirksomhedKalenderHentServiceBindingQSService; import oio.skat.nemvirksomhed.ws._1_0_0.VirksomhedKalenderHentServicePortType; -import javax.xml.bind.JAXBException; import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.ws.BindingProvider; import java.io.IOException; import java.io.InputStream; import java.util.logging.Logger; @@ -52,29 +52,42 @@ public VirksomhedKalenderHentClient(String endpointURL, String policy) { * @throws JAXBException N/A * @throws DatatypeConfigurationException N/A */ - public String invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) + public VirksomhedKalenderHentOType invoke(String document, String certicateAlias, boolean overrideHovedoplysninger) + throws IOException, DatatypeConfigurationException, JAXBException { + InputStream inputStream = IOUtils.toInputStream(document, "UTF-8"); + VirksomhedKalenderHentIType virksomhedKalenderHentIType = VirksomhedKalenderHentMarshalling.toObject(inputStream); + return invoke(virksomhedKalenderHentIType, certicateAlias, overrideHovedoplysninger); + } + + /** + * Call VirksomhedKalenderHent service + * + * @param document Request document as String + * @param certicateAlias Alias of certificate to use in call + * @param overrideHovedoplysninger If transaction Id and Time should be regenerated + * @throws IOException N/A + * @throws JAXBException N/A + * @throws DatatypeConfigurationException N/A + */ + public VirksomhedKalenderHentOType invoke(VirksomhedKalenderHentIType virksomhedKalenderHentIType, String certicateAlias, boolean overrideHovedoplysninger) throws IOException, DatatypeConfigurationException, JAXBException { configureBus(certicateAlias); VirksomhedKalenderHentServiceBindingQSService service = new VirksomhedKalenderHentServiceBindingQSService(); VirksomhedKalenderHentServicePortType port = service.getVirksomhedKalenderHentServiceBindingQSPort(); - // Set endpoint of service. BindingProvider bp = (BindingProvider)port; bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, this.endpointURL); - InputStream inputStream = IOUtils.toInputStream(document, "UTF-8"); - VirksomhedKalenderHentIType virksomhedKalenderHentIType = VirksomhedKalenderHentMarshalling.toObject(inputStream); if (overrideHovedoplysninger) { virksomhedKalenderHentIType.getHovedOplysninger().setTransaktionIdentifikator(TransactionIdGenerator.getTransactionId()); virksomhedKalenderHentIType.getHovedOplysninger().setTransaktionTid(getTransactionTime()); LOGGER.info("HovedOplysninger populated with new Transaction Id and Time"); } - VirksomhedKalenderHentOType out = port.getVirksomhedKalenderHent(virksomhedKalenderHentIType); - return VirksomhedKalenderHentMarshalling.toString(out); + return out; } diff --git a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshalling.java b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshalling.java index 9801cc8..66de98f 100644 --- a/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshalling.java +++ b/rsu-b2b-sample-client/src/main/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshalling.java @@ -1,12 +1,12 @@ package dk.skat.rsu.b2b.sample; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentIType; import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentOType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; import java.io.InputStream; import java.io.StringWriter; @@ -36,5 +36,4 @@ public static String toString(VirksomhedKalenderHentOType document) throws JAXBE throw e; } } - } diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigIType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigIType.java index b4a5e4b..f96a018 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigIType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigIType.java @@ -2,16 +2,16 @@ package oio.skat.nemvirksomhed.ws._1_0; import java.math.BigInteger; -import javax.xml.bind.annotation.*; import javax.xml.datatype.XMLGregorianCalendar; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerType; +import jakarta.xml.bind.annotation.*; /** *

Java class for ModtagMomsangivelseForeloebig_IType complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

  * <complexType name="ModtagMomsangivelseForeloebig_IType">
  *   <complexContent>
@@ -73,8 +73,8 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name="ModtagMomsangivelseForeloebig_I") @@ -91,11 +91,11 @@ public class ModtagMomsangivelseForeloebigIType { /** * Gets the value of the hovedOplysninger property. - * + * * @return * possible object is * {@link HovedOplysningerType } - * + * */ public HovedOplysningerType getHovedOplysninger() { return hovedOplysninger; @@ -103,11 +103,11 @@ public HovedOplysningerType getHovedOplysninger() { /** * Sets the value of the hovedOplysninger property. - * + * * @param value * allowed object is * {@link HovedOplysningerType } - * + * */ public void setHovedOplysninger(HovedOplysningerType value) { this.hovedOplysninger = value; @@ -115,11 +115,11 @@ public void setHovedOplysninger(HovedOplysningerType value) { /** * Gets the value of the angivelse property. - * + * * @return * possible object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse } - * + * */ public ModtagMomsangivelseForeloebigIType.Angivelse getAngivelse() { return angivelse; @@ -127,11 +127,11 @@ public ModtagMomsangivelseForeloebigIType.Angivelse getAngivelse() { /** * Sets the value of the angivelse property. - * + * * @param value * allowed object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse } - * + * */ public void setAngivelse(ModtagMomsangivelseForeloebigIType.Angivelse value) { this.angivelse = value; @@ -140,9 +140,9 @@ public void setAngivelse(ModtagMomsangivelseForeloebigIType.Angivelse value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

      * <complexType>
      *   <complexContent>
@@ -193,8 +193,8 @@ public void setAngivelse(ModtagMomsangivelseForeloebigIType.Angivelse value) {
      *   </complexContent>
      * </complexType>
      * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -213,11 +213,11 @@ public static class Angivelse { /** * Gets the value of the angiverVirksomhedSENummer property. - * + * * @return * possible object is * {@link AngiverVirksomhedSENummerType } - * + * */ public AngiverVirksomhedSENummerType getAngiverVirksomhedSENummer() { return angiverVirksomhedSENummer; @@ -225,11 +225,11 @@ public AngiverVirksomhedSENummerType getAngiverVirksomhedSENummer() { /** * Sets the value of the angiverVirksomhedSENummer property. - * + * * @param value * allowed object is * {@link AngiverVirksomhedSENummerType } - * + * */ public void setAngiverVirksomhedSENummer(AngiverVirksomhedSENummerType value) { this.angiverVirksomhedSENummer = value; @@ -237,11 +237,11 @@ public void setAngiverVirksomhedSENummer(AngiverVirksomhedSENummerType value) { /** * Gets the value of the angivelsesoplysninger property. - * + * * @return * possible object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesoplysninger } - * + * */ public ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesoplysninger getAngivelsesoplysninger() { return angivelsesoplysninger; @@ -249,11 +249,11 @@ public ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesoplysninger getAng /** * Sets the value of the angivelsesoplysninger property. - * + * * @param value * allowed object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesoplysninger } - * + * */ public void setAngivelsesoplysninger(ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesoplysninger value) { this.angivelsesoplysninger = value; @@ -261,11 +261,11 @@ public void setAngivelsesoplysninger(ModtagMomsangivelseForeloebigIType.Angivels /** * Gets the value of the angivelsesafgifter property. - * + * * @return * possible object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesafgifter } - * + * */ public ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesafgifter getAngivelsesafgifter() { return angivelsesafgifter; @@ -273,11 +273,11 @@ public ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesafgifter getAngive /** * Sets the value of the angivelsesafgifter property. - * + * * @param value * allowed object is * {@link ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesafgifter } - * + * */ public void setAngivelsesafgifter(ModtagMomsangivelseForeloebigIType.Angivelse.Angivelsesafgifter value) { this.angivelsesafgifter = value; @@ -286,9 +286,9 @@ public void setAngivelsesafgifter(ModtagMomsangivelseForeloebigIType.Angivelse.A /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

          * <complexType>
          *   <complexContent>
@@ -316,8 +316,8 @@ public void setAngivelsesafgifter(ModtagMomsangivelseForeloebigIType.Angivelse.A
          *   </complexContent>
          * </complexType>
          * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -378,11 +378,11 @@ public static class Angivelsesafgifter { /** * Gets the value of the momsAngivelseAfgiftTilsvarBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseAfgiftTilsvarBeloeb() { return momsAngivelseAfgiftTilsvarBeloeb; @@ -390,11 +390,11 @@ public BigInteger getMomsAngivelseAfgiftTilsvarBeloeb() { /** * Sets the value of the momsAngivelseAfgiftTilsvarBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseAfgiftTilsvarBeloeb(BigInteger value) { this.momsAngivelseAfgiftTilsvarBeloeb = value; @@ -402,11 +402,11 @@ public void setMomsAngivelseAfgiftTilsvarBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseCO2AfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseCO2AfgiftBeloeb() { return momsAngivelseCO2AfgiftBeloeb; @@ -414,11 +414,11 @@ public BigInteger getMomsAngivelseCO2AfgiftBeloeb() { /** * Sets the value of the momsAngivelseCO2AfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseCO2AfgiftBeloeb(BigInteger value) { this.momsAngivelseCO2AfgiftBeloeb = value; @@ -426,11 +426,11 @@ public void setMomsAngivelseCO2AfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseEUKoebBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseEUKoebBeloeb() { return momsAngivelseEUKoebBeloeb; @@ -438,11 +438,11 @@ public BigInteger getMomsAngivelseEUKoebBeloeb() { /** * Sets the value of the momsAngivelseEUKoebBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseEUKoebBeloeb(BigInteger value) { this.momsAngivelseEUKoebBeloeb = value; @@ -450,11 +450,11 @@ public void setMomsAngivelseEUKoebBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseEUSalgBeloebVarerBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseEUSalgBeloebVarerBeloeb() { return momsAngivelseEUSalgBeloebVarerBeloeb; @@ -462,11 +462,11 @@ public BigInteger getMomsAngivelseEUSalgBeloebVarerBeloeb() { /** * Sets the value of the momsAngivelseEUSalgBeloebVarerBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseEUSalgBeloebVarerBeloeb(BigInteger value) { this.momsAngivelseEUSalgBeloebVarerBeloeb = value; @@ -474,11 +474,11 @@ public void setMomsAngivelseEUSalgBeloebVarerBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseIkkeEUSalgBeloebVarerBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseIkkeEUSalgBeloebVarerBeloeb() { return momsAngivelseIkkeEUSalgBeloebVarerBeloeb; @@ -486,11 +486,11 @@ public BigInteger getMomsAngivelseIkkeEUSalgBeloebVarerBeloeb() { /** * Sets the value of the momsAngivelseIkkeEUSalgBeloebVarerBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseIkkeEUSalgBeloebVarerBeloeb(BigInteger value) { this.momsAngivelseIkkeEUSalgBeloebVarerBeloeb = value; @@ -498,11 +498,11 @@ public void setMomsAngivelseIkkeEUSalgBeloebVarerBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseElAfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseElAfgiftBeloeb() { return momsAngivelseElAfgiftBeloeb; @@ -510,11 +510,11 @@ public BigInteger getMomsAngivelseElAfgiftBeloeb() { /** * Sets the value of the momsAngivelseElAfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseElAfgiftBeloeb(BigInteger value) { this.momsAngivelseElAfgiftBeloeb = value; @@ -522,11 +522,11 @@ public void setMomsAngivelseElAfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseEksportOmsaetningBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseEksportOmsaetningBeloeb() { return momsAngivelseEksportOmsaetningBeloeb; @@ -534,11 +534,11 @@ public BigInteger getMomsAngivelseEksportOmsaetningBeloeb() { /** * Sets the value of the momsAngivelseEksportOmsaetningBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseEksportOmsaetningBeloeb(BigInteger value) { this.momsAngivelseEksportOmsaetningBeloeb = value; @@ -546,11 +546,11 @@ public void setMomsAngivelseEksportOmsaetningBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseGasAfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseGasAfgiftBeloeb() { return momsAngivelseGasAfgiftBeloeb; @@ -558,11 +558,11 @@ public BigInteger getMomsAngivelseGasAfgiftBeloeb() { /** * Sets the value of the momsAngivelseGasAfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseGasAfgiftBeloeb(BigInteger value) { this.momsAngivelseGasAfgiftBeloeb = value; @@ -570,11 +570,11 @@ public void setMomsAngivelseGasAfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseKoebsMomsBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseKoebsMomsBeloeb() { return momsAngivelseKoebsMomsBeloeb; @@ -582,11 +582,11 @@ public BigInteger getMomsAngivelseKoebsMomsBeloeb() { /** * Sets the value of the momsAngivelseKoebsMomsBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseKoebsMomsBeloeb(BigInteger value) { this.momsAngivelseKoebsMomsBeloeb = value; @@ -594,11 +594,11 @@ public void setMomsAngivelseKoebsMomsBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseKulAfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseKulAfgiftBeloeb() { return momsAngivelseKulAfgiftBeloeb; @@ -606,11 +606,11 @@ public BigInteger getMomsAngivelseKulAfgiftBeloeb() { /** * Sets the value of the momsAngivelseKulAfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseKulAfgiftBeloeb(BigInteger value) { this.momsAngivelseKulAfgiftBeloeb = value; @@ -618,11 +618,11 @@ public void setMomsAngivelseKulAfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseMomsEUKoebBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseMomsEUKoebBeloeb() { return momsAngivelseMomsEUKoebBeloeb; @@ -630,11 +630,11 @@ public BigInteger getMomsAngivelseMomsEUKoebBeloeb() { /** * Sets the value of the momsAngivelseMomsEUKoebBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseMomsEUKoebBeloeb(BigInteger value) { this.momsAngivelseMomsEUKoebBeloeb = value; @@ -642,11 +642,11 @@ public void setMomsAngivelseMomsEUKoebBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseMomsEUYdelserBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseMomsEUYdelserBeloeb() { return momsAngivelseMomsEUYdelserBeloeb; @@ -654,11 +654,11 @@ public BigInteger getMomsAngivelseMomsEUYdelserBeloeb() { /** * Sets the value of the momsAngivelseMomsEUYdelserBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseMomsEUYdelserBeloeb(BigInteger value) { this.momsAngivelseMomsEUYdelserBeloeb = value; @@ -666,11 +666,11 @@ public void setMomsAngivelseMomsEUYdelserBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseOlieAfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseOlieAfgiftBeloeb() { return momsAngivelseOlieAfgiftBeloeb; @@ -678,11 +678,11 @@ public BigInteger getMomsAngivelseOlieAfgiftBeloeb() { /** * Sets the value of the momsAngivelseOlieAfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseOlieAfgiftBeloeb(BigInteger value) { this.momsAngivelseOlieAfgiftBeloeb = value; @@ -690,11 +690,11 @@ public void setMomsAngivelseOlieAfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseSalgsMomsBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseSalgsMomsBeloeb() { return momsAngivelseSalgsMomsBeloeb; @@ -702,11 +702,11 @@ public BigInteger getMomsAngivelseSalgsMomsBeloeb() { /** * Sets the value of the momsAngivelseSalgsMomsBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseSalgsMomsBeloeb(BigInteger value) { this.momsAngivelseSalgsMomsBeloeb = value; @@ -714,11 +714,11 @@ public void setMomsAngivelseSalgsMomsBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseVandAfgiftBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseVandAfgiftBeloeb() { return momsAngivelseVandAfgiftBeloeb; @@ -726,11 +726,11 @@ public BigInteger getMomsAngivelseVandAfgiftBeloeb() { /** * Sets the value of the momsAngivelseVandAfgiftBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseVandAfgiftBeloeb(BigInteger value) { this.momsAngivelseVandAfgiftBeloeb = value; @@ -738,11 +738,11 @@ public void setMomsAngivelseVandAfgiftBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseEUKoebYdelseBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseEUKoebYdelseBeloeb() { return momsAngivelseEUKoebYdelseBeloeb; @@ -750,11 +750,11 @@ public BigInteger getMomsAngivelseEUKoebYdelseBeloeb() { /** * Sets the value of the momsAngivelseEUKoebYdelseBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseEUKoebYdelseBeloeb(BigInteger value) { this.momsAngivelseEUKoebYdelseBeloeb = value; @@ -762,11 +762,11 @@ public void setMomsAngivelseEUKoebYdelseBeloeb(BigInteger value) { /** * Gets the value of the momsAngivelseEUSalgYdelseBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getMomsAngivelseEUSalgYdelseBeloeb() { return momsAngivelseEUSalgYdelseBeloeb; @@ -774,11 +774,11 @@ public BigInteger getMomsAngivelseEUSalgYdelseBeloeb() { /** * Sets the value of the momsAngivelseEUSalgYdelseBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setMomsAngivelseEUSalgYdelseBeloeb(BigInteger value) { this.momsAngivelseEUSalgYdelseBeloeb = value; @@ -789,9 +789,9 @@ public void setMomsAngivelseEUSalgYdelseBeloeb(BigInteger value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

          * <complexType>
          *   <complexContent>
@@ -804,8 +804,8 @@ public void setMomsAngivelseEUSalgYdelseBeloeb(BigInteger value) {
          *   </complexContent>
          * </complexType>
          * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -823,11 +823,11 @@ public static class Angivelsesoplysninger { /** * Gets the value of the angivelsePeriodeFraDato property. - * + * * @return * possible object is * {@link XMLGregorianCalendar } - * + * */ public XMLGregorianCalendar getAngivelsePeriodeFraDato() { return angivelsePeriodeFraDato; @@ -835,11 +835,11 @@ public XMLGregorianCalendar getAngivelsePeriodeFraDato() { /** * Sets the value of the angivelsePeriodeFraDato property. - * + * * @param value * allowed object is * {@link XMLGregorianCalendar } - * + * */ public void setAngivelsePeriodeFraDato(XMLGregorianCalendar value) { this.angivelsePeriodeFraDato = value; @@ -847,11 +847,11 @@ public void setAngivelsePeriodeFraDato(XMLGregorianCalendar value) { /** * Gets the value of the angivelsePeriodeTilDato property. - * + * * @return * possible object is * {@link XMLGregorianCalendar } - * + * */ public XMLGregorianCalendar getAngivelsePeriodeTilDato() { return angivelsePeriodeTilDato; @@ -859,11 +859,11 @@ public XMLGregorianCalendar getAngivelsePeriodeTilDato() { /** * Sets the value of the angivelsePeriodeTilDato property. - * + * * @param value * allowed object is * {@link XMLGregorianCalendar } - * + * */ public void setAngivelsePeriodeTilDato(XMLGregorianCalendar value) { this.angivelsePeriodeTilDato = value; diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigOType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigOType.java index 9059efb..8e5724a 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigOType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/ModtagMomsangivelseForeloebigOType.java @@ -2,15 +2,14 @@ package oio.skat.nemvirksomhed.ws._1_0; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerSvarType; - -import javax.xml.bind.annotation.*; +import jakarta.xml.bind.annotation.*; /** *

Java class for ModtagMomsangivelseForeloebig_OType complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

  * <complexType name="ModtagMomsangivelseForeloebig_OType">
  *   <complexContent>
@@ -34,8 +33,8 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name="ModtagMomsangivelseForeloebig_O") @@ -128,9 +127,9 @@ public void setDybtlink(Dybtlink value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

      * <complexType>
      *   <complexContent>
@@ -142,8 +141,8 @@ public void setDybtlink(Dybtlink value) {
      *   </complexContent>
      * </complexType>
      * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -156,11 +155,11 @@ public static class Dybtlink { /** * Gets the value of the urlIndicator property. - * + * * @return * possible object is * {@link String } - * + * */ public String getUrlIndicator() { return urlIndicator; @@ -168,11 +167,11 @@ public String getUrlIndicator() { /** * Sets the value of the urlIndicator property. - * + * * @param value * allowed object is * {@link String } - * + * */ public void setUrlIndicator(String value) { this.urlIndicator = value; diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentIType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentIType.java index 706a62f..9ba86f5 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentIType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentIType.java @@ -1,16 +1,16 @@ package oio.skat.nemvirksomhed.ws._1_0; -import javax.xml.bind.annotation.*; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerType; +import jakarta.xml.bind.annotation.*; /** *

Java class for MomsangivelseKvitteringHent_IType complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

  * <complexType name="MomsangivelseKvitteringHent_IType">
  *   <complexContent>
@@ -34,8 +34,8 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name="MomsangivelseKvitteringHent_I") @@ -55,11 +55,11 @@ public class MomsangivelseKvitteringHentIType { /** * Gets the value of the hovedOplysninger property. - * + * * @return * possible object is * {@link HovedOplysningerType } - * + * */ public HovedOplysningerType getHovedOplysninger() { return hovedOplysninger; @@ -67,11 +67,11 @@ public HovedOplysningerType getHovedOplysninger() { /** * Sets the value of the hovedOplysninger property. - * + * * @param value * allowed object is * {@link HovedOplysningerType } - * + * */ public void setHovedOplysninger(HovedOplysningerType value) { this.hovedOplysninger = value; @@ -79,11 +79,11 @@ public void setHovedOplysninger(HovedOplysningerType value) { /** * Gets the value of the transaktionIdentifier property. - * + * * @return * possible object is * {@link String } - * + * */ public String getTransaktionIdentifier() { return transaktionIdentifier; @@ -91,11 +91,11 @@ public String getTransaktionIdentifier() { /** * Sets the value of the transaktionIdentifier property. - * + * * @param value * allowed object is * {@link String } - * + * */ public void setTransaktionIdentifier(String value) { this.transaktionIdentifier = value; @@ -103,11 +103,11 @@ public void setTransaktionIdentifier(String value) { /** * Gets the value of the angiver property. - * + * * @return * possible object is * {@link MomsangivelseKvitteringHentIType.Angiver } - * + * */ public MomsangivelseKvitteringHentIType.Angiver getAngiver() { return angiver; @@ -115,11 +115,11 @@ public MomsangivelseKvitteringHentIType.Angiver getAngiver() { /** * Sets the value of the angiver property. - * + * * @param value * allowed object is * {@link MomsangivelseKvitteringHentIType.Angiver } - * + * */ public void setAngiver(MomsangivelseKvitteringHentIType.Angiver value) { this.angiver = value; @@ -128,9 +128,9 @@ public void setAngiver(MomsangivelseKvitteringHentIType.Angiver value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

      * <complexType>
      *   <complexContent>
@@ -142,8 +142,8 @@ public void setAngiver(MomsangivelseKvitteringHentIType.Angiver value) {
      *   </complexContent>
      * </complexType>
      * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -156,11 +156,11 @@ public static class Angiver { /** * Gets the value of the virksomhedSENummerIdentifikator property. - * + * * @return * possible object is * {@link String } - * + * */ public String getVirksomhedSENummerIdentifikator() { return virksomhedSENummerIdentifikator; @@ -168,11 +168,11 @@ public String getVirksomhedSENummerIdentifikator() { /** * Sets the value of the virksomhedSENummerIdentifikator property. - * + * * @param value * allowed object is * {@link String } - * + * */ public void setVirksomhedSENummerIdentifikator(String value) { this.virksomhedSENummerIdentifikator = value; diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentOType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentOType.java index d1e3aca..7e92fb5 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentOType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/MomsangivelseKvitteringHentOType.java @@ -2,17 +2,17 @@ package oio.skat.nemvirksomhed.ws._1_0; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerSvarType; +import jakarta.xml.bind.annotation.*; -import javax.xml.bind.annotation.*; import javax.xml.datatype.XMLGregorianCalendar; import java.math.BigInteger; /** *

Java class for MomsangivelseKvitteringHent_OType complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

  * <complexType name="MomsangivelseKvitteringHent_OType">
  *   <complexContent>
@@ -48,8 +48,8 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name="MomsangivelseKvitteringHent_O") @@ -142,9 +142,9 @@ public void setBetalingsoplysninger(Betalingsoplysninger value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

      * <complexType>
      *   <complexContent>
@@ -158,8 +158,8 @@ public void setBetalingsoplysninger(Betalingsoplysninger value) {
      *   </complexContent>
      * </complexType>
      * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -179,11 +179,11 @@ public static class Betalingsoplysninger { /** * Gets the value of the ocrLinie property. - * + * * @return * possible object is * {@link OCRLinieType } - * + * */ public OCRLinieType getOCRLinie() { return ocrLinie; @@ -191,11 +191,11 @@ public OCRLinieType getOCRLinie() { /** * Sets the value of the ocrLinie property. - * + * * @param value * allowed object is * {@link OCRLinieType } - * + * */ public void setOCRLinie(OCRLinieType value) { this.ocrLinie = value; @@ -203,11 +203,11 @@ public void setOCRLinie(OCRLinieType value) { /** * Gets the value of the betalingIkkeBetaltBeloeb property. - * + * * @return * possible object is * {@link BigInteger } - * + * */ public BigInteger getBetalingIkkeBetaltBeloeb() { return betalingIkkeBetaltBeloeb; @@ -215,11 +215,11 @@ public BigInteger getBetalingIkkeBetaltBeloeb() { /** * Sets the value of the betalingIkkeBetaltBeloeb property. - * + * * @param value * allowed object is * {@link BigInteger } - * + * */ public void setBetalingIkkeBetaltBeloeb(BigInteger value) { this.betalingIkkeBetaltBeloeb = value; @@ -227,11 +227,11 @@ public void setBetalingIkkeBetaltBeloeb(BigInteger value) { /** * Gets the value of the angivelseFristKalenderBetalingDato property. - * + * * @return * possible object is * {@link XMLGregorianCalendar } - * + * */ public XMLGregorianCalendar getAngivelseFristKalenderBetalingDato() { return angivelseFristKalenderBetalingDato; @@ -239,11 +239,11 @@ public XMLGregorianCalendar getAngivelseFristKalenderBetalingDato() { /** * Sets the value of the angivelseFristKalenderBetalingDato property. - * + * * @param value * allowed object is * {@link XMLGregorianCalendar } - * + * */ public void setAngivelseFristKalenderBetalingDato(XMLGregorianCalendar value) { this.angivelseFristKalenderBetalingDato = value; @@ -254,9 +254,9 @@ public void setAngivelseFristKalenderBetalingDato(XMLGregorianCalendar value) { /** *

Java class for anonymous complex type. - * + * *

The following schema fragment specifies the expected content contained within this class. - * + * *

      * <complexType>
      *   <complexContent>
@@ -268,8 +268,8 @@ public void setAngivelseFristKalenderBetalingDato(XMLGregorianCalendar value) {
      *   </complexContent>
      * </complexType>
      * 
- * - * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { @@ -282,7 +282,7 @@ public static class PDFkvittering { /** * Gets the value of the dokumentFilIndholdData property. - * + * * @return * possible object is * byte[] @@ -293,7 +293,7 @@ public byte[] getDokumentFilIndholdData() { /** * Sets the value of the dokumentFilIndholdData property. - * + * * @param value * allowed object is * byte[] diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentIType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentIType.java index ac5da2e..91d039d 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentIType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentIType.java @@ -1,9 +1,9 @@ package oio.skat.nemvirksomhed.ws._1_0; -import javax.xml.bind.annotation.*; import javax.xml.datatype.XMLGregorianCalendar; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerType; +import jakarta.xml.bind.annotation.*; /** diff --git a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentOType.java b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentOType.java index 93f1064..706ac98 100644 --- a/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentOType.java +++ b/rsu-b2b-sample-client/src/main/java/oio/skat/nemvirksomhed/ws/_1_0/VirksomhedKalenderHentOType.java @@ -4,9 +4,9 @@ import java.math.BigInteger; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.*; import javax.xml.datatype.XMLGregorianCalendar; import dk.oio.rep.skat_dk.basis.kontekst.xml.schemas._2006._09._01.HovedOplysningerSvarType; +import jakarta.xml.bind.annotation.*; /** diff --git a/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign-classpath.xml b/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign-classpath.xml new file mode 100644 index 0000000..c22c9ed --- /dev/null +++ b/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign-classpath.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + .*_EXPORT_.* + .*_EXPORT1024_.* + .*_WITH_DES_.* + .*_WITH_AES_.* + .*_WITH_NULL_.* + .*_DH_anon_.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign.xml b/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign.xml index 31af9d6..fe7be8e 100644 --- a/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign.xml +++ b/rsu-b2b-sample-client/src/main/resources/rsu-policy-sign.xml @@ -7,9 +7,9 @@ to you 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 @@ -29,7 +29,7 @@ http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd"> - + diff --git a/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClientTest.java b/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClientTest.java new file mode 100644 index 0000000..14ab7c0 --- /dev/null +++ b/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentClientTest.java @@ -0,0 +1,32 @@ +package dk.skat.rsu.b2b.sample; + +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; +import jakarta.xml.bind.JAXBException; +import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentIType; +import org.junit.Ignore; +import org.junit.Test; + +import javax.xml.datatype.DatatypeConfigurationException; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +public class VirksomhedKalenderHentClientTest { + + // IMPORTANT: Place 'app.conf' in root of 'rsu-b2b-sample-client' module before run + @Ignore("Test manually in IDE") + @Test + public void testClient() throws JAXBException, DatatypeConfigurationException, IOException { + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("VirksomhedKalenderHent_I_Document.xml"); + VirksomhedKalenderHentIType doc = VirksomhedKalenderHentMarshalling.toObject(inputStream); + String appConf = System.getProperty("user.dir") + File.separator + "app.conf"; + Config config = ConfigFactory.parseFile(new File(appConf)).withFallback(ConfigFactory.load()); + + String endpoint = config.getString("endpoints.EMCSTEST_SIGNONLY.VirksomhedKalenderHent"); + String cerAlias = "LucaPacioli_ApS_System_Integrationstest_S1"; + VirksomhedKalenderHentClient client = new VirksomhedKalenderHentClient(endpoint, "rsu-policy-sign-classpath.xml"); + client.invoke(doc, cerAlias, true); + + } +} diff --git a/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshallingTest.java b/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshallingTest.java index 87989f1..8fb5c7c 100644 --- a/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshallingTest.java +++ b/rsu-b2b-sample-client/src/test/java/dk/skat/rsu/b2b/sample/VirksomhedKalenderHentMarshallingTest.java @@ -1,10 +1,10 @@ package dk.skat.rsu.b2b.sample; +import java.io.InputStream; +import jakarta.xml.bind.JAXBException; import oio.skat.nemvirksomhed.ws._1_0.VirksomhedKalenderHentIType; import org.junit.Test; -import javax.xml.bind.JAXBException; -import java.io.InputStream; import static org.junit.Assert.*; @@ -16,4 +16,4 @@ public void toVirksomhedKalenderHentIType() throws JAXBException { VirksomhedKalenderHentIType document = VirksomhedKalenderHentMarshalling.toObject(inputStream); assertEquals("12345678", document.getVirksomhedSENummerIdentifikator()); } -} \ No newline at end of file +} diff --git a/start-tomcat.sh b/start-tomcat.sh deleted file mode 100755 index ad4ea5d..0000000 --- a/start-tomcat.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -echo "Starting Tomcat. Once it's running open:" -echo "---" -echo "http://localhost:8080/rsu-b2b-sample-client-gui" -echo "---" - -java -jar rsu-b2b-sample-client-gui-1.2-war-exec.jar