Mail/Login: Password : forgot my password!

Uniface Webservices

Direct link
Written by uniface8 // Tags: webservice soap uniface

Call-in and Call-out to webservices

Things to take care of, before you start

- Install MSSoapToolkit on the server
- Add Soap driver in the asn file:
Uniface ASN file SOURCE CODE
Sorry- ... please log-in or register to get this!

A few steps to get imported webservices running

1. Import the wsdl file
... using /Sti /mwr=ws http://server/path/service.wsdl in the prompt while launching Uniface. For example /Sti /mwr=ws

2. Compile the generated signature.
Check if the properties of the signature are correct. Further take a look at the the methods and parameters of each one.

3. Update udesc.urr using /urr

4. Make a simple form and Test it!
Example: The webservice "calculator" has varios methods, one of them is "add" that have 3 parameters (param1 OUT,param2 IN,param3 IN) so the form could have the instruction: activate "calculator".add(vnresult,vnparam1,vnparam2). Obviously the webservice returns vnparam1+vnparam2 in vnresult.

Generate a webservice:

1. Write the service that have to execute the server
1.1 Check that it works as a normal service.
2. Generate wsdl file using /sto /mwr=ws servicename
3. Copy wsdl file to tomcat in \webapps\uniface\WEB-INF\wsdl
3.1 Start Tomcat and check that the serviceweb is visible.(e.g. http://server:8080/uniface/services/servicename?wsdl)
*Be careful with web.xml file, check SRD servlet.
4. Update udesc.urr using /urr

If all is correct, the webservice works.

Frecuently problems and issues

-50 Signature not found.
Solution: update urr, check web.xml, urouter.asn files and asn file of userver.

-81 Failure to connect to engine.
Solution: Check signature properties.

-150 xxx yyy zzz
Its a generic error, most of the time are wrong parameters.
Solution: Check null parameters or wrong soap address, check wsdl file and signature properties.


on 2011-02-15 10:00:07 RichardGill wrote:

With Uniface 9, to get the same web service definition, you have to indicate you want the old RPC encoded style : /sto /mwr=ws /rpcencoded servicename Otherwise, youll get the Docment Wrapped Literal (dwl) style. Also, using SOP 2.0, you dont need the MS SOAP toolkit anymore.

2095 view(s) / 2010-09-02 18:11:53 / LAST UPDATED: 2011-07-13 16:11:15