Skip to content

adityainhub/wsdl_program

Repository files navigation

SOAP Calculator Web Service

A simple SOAP web service that provides calculator operations (addition and subtraction) with both server and client implementations.

Table of Contents

Features

  • SOAP-based web service
  • Calculator operations (add, subtract)
  • Interactive client with command-line interface
  • Docker support for easy deployment
  • Detailed logging of operations

Method 1: Using Docker

Prerequisites

  • Docker installed on your system
  • Docker Desktop (for Windows/Mac users)

Quick Start with Docker

  1. Pull the image:
docker pull adityaindoc/soap-calculator:latest
  1. Run the server:
docker run -p 8000:8000 adityaindoc/soap-calculator:latest

The service will be available at:

Using Docker Compose

  1. Create a docker-compose.yml:
services:
  soap-calculator:
    image: yourusername/soap-calculator:latest
    ports:
      - "8000:8000"
    environment:
      - NODE_ENV=production
    restart: unless-stopped
  1. Run with docker-compose:
docker-compose up

Method 2: Direct Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm (comes with Node.js)

Installation Steps

  1. Clone the repository:
git clone https://github.com/adityainhub/wsdl_program.git
cd wsdl_program
  1. Install dependencies:
npm install
  1. Start the server:
node server.js

The service will be available at:

  1. In a new terminal, run the client:
node client.js

Using the Client

The client provides a menu-driven interface:

  1. Choose operation (1: Add, 2: Subtract, 3: Exit)
  2. Enter first number
  3. Enter second number
  4. View result

Troubleshooting

Docker Issues

  1. "Container not starting":

    • Check Docker Desktop is running
    • Verify port 8000 is not in use
    docker logs [container_id]
  2. "Cannot connect to service":

    • Ensure correct port mapping
    • Check firewall settings

Direct Installation Issues

  1. "Module not found":

    npm install
  2. "Port already in use":

    • Change port in server.js
    • Or stop the process using port 8000

Common Solutions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages