summaryrefslogtreecommitdiff
path: root/Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi
diff options
context:
space:
mode:
Diffstat (limited to 'Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi')
-rw-r--r--Year_3/TSDWL/WSDL/WsBank/src/java/it/dmi/exam/bank/BankOperations.java48
1 files changed, 48 insertions, 0 deletions
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;
+ }
+
+}