You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by v2cg4ss <ss...@datamentors.com> on 2010/03/11 22:40:07 UTC

Remote IP Address from a .NET WCF Client to My Web Service

MessageContext msgCtx = MessageContext.getCurrentMessageContext();
if (msgCtx != null)
{
       System.out.println(msgCtx.getProperty(MessageContext.REMOTE_ADDR));
}

Works great for a Java client: 127.0.0.1 But for a .NET WCF client I get
0:0:0:0:0:0:0:1

Anyone have any IDEAS????
-- 
View this message in context: http://old.nabble.com/Remote-IP-Address-from-a-.NET-WCF-Client-to-My-Web-Service-tp27870259p27870259.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Remote IP Address from a .NET WCF Client to My Web Service

Posted by "José Ferreiro (ホセ フェレイロ)" <jo...@a3.epfl.ch>.
Hey there!

Let's give a try.

Instead of calling 127.0.0.1 specify the DNS of your machine (or computer
name)...
Although I am not having the same problem as you, I also faced a similar
problem and performing this change I was able to get the right IP address of
the client.

Bonne nuit!


On Thu, Mar 11, 2010 at 10:44 PM, Doughty, Michael
<Mi...@bmc.com>wrote:

> Looks like you're .NET WCF Client is using IPv6.  0:0:0:0:0:0:0:1 is the
> loopback IP for IPv6, just as 127.0.0.1 is the loopback IP for IPv4.
>
> -----Original Message-----
> From: v2cg4ss [mailto:sselvia@datamentors.com]
> Sent: Thursday, March 11, 2010 3:40 PM
> To: axis-user@ws.apache.org
> Subject: Remote IP Address from a .NET WCF Client to My Web Service
>
>
> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
>       System.out.println(msgCtx.getProperty(MessageContext.REMOTE_ADDR));
> }
>
> Works great for a Java client: 127.0.0.1 But for a .NET WCF client I get
> 0:0:0:0:0:0:0:1
>
> Anyone have any IDEAS????
> --
> View this message in context:
> http://old.nabble.com/Remote-IP-Address-from-a-.NET-WCF-Client-to-My-Web-Service-tp27870259p27870259.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
José Ferreiro
Systems Analysis and Design Specialist
MSc in Communication Systems, EPFL.

"Think little goals and expect little achievements. Think big goals and win
big success."  David Joseph Schwartz

Re: Remote IP Address from a .NET WCF Client to My Web Service

Posted by Andreas Veithen <an...@gmail.com>.
Martin,

This has nothing to do with chunked encoding. The explanation given by
Michael is correct and complete.

Andreas

On Sat, Mar 13, 2010 at 21:44, Martin Gainty <mg...@hotmail.com> wrote:
> make sure your webserver connector is configured for HTTP 1.1 (to support
> chunked-encoding)
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>> From: Michael_Doughty@bmc.com
>> To: java-user@axis.apache.org; axis-user@ws.apache.org
>> Date: Thu, 11 Mar 2010 14:44:58 -0700
>> Subject: RE: Remote IP Address from a .NET WCF Client to My Web Service
>>
>> Looks like you're .NET WCF Client is using IPv6. 0:0:0:0:0:0:0:1 is the
>> loopback IP for IPv6, just as 127.0.0.1 is the loopback IP for IPv4.
>>
>> -----Original Message-----
>> From: v2cg4ss [mailto:sselvia@datamentors.com]
>> Sent: Thursday, March 11, 2010 3:40 PM
>> To: axis-user@ws.apache.org
>> Subject: Remote IP Address from a .NET WCF Client to My Web Service
>>
>>
>> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
>> if (msgCtx != null)
>> {
>> System.out.println(msgCtx.getProperty(MessageContext.REMOTE_ADDR));
>> }
>>
>> Works great for a Java client: 127.0.0.1 But for a .NET WCF client I get
>> 0:0:0:0:0:0:0:1
>>
>> Anyone have any IDEAS????
>> --
>> View this message in context:
>> http://old.nabble.com/Remote-IP-Address-from-a-.NET-WCF-Client-to-My-Web-Service-tp27870259p27870259.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
> ________________________________
> Hotmail: Trusted email with powerful SPAM protection. Sign up now.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


RE: Remote IP Address from a .NET WCF Client to My Web Service

Posted by Martin Gainty <mg...@hotmail.com>.
make sure your webserver connector is configured for HTTP 1.1 (to support chunked-encoding)

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: Michael_Doughty@bmc.com
> To: java-user@axis.apache.org; axis-user@ws.apache.org
> Date: Thu, 11 Mar 2010 14:44:58 -0700
> Subject: RE: Remote IP Address from a .NET WCF Client to My Web Service
> 
> Looks like you're .NET WCF Client is using IPv6.  0:0:0:0:0:0:0:1 is the loopback IP for IPv6, just as 127.0.0.1 is the loopback IP for IPv4.
> 
> -----Original Message-----
> From: v2cg4ss [mailto:sselvia@datamentors.com] 
> Sent: Thursday, March 11, 2010 3:40 PM
> To: axis-user@ws.apache.org
> Subject: Remote IP Address from a .NET WCF Client to My Web Service
> 
> 
> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
>        System.out.println(msgCtx.getProperty(MessageContext.REMOTE_ADDR));
> }
> 
> Works great for a Java client: 127.0.0.1 But for a .NET WCF client I get
> 0:0:0:0:0:0:0:1
> 
> Anyone have any IDEAS????
> -- 
> View this message in context: http://old.nabble.com/Remote-IP-Address-from-a-.NET-WCF-Client-to-My-Web-Service-tp27870259p27870259.html
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/

RE: Remote IP Address from a .NET WCF Client to My Web Service

Posted by "Doughty, Michael" <Mi...@bmc.com>.
Looks like you're .NET WCF Client is using IPv6.  0:0:0:0:0:0:0:1 is the loopback IP for IPv6, just as 127.0.0.1 is the loopback IP for IPv4.

-----Original Message-----
From: v2cg4ss [mailto:sselvia@datamentors.com] 
Sent: Thursday, March 11, 2010 3:40 PM
To: axis-user@ws.apache.org
Subject: Remote IP Address from a .NET WCF Client to My Web Service


MessageContext msgCtx = MessageContext.getCurrentMessageContext();
if (msgCtx != null)
{
       System.out.println(msgCtx.getProperty(MessageContext.REMOTE_ADDR));
}

Works great for a Java client: 127.0.0.1 But for a .NET WCF client I get
0:0:0:0:0:0:0:1

Anyone have any IDEAS????
-- 
View this message in context: http://old.nabble.com/Remote-IP-Address-from-a-.NET-WCF-Client-to-My-Web-Service-tp27870259p27870259.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org