Giter Club home page Giter Club logo

soap_webclient_javaserver's Introduction

Reg. No.: AA1893

Currency Converter Server-Client (Web Service - SOAP/WSDL)

The Currency Converter Web service is made using java and it doesn't need database sevices as it reads the json file using a URL. The client application is created using flask framework as a web application.


Setup Server

Server is created using java and the server reads currency data using a url there is no need for placing a .json file or a creating database. There are 2 ways to run the server.

Using IntelliJ IDEA IDE

  1. Import currency_server\project_files folder as a project.
  2. Add json-simple-1.1.1.jar as a dependency of the project structure > modules.
  3. Run Server.java file and server will be hosted on http://localhost:8888/currency_server

Using a Tomcat server

  1. Get the currency_server.war from currency_server folder.
  2. Install Apache Tomcat server(7.0.47).
  3. Add json-simple-1.1.1.jar file to the lib\ folder of the Tomcat server.
  4. Deploy the war file using an Apache Tomcat server. (Tested on Apache Tomcat 7.0.47)
  5. You can visit WSDL of the site by using http://localhost:8080/currency_server/services/ServerImpl?wsdl. (URL could change depending on the configuration settings)

Full WSDL output looks like this, 'wsdl page' High Quality Image: https://images2.imgbox.com/55/69/eWQMIzPi_o.png



Setup Client Web Server

Client Application is made with flask framework.

  1. Create a virtual environment and install the required modules using the requirements.txt file.
$ python -m venv venv
$ .\venv\Scripts\Activate.ps1
$ pip install -r .\requirements.txt
  1. Copy all the client directories and files to your project directory.

  2. Update the URL global variable to your WSDL url. (URL may change depending on the method you are using to host the server.)

  3. After that run run.py file using python3 run.py.(Make sure you are still inside the virtual environment.)



How the application works

There are 2 web services in the web server.

1. convert(amountInSourceCurrency: xsd:float, sourceCurrency: xsd:string, targetCurrency: xsd:string) -> convertReturn: xsd:float
2. currencyData() -> currencyDataReturn: xsd:string

First function is convert() which takes amountInSourceCurrency, sourceCurrency and, targetCurrency and returns the value of the target currency as a float value. Second Function does not take any extra parameters and it returns a string of comma-separated currency names.

Web Application looks like this, 'web application' High Quality Image: https://i.imgur.com/xCq6ull.png

Github : https://github.com/re4nightwing/SOAP_WebClient_JavaServer

--- End of the Document ---

soap_webclient_javaserver's People

Contributors

re4nightwing avatar

Watchers

 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.