GithubHelp home page GithubHelp logo

de4a-eu / de4a-connector-mock Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 1.1 MB

DE4A WP5 Mocked DO

License: Apache License 2.0

Java 69.78% Dockerfile 0.35% HTML 1.71% JavaScript 27.21% SCSS 0.95%
de4a java mock

de4a-connector-mock's Introduction

DE4A-connector-mock

Install

  • (until de4a-commons is on maven central) install the de4a-commons project locally.
  • mvn clean package to build and package into a runnable jar.

To build a war instead build and package with the war profile mvn clean package -P war

Deployment

The project is deployed at https://de4a-dev-mock.egovlab.eu

The endpoints can be tested using a simple curl command.

curl --request POST \
--url https://de4a-dev-mock.egovlab.eu/[endpoint] \
--header 'Content-Type: application/xml' \
--data '@/path/request/data'

Endpoints

  • /do1/im/extractevidence
  • /do1/usi/extractevidence
  • /dr1/im/transferevidence
  • /dr1/usi/transferevidence
  • /de1/usi/forwardevidence
  • /dt1/usi/transferevidence

Example

The path to the request assumes it is run from project root

curl --request POST \
--url https://de4a-dev-mock.egovlab.eu/do1/im/extractevidence \
--header 'Content-Type: application/xml' \
--data '@src/main/resources/examples/DO1-IM-request.xml'

Configuration

The mock is configured in the application.properties file.

Note that the following settings should be changed from their default values:

  • spring.profiles.active=do, de, dt, dr

    where you set what mocked interfaces to set up.

  • mock.kafka.topic=de4a-mock

    where you set the topic for the package tracker messages.

  • DO specific

    • mock.allowedOriginList=https://de4a-dev-mock.egovlab.eu

      where you set the allowed origins, needed for CORS

    • mock.baseurl=https://de4a-dev-mock.egovlab.eu

      needed to construct the redirect url.

  • DR specific

    • mock.dr.forward.do.im=https://de4a-dev-mock.egovlab.eu/requestExtractEvidenceIM

      mock.dr.forward.do.usi=https://de4a-dev-mock.egovlab.eu/do1/usi/extractevidence

      where the mocked dr should forward to

  • DT specific

    • mock.dt.forward.de.usi=https://de4a-dev-mock.egovlab.eu/api/response

      where the mocked dt should forward to

Iteration 2

Information related to iteration-2 features can be found at README-it2.md file.

Change-log

de4a-connector-mock's People

Contributors

andreasjberg avatar aosunacab avatar daffydukk avatar eduardomorenoalcazar avatar hhberdon avatar phax avatar

Watchers

 avatar  avatar  avatar

de4a-connector-mock's Issues

Cannonical Evidence examples by ID

A request to dr1 IM or do1 IM with a CannonicalEvidenceId referring to one of the pilot's example CanonicalEvidence should use that CanonicalEvidence in the response.

DR requestTransferEvidenceUSI is needed

At the same way we have an inteface receiving RequestTransferEvidenceUSIIMDRType on DRController.java. Another controller or additional logic is needed to processing RequestTransferEvidence messages with usi pattern namespace, in which case DE4AMarshaller.drUsiRequestMarshaller() is the transformer to be used

It should be:

  • dr1imresp(body)
    • mock.dr.endpoint.im
    • using drImRequestMarshaller()
  • dr1usiresp(body)
    • mock.dr.endpoint.usi
    • using drUsiRequestMarshaller()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.