camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvsridhar <>
Subject Camel redirect through Rest cxf:rsClient not keeping orgin (host) information in Http Headers
Date Wed, 22 Aug 2012 16:29:42 GMT
We are using Jboss 7.1.1 as our app server and we use camel as the routing
layer. In the following configuration, vendorConsumer receives the request
and redirects the request to the actual provider. In response the provider
sends the data with corresponding hyper links. We create the hyperlink using
HttpHeader host(Host) and context (org.apache.cxf.request.uri) key values.

However for the key (Host)) as part of http header we are only receiving the
redirected URL Host (providerhost)  but not the origin Host name
(REMOTEHOST). *What's the best way to capture this?* I looked through all
HttpHeaders i don't have any key contains such information except the
breadcrumbId but its value has some unique format
([ID-REMOTEHOST-081075-2474-1345582555484-1-42],) not sure how far i can use
this. Do I need use custom http headers for this.

Another question on the same lines, *how do i get the actual protocol
information (http/https)?* 

*Note: *Some times we see the whole HttpHeader object it self is null. Not
sure why Jboss is behaving that way.. 

*Log of the HTTP Header:*
12:10:05,166 INFO  [com.dummy.common.utils.CamelCXFRedirectedURL]
(http--0.0.0 .0-8080-1) {Accept=[text/html, application/xhtml+xml,
application/xml;q=0.9, */* ;q=0.8], accept-encoding=[gzip, deflate],
accept-language=[en-us, en;q=0.5], bre
cache-control=[no-cache] , camelcxfrsresponsegenerictype=[class], connection=[keep-alive], content-type=[*/*],
pragma=[no-cache], user-ag ent=[Mozilla/5.0 (Windows NT 5.1; rv:14.0)
Gecko/20100101 Firefox/14.0.1, Apache  CXF 2.5.1]}

 * /<camel:camelContext>
	   <camel:from uri="cxfrs://bean://vendorConsumer"/>
			<camel:removeHeader headerName="Content-Length" />       
	   <camel:to uri="cxfrs://bean://vendorProducer"/>       

  <cxf:rsServer id="vendorConsumer" address="/Redirect/Vendor"
      <entry key="json" value="application/json"/>
      <entry key="xml" value="application/xml"/>

  <cxf:rsClient id="vendorProducer"
	serviceClass="" inheritHeaders="true"
	loggingFeatureEnabled="true" >

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message