Forums Register Login

problem invoking webservice when 'localhost' in endpoint replaced by machinenm/ipaddr

+Pie Number of slices to send: Send
Hi ,


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 :

http://localhost:4400/ProjectSource/services/projectsourceservicecall

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.

For ex, when I have my websphere portal server runnign, I can type in
http://mymachineIpAddress:9081/wps/portal (this is the homepage for my portal launched on my macine) and its working.


Please suggest me where I am going wrong.

Your earliest solutions are appreciated.

Thanks,
Ravi.
+Pie Number of slices to send: Send
Hi, one question,
can you tell me is there any proxy configured in your machine.

Try adding your computer name or ip in the bypass proxy list and give a try. This might be a wild guess try. Lets try.

Reply back
+Pie Number of slices to send: Send
Hi,

Thanks for the reply.No, there is no proxy configured at my machine.

Thats the reason Ive mentioned that other applications like portals can be accessed using machine name/ip address in the url.

Please let me know if there are anywhere else I'm doing wrong.


Thanks
Ravi.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Hi,

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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
I have found simple workaround: before deploying web service disconnect your computer from network. Then wsdl file will have requested address http://localhost:8080/....
+Pie Number of slices to send: Send
Dear Michael,

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.

Regards,
Wojtek
Slime does not pay. Always keep your tiny ad dry.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 6332 times.
Similar Threads
unable to create Folder in windows using Activex Objects.
unable to create folder in windows using javacript Activex Object
How to access request parameters in Faces Portlets
errors when logged into wps/myportal
Login ID and Password for WebSphere admin console
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:43:09.