forked from ajkd/dynamic-webservice
-
Notifications
You must be signed in to change notification settings - Fork 0
danielblair/dynamic-webservice
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
About
java
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Java 100.0%