VatchexGreece v0.7.0 released, now supports RgWsPublic2

VatchexGreece v0.7.0 released, now supports RgWsPublic2

30 April, 2023 2 min read
Elixir, software, release, API, open data

Here’s an update of my Elixir library for retrieving company information from the Greek government’s RgWsPublic2 SOAP API that deprecated the v1 SOAP API 10 days ago.

Version 0.7.0 is cleaner, gets rid of the really buggy Soap Elixir library, uses SweetXml directly for parsing the new XML data structure, and utilizes Elixir structs throughout the functional pipeline, thus making it possible to utilize the library in a multi-tenant application in which every user utilizes a different set of authorization credentials.

It also features proper error-handling and error-logging in the structs, thus preventing API calls with wrong credentials or XML parsing of failed-response bodies.

Improvements since v0.6.0

  • Now compatible with the RgWsPublic2 SOAP web service (new since 2023-04-20).
  • Now possible to make SOAP API calls using different credentials in %Auth{} structs, e.g. for multi-tenant setups.
  • Now needs no application setup in config.exs or mix.exs, thanks to getting rid of the Soap library due to parsing issues, and because it seems abandoned and not particularly robust to begin with.
  • XML parsing is now handled directly with SweetXml .
  • Actual logging of errors in the %Results{} struct means you can find out what went wrong.
  • Actual handling of errors (with {:ok, ...} and {:error, ...} tuples along the pipeline across all modules means that no API call or parsing of the XML response body is made unless no errors have popped up.

This release retires v0.6.0, which used the now-deprecated RgWsPublic (v1) SOAP web service.