• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Integration Http Adapter

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to pull an page using Spring integration http outbound gateway, basically I want to just pull the page for the given URL say http://yahoo.com and transform it and pass it other layers or activators. Given below is my integration configuration, the problem is everything is configured without any errors but do not get the expected sysout message.


<bean id="httpServiceActivator" class="com.macys.ie.HttpServiceActivator" />
<bean id="httpClientParams" class="org.apache.commons.httpclient.params.HttpClientParams">
<property name="connectionManagerClass" value="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager"/>
</bean>

<bean id="httpClient" class="org.apache.commons.httpclient.HttpClient">
<constructor-arg ref="httpClientParams"/>
</bean>
<bean id="httpClientFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory">
<constructor-arg ref="httpClient"/>
</bean>
<int:channel id="requestChannel"/>
<int-http:outbound-gateway request-channel="requestChannel"
url="http://yahoo.com"
http-method="GET"
request-factory="httpClientFactory"
expected-response-type="java.lang.String" auto-startup="true"
reply-channel="httpResponseChannel" />
<int:channel id="httpResponseChannel" datatype="java.lang.String" />
<int:service-activator input-channel="httpResponseChannel" ref="httpServiceActivator"/>


public class HttpServiceActivator {
/**
* @param msg
*/
@ServiceActivator
public void handleHttpMessage(Message<?> msg){
System.out.println(msg);
}
}

 
bacon. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic