This feature does it easier consuming many webservices from the same location.
As from GeneXus 9.0 version, references to webservices in the location.xml or location datatype, which have same host and BaseURL, can be grouped together.
The Name of the group consists of the HOST and BaseURL of the webservices, with the following syntax: 'LOC:'<Host><BaseURL>.
In the case the reference is specified twice, as a single service and grouped, the first one preceedes.
Three services are imported from: HOST: localhost, BaseURL: /services/ :
http://localhost/services/aWbSrv1.aspx?Wsdl
http://localhost/services/aWbSrv2.aspx?Wsdl
http://localhost/services/aWbSrv3.aspx?Wsdl
Suppose that the webservices in the Production environment are published under the following Url "http://www.genexus.com/Main/"
The consumers can changed the host and base Url of all services using just one entry (and not Three!), programming:
&Location = Getlocation('LOC:localhost/services/')
&location.Host = 'www.genexus.com'
&location.Port = 80
&location.BaseURL = '/Main/'
Where &location is based on Location Data Type
The same sample, with location.xml, would be:
<GXLocation name="LOC:localhost/services/">
<HTTP>
<Host>www.genexus.com</Host>
<Port>80</Port>
<BaseURL>/Main/</BaseURL>
</HTTP>
</GXLocation>
The same sample, but without grouping would be:
<GXLocation name="<namespace>_<aWbSrv1>">
<HTTP>
<Host>www.genexus.com</Host>
<Port>80</Port>
<BaseURL>/Main/</BaseURL>
</HTTP>
</GXLocation>
<GXLocation name="<namespace>_<aWbSrv2>">
<HTTP>
<Host>www.genexus.com</Host>
<Port>80</Port>
<BaseURL>/Main/</BaseURL>
</HTTP>
</GXLocation>
<GXLocation name="<namespace>_<aWbSrv3>">
<HTTP>
<Host>www.genexus.com</Host>
<Port>80</Port>
<BaseURL>/Main/</BaseURL>
</HTTP>
</GXLocation>
Languages: Java, .NET
Interfaces: Web, Win
Location datatype