On 3/23/12 1:01 PM, Shashikant Sarade wrote:
i had read it seriously.

Kurt i am not able to change DNS name of server to "sales"
i am doing by editing "juddiv3.properties" from cmd but it wont do
when i go to "http://sales:8080/juddiv3/";

*i am not able to change DNS name of server to "sales"*
/OK, since you are trying hard, and it's a nice day out/, here is some web basics:

Taken from: http://en.wikipedia.org/wiki/Uniform_resource_locator the URL syntax is:

scheme://domain:port/path?query_string#fragment_id

So in this case 'sales' in the domain, and we know the web/appserver runs on your own machine. So you do you get DNS to believe that the domain 'sales' resolves to your machine? You can go a registrar (let's say godaddy.com) and buy the 'sales' domain, and then have them resolve 'sales' to your IP address. Well 'sales' isn't even a valid domain. It would have to be sales.com or something, and I'm sure that's taken. So what to do?

It turns out you can override whatever DNS servers say by adding entries in a hosts file. On linux you would find that file in /etc/hosts. On windows it is a bit harder to find, Google tells me it lives in C:\windows\system32\drivers\etc\ or %systemroot%\system32\drivers\etc\. So now if we add
a line

sales    127.0.0.1

in that file. That machine will resolve sales to 127.0.0.1, which is the loopback address, see
http://en.wikipedia.org/wiki/Localhost

which is your machine :).


Your next question will be, *but what about 'marketing'*?.

Marketing runs on your friend's computer, which let's pretent has IP address 192.168.1.8. You can read about private networks here http://en.wikipedia.org/wiki/Private_network (192.168.x.x is an example of a private network address). So anyway, if he runs another juddi server on his machine, you should be able to access it at : http://192.168.1.8:8080/juddiv3, but you will say:"but that is not 'marketing'". For that you will need to add another line to *your* hosts file:

marketing 192.168.1.8

Now on *your* machine, and on your machine only http://marketing:8080/juddiv3 will resolve to your friend's machine. Which is exactly what the subscription example is trying to do. To make your friends machine resolve to your machine you will need to modify the hosts file on your friends machine by adding a line

sales 192.168.1.7

where 192.168.1.7 is your IP address.

The only thing left for you to ask is: but how do I know what my IP address is? For that you can use a command called 'ifconfig' on linux and 'ipconfig' on windows.

You can tests that it works by using a command call 'ping'. So on the marketing machine you can do

ping marketing

and it should say something like

ping marketing
PING marketing (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.046 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.150 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.117 ms

Have fun learning about the wonderful world of networking. Not that any of this has anything to do with UDDI.

Cheers,

--Kurt









Reply via email to