localhost
is what Visual Studio uses as the default when you add a web reference to a web service on your local machine. I always replace localhost
with the name of the referenced service, e.g. BillingService
or similar.
The name entered when adding the web reference (e.g. "localhost" by default) is the name of the folder in which the generated classes are put and it is also the name of the namespace in which the classes (e.g. return types of the web service) will be.
To prevent naming conflicts between different web service references (e.g. two web services returning a User
type), each reference has to be put into a uniquely named namespace.