Click here to Skip to main content
12,887,625 members (33,357 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java WebService

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 28-Sep-12 3:39am
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.
aimdharma 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.
TorstenH. 29-Sep-12 8:15am
True, but the client would have to call first.
But good point.
Sergey Alexandrovich Kryukov 30-Sep-12 18:52pm
The "call" and "connect" are different things. Normally, a client connects, but a call... it depends what is called "client".
Thank you.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100