diff options
Diffstat (limited to 'Year_3/TSDWL/WSDL/WsBank/src')
| -rw-r--r-- | Year_3/TSDWL/WSDL/WsBank/src/conf/MANIFEST.MF | 2 | ||||
| -rw-r--r-- | Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi/exam/bank/BankOperations.java | 48 | 
2 files changed, 50 insertions, 0 deletions
| diff --git a/Year_3/TSDWL/WSDL/WsBank/src/conf/MANIFEST.MF b/Year_3/TSDWL/WSDL/WsBank/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Year_3/TSDWL/WSDL/WsBank/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi/exam/bank/BankOperations.java b/Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi/exam/bank/BankOperations.java new file mode 100644 index 0000000..4a64a43 --- /dev/null +++ b/Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi/exam/bank/BankOperations.java @@ -0,0 +1,48 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package it.dmi.exam.bank; + +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebParam; + +/** + * + * @author dcariotti + */ +@WebService(serviceName = "BankOperations") +public class BankOperations { +    private double amount = 0.0; + +    /** +     * Web service operation +     */ +    @WebMethod(operationName = "deposit") +    public BankOperations deposit(@WebParam(name = "amount") final double amount) { +        this.amount += amount; +         +        return this; +    } + +    /** +     * Web service operation +     */ +    @WebMethod(operationName = "getAmount") +    public double getAmount() { +        return this.amount; +    } + +    /** +     * Web service operation +     */ +    @WebMethod(operationName = "get") +    public BankOperations get(@WebParam(name = "amount") final double amount) { +        this.amount -= amount; +         +        return this; +    } +     +} | 
