title: Spring integration : Http outbaound gateway with Jaxb2RootElementHttpMessageConverter
body: <p>I have to call external service for different endpoints. there are <code>http-outbound</code> gateways. Each end point accepting different data like <code>json</code> or <code>xml</code>. Below is the configuration to produce/consume <code>xml</code>:</p>
  <pre><code>&lt;int-http:outbound-gateway
          id=&quot;ca.outbound.gateway&quot; 
          request-channel=&quot;ca.request.channel&quot; url-expression=&quot;http://localhost:9988/current/acct/create&quot;
          http-method-expression=&quot;POST&quot;
          message-converters=&quot;Jaxb2RootElementHttpMessageConverter&quot;
          expected-response-type-expression=&quot;com.ds.Account&quot;      
          charset=&quot;UTF-8&quot; reply-timeout=&quot;5000&quot; reply-channel=&quot;ca.reply.channel&quot;&gt;
  &lt;/int-http:outbound-gateway&gt;
  </code></pre>
  <p>But while starting the application, getting error like:
  <code>APPLICATION FAILED TO START</code></p>
  <p><code>A component required a bean named 'Jaxb2RootElementHttpMessageConverter' that could not be found.</code></p>
  <p><code>Consider defining a bean named 'Jaxb2RootElementHttpMessageConverter' in your configuration.</code></p>
  <p><em>Note</em>: <code>Jaxb2RootElementHttpMessageConverter</code> class is present in Classpath <code>Spring-web-5.0.5.RELEASE.jar</code>.</p>
  <p>I am not sure how to resolve this error.</p>