summaryrefslogtreecommitdiff
path: root/Year_3/TSDWL/WSDL/WsBank/src/java
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-01-20 10:43:22 +0100
committerSanto Cariotti <santo@dcariotti.me>2022-01-20 10:43:22 +0100
commit0a58e131ce0d96ecd60c4daf2c41821a625d689b (patch)
treed67ed3c4662fa7cc83e397b2977a603396d22df6 /Year_3/TSDWL/WSDL/WsBank/src/java
parentd62cdeb376fb5f0749ce637723a6cb305485aad8 (diff)
wsdl: add examples
Diffstat (limited to 'Year_3/TSDWL/WSDL/WsBank/src/java')
-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;
+ }
+
+}