Configuration of Clients - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

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>