forked from ajkd/dynamic-webservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
125 lines (94 loc) · 4.41 KB
/
README
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
This web service developed to give multiple services
with a single published web service. Many services with one
web service concept is achieved by service routines which
are loaded dynamically.
This is developed with java and is a RPC based web service.
This web service has two input String (xml string) parameters
and a String (xml string) output parameter. The first parameter
gives the user credentials, i.e. user id, password, and a function
code. Other parameter gives the data required for the service routine
to carry out its processing.
The function code passes to the
Web service determines which service routine is to be called.
The web service validates and authenticate the user id, password and
the function code. If validations are ok the service routine
corresponding to service is dynamically loaded and gives control
to it. This is handled by in built login module
which is also dynamically loaded and can also be replaced.
The user ids, passwords, function codes, service routines, etc.
are defined in xml files. The service routines which are java classes
and exist in specified folders or exist inside specified jar
or zip files.
To give a new service one has simply need to write
a service routine and put it to a specified folder or specified jar
or zip file. No web service is required to be developed
nor server nor application is needed to be restarted to give new
service.
First parameter : xml string
<msg>
<userid>ajkd</userid>
<password>abcd1234</abcd>
<funcid><ACDETAIL</funcid>
</msg>
Second parameter : String. which will be used by the service routine
corresponding to funcid.
could be somthing like
<account>
<no>124789</ac>
</account>
or could be simple string such as "124789"
and depend on how service routine built to accept it
Output parameter : xml string.
<rmsg><rcode>0</rcode><msg>output from client</msg></rmsg>
rcode "0" means everything is ok
<msg> has the output from service routine.
if rcode is not "0" means error and
<msg> will give the reason.
Inbuilt login module use two xml files
User credential xml file
uprof.xml
<uprof>
<user>
<id>ajkd</id>
<password>abcd1234>
<status>A</status> ---- profile is in active state
<funcid>BALINQ+ACDETAIL+TRANLIST</funcid>
</user>
</uprof>
User “ajkd” given permission to functions BALINQ, ACDETAIL and
TRANLIST
Functions definition xml file
ufunc.xml
<ufunc>
<func>
<id>BALINQ</id>
<uer>devuws.balinq+process</uer>
<status>A</status>
</func>
<func>
<id>ACDETAIL</id>
<uer>devuws.acdetail+getdetail</uer>
<status>A</status>
</func>
<func>
<id>TRANLIST</id>
<uer>devuws.actran+getlist</uer>
<status>A</status>
</func>
</ufunc>
“devuws.balinq” is the service routine class BALINQ function
method that will be called is “process”
All these tables are defined in a property file
devuws.propeties.
LIBDEF file:c:\\ajkd\\devuws\\build\\,file:c:\\ajkd\devuws\\uer.jar
uprof c:\\ajkd\\devuws\\uprof.xml
ufunc c:\\ajkd\\devuws\\ufunc.xml
LOGINUER devuws.login+doLogin
LIBDEF - defines the service routines existing folders, jar and zip files.
for linux environment LIBDEF would
be something like /ajkd/devuws/build,/ajkd/devuws/uer.jar
uprof - location of the user profile definition xml file
ufunc - locaion of the function definition xml file
LOGINUER - defines the login handling routine. “devuws.login” is the in built
Routine and “doLogin” is the the method to call by the main
application.