Logical reference in the client application

Specify a logical name for the Web service in the endpoint record of your client application.

When you generate a Client stub from WSDL information using the tool fglwsdl, a public variable for the URL of the Web Service is contained in the stub file (.4gl) file, which references the global endpoint type in the WSHelper module.

For example:
# Location of the SOAP server.
# You can reassign this value at run-time.
PUBLIC DEFINE Calculator_CalculatorPortTypeSoap12Endpoint WSHelper.tGlobalEndpointType

Globals file compatibility

If you have generated stub files for compatibility with your existing GWS client application using GLOBALS, 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_CalculatorPortTypeEndpoint tGlobalEndpointType

Assign URI from fglprofile entry

You can assign a logical name, instead of the Web service URL, to the global endpoint variable in your Web Services client application:
LET Calculator_CalculatorPortTypeEndpoint.Address.Uri = "alias://myservice"

When the client application accesses the service, the actual location will be supplied by the entry in your FGLPROFILE file on the client machine. This allows you to provide the same compiled .42r application to different customers. The entries in the FGLPROFILE file on each customer's machine would customize the Web Service location for that customer.

If you are migrating from a version prior to 2.40, see also Web Services changes.