Skip to content

gmork2/django-soap-connector

Folders and files

NameName
Last commit message
Last commit date
Mar 2, 2024
Nov 27, 2019
Feb 16, 2021
Jun 15, 2019
Feb 6, 2021
Sep 12, 2019
Apr 26, 2017
Jun 26, 2019
Apr 20, 2019
Mar 2, 2024
May 24, 2020
Feb 11, 2021
Nov 28, 2019
Nov 28, 2019
Jul 6, 2024
Dec 2, 2019

Repository files navigation

django-soap-connector

License: GPL v3

Django project to connect to an existing SOAP web service and transform it into a REST API.

Getting Started

This application constitutes a proof of concept and is totally experimental, use it at your own risk! You can test the application using the VIES validation service.

What is VIES (VAT Information Exchange System)?

It is an electronic mean of validating VAT-identification numbers of economic operators registered in the European Union for cross border transactions on goods or services.

https://ec.europa.eu/taxation_customs/vies/

Prerequisites

It is not recommended to use memcached with this project.

Installation

Inside the downloaded repository folder, create a virtual environment and install the dependencies:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

Run the django web server and explore the browserable api:

python manage.py runserver 8000

Initialize client and it will automatically retrieve the WSDL file passed in the post request:

curl --location --request POST 'http://127.0.0.1:8000/api/client/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "wsdl": "https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"
}'

Finds out what services, ports and operations are available to this client:

curl --location --request GET 'http://127.0.0.1:8000/api/client/1/service/'

Verify the validity of a VAT number:

curl --location --request POST 'http://127.0.0.1:8000/api/client/1/service/checkvatservice/checkvatport/checkvat' \
--header 'Content-Type: application/json' \
--data-raw '{
    "countryCode": "ES",
    "vatNumber": "12345678"
}'

Authors

Fernando M - https://bitbucket.org/gmork2/

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3 - see the LICENSE file for details.