GWS release 2.00 provides a repository for Web Service locations using FGLPROFILE. To achieve maximum flexibility, you can map a logical reference used by your Web Services Client application to an actual URL. This is subject to the network configuration and access rights management of the deployment site.
The following entry in the FGLPROFILE file maps the logical reference "myservice" to an actual URL:
ws.myservice.url = "http://www.MyServer.com/cgi-bin/fglccgi.exe/ws/r/MyWebService"
When you generate a Client stub from WSDL information using the tool fglwsdl, a global variable for the URL of the Web Service is contained in the .inc file. For example:
# Location of the SOAP server. # You can reassign this value at run-time. # DEFINE Calculator_CalculatorPortTypeLocation STRING
You can assign a logical name to this global variable in your Web Services Client application:
LET Calculator_CalculatorPortTypeLocation = "myservice"
When the Client application accesses the Service, the actual location will be supplied by the entry in FGLPROFILE on the Client machine. This allows you to provide the same compiled .42r application to different customers. The entries in FGLPROFILE on each customer's machine would customize the Web Service location for that customer.
When you deploy a GWS Web Service with a GAS behind a Web Server, the service can be accessed by two different URLs. You can use a logical name in the URL, mapping the actual location of the Web Service in FGLPROFILE, depending on the location of the client machine.
For example:
These two URLS could be mapped in the FGLPROFILE file on the Client machine, each specifying the location of the Service.