The .wso file is an INI file that makes it possible to access webservice functions in a DataFlex application. The webservice functions must be programmed in a cWebService object. The INI file may look like:
Each line contains a key(word) (e.g. Application) and a value (e.g. WebOrder). The different keys are:
This tells the DataFlex WebApp Server what application should be addressed. The name is case sensitive.
The name of the cWebService object in the application
The value for this key needs to be a XSLT (XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG. XSLT 1.0 is widely supported in modern web browsers) file which by default generates a human readable page containing a header naming the service and a list of all published webservice functions with documentation read from the Description meta-data tag. Each of the service functions can be clicked and WebAppServer generates a test page for the function.
The default value for this key is: DefaultWebServiceHomePage.xslt. This is a file which resides in the LIB folder of the DataFlex installation environment. The folder also contains an alternative file that can be used instead which disables the human readable information about the webservice. When you don't want to expose information about the webservice change the ServicePageGenerator value from DefaultWebServiceHomePage.xslt to DefaultWebServiceHomePage.xslt. But it is not limited to this. By making a custom XSLT file it is possible to style the method page to the application style.
Like the ServicePageGenerator key in the INI file this file creates a human readable page that can be used to test a particular published function in this webservice.
The default value for this key is DefaultWebServiceMethodPage.xslt. This is a file which resides in the LIB folder of the DataFlex installation environment. The folder also contains an alternative file that can be used instead which disables the human readable testpage for published functions of the the webservice. When you don't want to allow testing a particular function change the TestPageGenerator value from DefaultWebServiceMethodPage.xslt to DisabledWebServiceMethodPage.xslt. But it is not limited to this. By making a custom XSLT file it is possible to style the method page to the application style.
This last Generator key in the INI file this file generates a WSDL (WebService Description Language) file. This is a XML file that most webservice client tools will understand and can parse into code that can be used to call the functions of the webservice.
The default value for this key is DefaultWebServiceDescription.xslt. While tweaking the results for the webservice is possible via a custom XSLT file it is more likely that the setting gets replaced by a XSLT file which disables the feature to generate a WSDL document. The new value will than be DisabledWebServiceDescription.xslt. Changing the setting results in a HTML document telling the caller that the function is disabled.
This setting tells what type of webservice is in use. It is a Document or a RPC style webservice.
For all three Generator settings replacing the default setting with a disabled generator setting means that functions can still be called but the caller needs to know the names, the parameters and the return type for each function. This can be seen as a first step in making your webservices more secure as they cannot be discovered.