Getting started with Webservice
From AdempiereWiki
Contents |
Getting started with Webservice
Get your favourite Soap library ready and do the following calls in the following order. You can get the WSDL from http://<YOUR_HOST>:8080/services/ADService?wsdl. Soap style is rpc by default.
Request version (optional)
To assure that the Webservice has right version do a "getVersion()" call first. This is optional
Getting logged in
- 1. Step: Getting language list
Set name and pass. Set "stage" to 0. Just set all the other parameters to -1. Do a "login()" call. It should return all available languages.
- 2. Step: Getting Loginnames
Set "stage" to 1 and language to your needs. Do a "login()" call. It returns all available values for Org, Client, Role and Warehouse. You may call it again and set on of OrgID, ClientID, RoleID or WarehouseID to get all the remaining values.
- 3. Step: Getting Logged in
Set "stage" to 2 and fill in OrgID, ClientID, RoleID and maybe WarehouseID. Now do a "login()" call again. If it returns nothing you are logged in now. If it returns status=-1 an error occured.
It is important to go through all 3 stages in this order. It will work if you leave out one stage!
Getting the Menu from AD
Do a "getADMenu(100000)" call. I dont know why in0 has to be 1 million but it doesnt work without.
Loading a Window from AD
Do a "getADWindow ( 1, 0, 238 )" call. Dont know what in0=1 and in1=0 means. in2 is AD_Menu_ID from the previous call.
Next would be to getWindowTabData, change data, create new rows and so on. I think now you'll find your way through WSDL ;-). Feel free to contact me: jab_doa
