-
1. Re: ServletRequest info in JBossRemotingMessageComposer
tcunning Nov 23, 2011 12:07 AM (in response to tomeicher)Maybe this is barking up the wrong tree, but since you're doing this for debugging purposes, I think you could probably get away with just using tcpmon here, no?
-
2. Re: ServletRequest info in JBossRemotingMessageComposer
tomeicher Nov 23, 2011 5:25 AM (in response to tcunning)Well, IP-wise, I'd just see my proxy, that's why I also want to access the HTTP_X_FORWARDED header ;-)
Of course, you can find out anything using tcpmon, ethereal, ...
...but I'd prefer if my log just said "WARN: empty message received from a.b.c.d (forwarded for e.f.g.h)"
I am sure there are other valid use cases for needing to access the HttpServletRequest of in incoming SOAP message,
so pleeeeeeease give me some hints how I could find it.... :o)
Thanks, Tom.
EDIT: This forum editor sucks ;-)
-
3. Re: ServletRequest info in JBossRemotingMessageComposer
tomeicher Jan 12, 2012 9:01 AM (in response to tomeicher)Hmm, it looks as if I could get access to the cookies at
org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener.invoke(InvocationRequest)
however I have yet to see a place (a breakpoint ;-) where the remoteHost is filled somewhere :-(
Ideas anybody ?
Cheers, Tom.
-
4. Re: ServletRequest info in JBossRemotingMessageComposer
tcunning Jan 12, 2012 10:37 AM (in response to tomeicher)1 of 1 people found this helpfulIf you look inside invocationRequest.getRequestPayload() there, it looks like you can get the remoteHost from the coyoteRequest stored within the payload map.
-
5. Re: ServletRequest info in JBossRemotingMessageComposer
tomeicher Jan 12, 2012 10:41 AM (in response to tcunning)Well yes, but that one was always "null" in all my tests. (had a breakpoint there...)
-
6. Re: ServletRequest info in JBossRemotingMessageComposer
tcunning Jan 12, 2012 10:43 AM (in response to tomeicher)I can see the remote host inside the internalMap of the CoyoteRequest. Not sure what method you'll have to call from the CoyoteRequest to grab it.
-
7. Re: ServletRequest info in JBossRemotingMessageComposer
tomeicher Jan 12, 2012 11:48 AM (in response to tcunning)I see
{expect=100-continue, content-type=text/xml; charset=utf-8, host=127.0.0.1:5555, soapaction=deliverMessage, http_x_forwarded=Otto, content-length=1593, accept=*/*, MethodType=POST, user-agent=curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3, HttpVersion=HTTP/1.1, Path=null}
but the host is the "Host:" HTTP header (the one the request is sent TO), not the requests's ServletRequest.getRemoteHost()/getRemoteAddr() ...
BTW, at least the http_x_forwarded can be read here, which helps a lot. ("Otto" is of course just nonsense, I testet with curl and put it there as an "easily identifiable value")