Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i am having the webservice for addition for two numbers.
i implemented in the java with the webserver jboss 7.1.
Its working fine.
but i wants to find the webclient ip?
i don't know how to find the ip.

can any one help me.
Posted
Comments
TorstenH. 28-Sep-12 10:03am    
The IP address of the client?
The client connects to the server, so you do not really need that. The client has to take action.
@BangIndia 28-Sep-12 10:04am    
ya. it will connect to server. i need know the clinet ip
TorstenH. 28-Sep-12 10:48am    
you do not need to.
The client connects to the server and the server only needs to accept the connection.
That's about all.
Otherwise you will need to make the client be a "server" too and to listen on the network. But that's not how it's supposed to work.
Sergey Alexandrovich Kryukov 28-Sep-12 16:28pm    
You are right. For pure client-server architecture, it's never needed by definition (in case of Web), but even beyond client-server (server-push, publisher-subscriber) it's possible to go about it without the IP. With all TCP-based protocols (including HTTP), the user is connected, and as a result of connection, the server part gets the remote socket (or some wrapper of it) representing the remote client. The server side can store it and use for sending data, not just for receiving.
--SA
TorstenH. 29-Sep-12 8:15am    
True, but the client would have to call first.
But good point.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900