Skip to content

HarishJoshi001/API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Calculation that can be done here

  1. Addition
  2. Subtraction

1. REST

For addition

GET http://localhost:8080/api/add?num1=2&num2=3

image

For subtraction

GET http://localhost:8080/api/subtract?num1=20&num2=3.3

image

2. SOAP

For both addition and subtraction, use

POST http://localhost:8080/ws

Note: In Postman go to Headers then add Content-Type in Key and text/xml in Value

For addition

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:web="http://harish.com/calculator">
   <soapenv:Header/>
   <soapenv:Body>
      <web:AddRequest>
         <web:number1>10.5</web:number1>
         <web:number2>5.5</web:number2>
      </web:AddRequest>
   </soapenv:Body>
</soapenv:Envelope>

image

For subtraction

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:web="http://harish.com/calculator">
   <soapenv:Header/>
   <soapenv:Body>
      <web:SubtractRequest>
         <web:number1>10.5</web:number1>
         <web:number2>5.5</web:number2>
      </web:SubtractRequest>
   </soapenv:Body>
</soapenv:Envelope>

image

About

Some APIs are created here

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages