-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOWTO.txt
More file actions
73 lines (44 loc) · 1.79 KB
/
HOWTO.txt
File metadata and controls
73 lines (44 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Building and running the Project using Maven
---------------------------------------
1) Right CLick on the project in eclipse .Go to the Run As menu item and do
Maven clean
2) And then repeat the step 1 and do a
Maven install
To Run the application:
-------------------------
Right click on the project, go to the Run As Menu Item and select run on the server option.
Accessing the REST Patient Service
=================================
A RESTful patient services WADL can be accessed at this URL
http://localhost:8080/restws/services/patientservice?_wadl
A HTTP GET request to URL http://localhost:8080/restws/services/patientservice/patients/123
returns a Patient instance whose id is 123. The XML document returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Patient>
<id>123</id>
<name>John</name>
</Patient>
A HTTP POST request to URL http://localhost:8080/restws/services/patientservice/patients
with the data:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Patient>
<name>Bharath</name>
</Patient>
adds a patient whose name is Bharath
A HTTP PUT request to URL http://localhost:8080/restws/services/patientservice/patients
with the data:
<Patient>
<id>124</id>
<name>Bharath T</name>
</Patient>
updates the patient instance whose id is 124
A HTTP DELETE request to URL http://localhost:8080/restws/services/patientservice/patients/124
will delete a Patient instance whose id is 124.
Sub Resource Mapping:
A HTTP GET request to URL http://localhost:8080/restws/services/patientservice/prescriptions/223/medicines/323
returns a Medicine instance 323 if it is present in the order 223. The XML document returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Medicine>
<description>Medicine 323</description>
<id>323</id>
</Medicine>