Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I have developed a webservice and hosted it on WebSphere AppServerr6.0, I have used an IDE (Rational App Developer) to create the webservice and wsdl's. The endpoint thats created for the webservice looks something like :
This webservice is running fine when I put in the above url in the browser and can see its working. The webservice is running on my machine itself.
The problem I am facing is that if I replace the 'localhost' in the endpoint with the name of my machine name or ipaddress, I get to see a 'Page Cannot be Displayed' error. I really dont see any difference in both endpoints.
I am sure that the network is able to recognize the machine name/ipaddress because I can test other applications(NOT WEBSERVICES) by using the machine name/ipaddress instead of the localhost.
Could it be a firewall on your machine blocking port 4400 ? Don't fully understand the significance of using IP address or localhost - but guess that localhost is known to be local but actual IP address is affected by firewall, would that make sense ?
Not really related but wonder if using loopback address 127.0.0.1 would be equivalent to localhost.
I have got the same problem. I configured my Sun Application Server 9 to listen on localhost port only (127.0.0.1), because I connect my laptop to many differents networks (university, home) and I don't want to publish application server to the world.
Now I am dealing with Sun's tutorial "firstwebcup". Everything was ok when application server had been listening on all ip ports. My troubles began after I had reconfigured it to listen 127.0.0.1 port only .
Now when I connect to deployed web service through the browser I get XML, that shows that web service schema is available under hard coded address "http://192.168.130.4:8080/..." - where 192.168.130.4 is IP address in my home network.
When I try to get connection from ejb to web service, logs show that it is unable to connect to "http://192.168.230.155:8080/...", where 192.168.230.155 is IP address from DHCP at the university (I have deployed web application when I was connected to the network of my university).
In this project I have used "localhost" everywhere, for each service. It seems that NetBeans or Java Application Server resolves localhost to IP address of my network card.
Now, as you know why replacing endpoint with ipaddress is a problem, could you help us?
I don't know why its a problem - I've tried to replicate it by blocking a port ( following instructions here http://support.microsoft.com/kb/813878 , for anyone who's interested in doing it on Windows ), but I was still able to use the machine's IP address (I double checked that the port was actually blocked by trying to connect from another PC). Be interested to hear if yo get to the bottom of this.
localhost and 127.0.0.1 should be equivalent, assuming hosts file (normally in C:\WINDOWS\system32\drivers\etc on Windows) is set up correctly.
Thank your for your responses, but I suppouse that you don't understand our problem:
When webservice is deployed, its wsdl file consists information, that web service schema is available under ipaddress of my computer, and not under localhost address. When I switch my computer from home netowork to the university network and it gets new ipaddress, then all web services become unavailable, because they listen on ipaddress of my home network and not university network.
Good heavens! What have you done! Here, try to fix it with this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth