tags:

views:

220

answers:

1

My question relates to use of the address element's 'location' attribute in a WSDL port binding.

Example WSDL fragment:

<wsdl:service name="serviceName">
    <wsdl:port binding="tns:serviceNameBIND" name="serviceNameBIND">
        <soap:address location="http://example.com" />
    </wsdl:port>
</wsdl:service>

I understand that the address element defines the host URI that clients connect to when using the interface described by the WSDL.

Hard-coding a host URI into generated client code seems a curious approach. In a load-balancing scenario one URI makes sense. In my current circumstances our clients are SOA components backing an external interface. The clients may access one of four installations of our application. Load balancing occurs further up-stream.

There have been other questions on SO regarding the location attribute, but they've mostly been technology specific.

Do you use the location attribute as described above, or do you configure clients without reference to the WSDL address element?

+2  A: 

The location attribute is only a hint. The client may store the URL into a .config file, for instance, with the idea that the .config file may be changed later.

John Saunders