An open API service indexing awesome lists of open source software.

https://github.com/zdavatz/sandoz.xmlconv.bbmb.ch

xmlconv for Sandoz
https://github.com/zdavatz/sandoz.xmlconv.bbmb.ch

Last synced: 10 months ago
JSON representation

xmlconv for Sandoz

Awesome Lists containing this project

README

          

# sandoz.xmlconv.bbmb.ch

## Description

The xml converter files for Sandoz Switzerland.

graphical overview:
![sandozxmlconv](https://raw.githubusercontent.com/zdavatz/sandoz.xmlconv.bbmb.ch/master/sandozxmlconv.jpeg)

## Repository

https://github.com/zdavatz/sandoz.xmlconv.bbmb.ch

## Requirements

* xmlconv
* sbsm
* odba
* soap4r
* yus (runtime)

See `Gemfile`

## Install

```bash
$ git clone https://github.com/zdavatz/sandoz.xmlconv.bbmb.ch.git
$ mkdir -p log var/output
```

## Setup

* bundle install
* create and adapt etc/polling.yml
* create and adapt etc/config.yml
* integrate it with apache
* setup yus (authentication) server

```bash
# xmlconvd
$ bundle exec rackup

# bin/admin

Use something like `sudo -u bbmb /usr/local/bin/ruby-240 /usr/local/bin/xmlconv_admin config=/var/www/sandoz.xmlconv.bbmb.ch/etc/xmlconv.yml`
# yusd
$ bundle exec yusd config=/path/to/etc/yus.yml
```

## Testing

```bash
# feature test using watir (rspec)
$ bundle exec rake spec

# unit-test and integration test (minitest)
$ bundle exec rake test
```

### soap request for generating an invoice

`curl -v http://sandoz.xmlconv.bbmb.ngiger.ch/propharma -d@test/data/confuse.xml`

where test/data/confuse.xml is a file and sandoz.xmlconv.bbmb.ngiger.ch your testing domain.

The command should have a result status of 0 and respond with something like
* Trying 62.12.131.46...
* TCP_NODELAY set
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to sandoz.xmlconv.bbmb.ch (62.12.131.46) port 80 (#0)
> POST /propharma HTTP/1.1
> Host: sandoz.xmlconv.bbmb.ch
> User-Agent: curl/7.50.3
> Accept: */*
> Content-Length: 625
> Content-Type: application/x-www-form-urlencoded
>
} [625 bytes data]
* upload completely sent off: 629 out of 629 bytes
< HTTP/1.1 200 OK
< Date: Mon, 12 Jun 2017 12:15:03 GMT
* Server WEBrick/1.3.1 (Ruby/2.4.0/2016-12-24) is not blacklisted
< Server: WEBrick/1.3.1 (Ruby/2.4.0/2016-12-24)
< Content-Length: 0
< Content-Type: text/html;charset=UTF-8
< Set-Cookie: _session_id=3c2b018a11c1438855db71923b; path=/
<