Author |
Message
|
arunkumar1989 |
Posted: Tue Apr 16, 2013 8:34 pm Post subject: How to get requester ip address in esql? |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
Hi all,
Flow :
SOAP Input --->
HTTP Input ----> Compute Node --->....
MQ Input ------->
Question is:
I can pass input from different client machine...
How can i get client(Requester) IP Address in ESQL(Compute Node).. _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
mapa |
Posted: Tue Apr 16, 2013 9:21 pm Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Check the WMB infocenter for "HTTP headers".
Look at the samples provided by the toolkit.
And if you like trial-and-error then you can trace or debug your flow to see what comes in. |
|
Back to top |
|
 |
arunkumar1989 |
Posted: Tue Apr 16, 2013 9:45 pm Post subject: |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
thanks mapa....but
If i use InputRoot.XMLNSC.HttpInputHeader.X-Server-Addr or
InputRoot.XMLNSC.HttpInputHeader.X-Remote-Addr will raise error.
if i use host null value will return..
which property i need to use...  _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
mapa |
Posted: Tue Apr 16, 2013 9:58 pm Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Yes, that I understand.
1. That is not proper ESQL syntax for field names with - in them, you need to put such elements in "this-is-a-fieldname".
2. The header is not part of the payload message (since it is a header)
So, if you do a proper usertrace or debug your flow as I suggested you will see the correct path and what values are available to you in the incoming message.
Learning to do that is one of the most important tools as a WMB developer. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Apr 16, 2013 10:20 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
In a flow that uses HTTP Input -> HTTP-Reply nodes a bit of ESQL like
Code: |
declare refIn reference to InputRoot.HTTPInputHeader;
declare HTTPQuery CHARACTER refIn."X-Query-String" || '&';
|
Allows me to query the sorts of values that you are saying raises an error.
The above code is not your solution but the format (As suggested by eSA) is clearly there. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|