All WSDLs I have seen so far, use localhost to describe the services address. e.g.:
<wsdl:service name="SQLService"> <wsdl:port name="SQLServiceSoap" binding="tns:SQLServiceSoap"> <soap:address location="http://localhost:8080/rservice/services/SQLServiceSoap" /> </wsdl:port> </wsdl:service>
But when the client of such service is run, it somehow knows where the real URL of that service, even if run on a remote machine!
How does CXF perform this "magic"?
IOW, how does the client JAR on a test machine which is not the machine on which the service runs, know where that server is and its address?
grep-ed the source code and
strings-ed the client's jar file and found no trace whatsoever to the server's URL.
So how does that work?
UPDATE: In my super natural detective efforts, I just found a file named
config.xml in the directory where the client's JAR file is located. That
config.xml contains the actual server's URL. So it appears that this is how this is done in the particular case of the project I inherited.
Now the question(s) is:
- Is this the standard way of doing this?
- Is there a standard (or recommended way) at all in CXF?
- Or is it pretty much left to the developer to decide?