Skip to content

arunmm8335/soap-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOAP Calculator Client (Java)

A simple Java SOAP client that calls the public Calculator SOAP service from DNE Online.

This project:

  • Downloads the WSDL during the Maven build
  • Generates SOAP client stubs via wsimport
  • Runs a small demo client to call Add/Subtract/Multiply/Divide

Requirements

  • Java 21+
  • Maven 3.9+
  • Internet access (for the WSDL download + SOAP calls)

Project Structure

  • src/main/java/com/roy/calc/client/CalculatorClient.java - runnable demo client
  • Generated SOAP stubs are created at build time under target/generated-sources/wsimport
  • The downloaded WSDL is placed in target/wsdl/calculator.wsdl and copied onto the runtime classpath

Build

mvn clean package

Run

Run the main class with Maven exec:

mvn -DskipTests org.codehaus.mojo:exec-maven-plugin:3.5.0:java -Dexec.mainClass=com.roy.calc.client.CalculatorClient

Expected output (example):

Add: 30
Subtract: 10
Multiply: 200
Divide: 2

Notes

  • The WSDL URL used is: http://www.dneonline.com/calculator.asmx?WSDL
  • If your network blocks HTTPS/TLS to the service, the build uses HTTP for WSDL download.
  • If the SOAP endpoint is blocked, the build may succeed but the run step can fail.

About

This flow shows how the project works end-to-end: Maven downloads the WSDL and generates JAX-WS client stubs at build time, then the demo client uses those stubs to send SOAP requests to the DNE Online Calculator service and prints the results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages