Configuration of Clients - 6.2

Talend ESB Service Developer Guide

EnrichVersion
6.2
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
Installation and Upgrade
EnrichPlatform
Talend ESB

CXF JAX-RS clients can be configured programmatically or from Spring.

Configuring the clients from Spring often implies that the client instances are injected into JAX-RS or JAX-WS endpoints so that the incoming request can be further delegated to the RESTful service. Both proxies and WebClient instances can be configured from Spring:

<jaxrs:client id="restClient"
   address="http://localhost:9000/test/services/rest"
   serviceClass="server.BookStoreJaxrsJaxws">
   <jaxrs:headers>
      <entry key="Accept" value="text/xml"/>
   </jaxrs:headers>
</jaxrs:client>  
          
<bean id="webClient" class="org.apache.cxf.jaxrs.client.WebClient" 
   factory-method="create"> 
   <constructor-arg type="java.lang.String" 
   value="http://localhost:9000/books/" /> 
</bean>