GithubHelp home page GithubHelp logo

isabella232 / fmk-idws-xua-test-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trifork/fmk-idws-xua-test-client

0.0 0.0 0.0 568 KB

Client for testing IDWS XUA support in FMK (Det Fælles Medicinkort)

Java 100.00%

fmk-idws-xua-test-client's Introduction

FMK IDWS XUA test client

Client for testing the IDWS XUA support in FMK (Det Fælles Medicinkort).

Features

  • Supports employee authentication by requesting a bootstrap token for accessing the following APIs:
    • FMK 1.4.4 (WSDL: MedicineCard_Idws_Xua_2015_01_01). Implemented operation: GetMedicineCard.
    • FMK 1.4.4 E1 (WSDL: MedicineCard_Idws_Xua_2015_01_01_E1). Implemented operation: GetMedicineCard.
    • EO 1.4.4 (WSDL: EffectuationOrdering_2015_01_01). Implemented operation: GetOrderedEffectuations.
    • POR 1.4.4 E1 (WSDL: PatientRegistration_2015_01_01_E1). Implemented operation: GetPatientRegistration.
  • Supports system user authentication for accessing the following APIs:
    • FMK 1.4.4 (WSDL: MedicineCard_Idws_Xua_2015_01_01). Implemented operation: GetMedicineCardVersion.
  • Supports the Security token service: NSP STS3 (currently in development at NSP).
  • Can be invoked using the included commandline application or by using the library in e.g. an integration test.
  • Logs STS requests and responses to a file.
  • Uses the currently newest versions of CXF and Spring.

Structure

The project is structured as a Maven project with 3 modules:

  • lib-schemas: contains WSDL-files for using different API versions of the FMK webservice with IDWS XUA
  • lib: library containing CXF clients for calling FMK
  • app: an example application using the CXF clients from lib and providing the neccesarry configuration files

Note: the official FMK IDWS XUA WSDL-files are available in the project fmk-schemas, but those included should be identical (but not guaranteed).

Requirements

  • Usage requires a number of configuration files and certificates. Defaults are configured to use NSP STS3 as a test user. See resources in app-module.
  • An FMK webservice must be accessible. This can either be the actual FMK system or a stub. Defaults are configured to use FMK test1.
  • NSP STS3 must be accessible. Defaults are configured to use NSP test1.

Usage

Building

The project is a multi-module Maven project and must be build from the top level:

mvn install

Client app

An application (a runnable jar-file) named fmkclient.jar can be build by the app-module. To run the application (using the default configuration) use the following commands:

$ cd app/target
$ java -jar fmkclient.jar

The application has a command line argument parser. To see available options use the argument -h:

$ java -jar fmkclient.jar -h

To use a specific API (see the table in the section below) and a specific endpoint, use the argument -a and -ws e.g.:

$ java -jar fmkclient.jar -a EffectuationOrdering_2015_01_01 -ws https://test1.fmk.netic.dk/proxy/services/eo_xua_144

Testing of different authentication scenarios

The default configuration uses the MedicineCard_2015_01_01 API which is using the employee authentication by requesting a bootstrap token scenario. To test the system user authentication scenario, simply use the API MedicineCard_2015_01_01_SystemUser like this:

$ java -jar fmkclient.jar -a MedicineCard_2015_01_01_SystemUser

Testing of "Purpose of use"

To test the attribute urn:oasis:names:tc:xspa:1.0:subject:purposeofuse use the following argument:

$ java -jar fmkclient.jar --purposeofuse EMERGENCY

Library

The following table summarises the API names (in this library) and endpoints in FMK test1:

API name Endpoint
MedicineCard_2015_01_01 https://test1.fmk.netic.dk/proxy/services/fmk_xua_144
MedicineCard_2015_01_01_SystemUser https://test1.fmk.netic.dk/proxy/services/fmk_xua_144
MedicineCard_2015_01_01_E1 https://test1.fmk.netic.dk/proxy/services/fmk_xua_144_E1
EffectuationOrdering_2015_01_01 https://test1.fmk.netic.dk/proxy/services/eo_xua_144
PatientRegistration_2015_01_01_E1 https://test1.fmk.netic.dk/proxy/services/por_xua_144_E1

The lib-module can be used as a library e.g. for integration tests. This requires Spring and can be done by importing the configuration class IDWSXUALibSpringConfiguration. Several configuration and certificate files must be provided. A Spring component implementing XUAProperties must be made available in the Spring context. See the app-module as an example of usage.

fmk-idws-xua-test-client's People

Contributors

elvoe avatar jsotrifork avatar

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.