spring(integration) support for xml over http

I need to integrate our application with a legacy system which accepts xml requests(no contract) over http (POST) and sends another xml as response. Does spring or spring integration has any build in function to do so?

UPDATE: From Artem's suggestion I am using following code.

    <int:channel id="RequestChannel"/>
<int:channel id="ResponseChannel"/>
<int:gateway id="Gateway"
    service-interface="<package>.DataBuilder" default-request-channel="RequestHeaderEnricher"  default-reply-channel="ResponseChannel"/>

<int:channel id="RequestHeaderEnricher"/>
<int:header-enricher input-channel="RequestHeaderEnricher" output-channel="RequestChannel">
    <int:header name="Content-Type" value="text/xml" />
    <int:header name="Accept" value="text/xml" />

<int-http:outbound-gateway id="HttpGateway"
    request-channel="RequestChannel" url="http://<host>:<port>/XML_WS_A"
    http-method="POST"  charset="UTF-8" reply-timeout="6000" reply-channel="ResponseChannel"
    message-converters="messageConverters" request-factory="requestFactory">


<util:list id="messageConverters">
    <ref bean="marshallingHttpMessageConverter"/>

<bean id="marshallingHttpMessageConverter"
  <property name="marshaller" ref="marshaller" />
  <property name="unmarshaller" ref="marshaller" />

<oxm:jaxb2-marshaller id="marshaller">
    <oxm:class-to-be-bound name="<package>.ExternalDataRequest"/>

<bean id="requestFactory"
    <property name="connectTimeout" value="5000"/>
    <property name="readTimeout"    value="5000"/>


Spring MVC provides for this case RestTemplate.

Spring integration provides more high abstraction over RestTemplate - <int-http:outbound-gateway>

For HTTP protocol it doesn't matter which type of data you send. So, you can simply send and receive an XML, e.g. as a String representation.

To get deal with some Object XML Mapping you should study: http://docs.spring.io/spring/docs/4.0.1.RELEASE/spring-framework-reference/htmlsingle/#oxm and http://docs.spring.io/spring-integration/docs/3.0.0.RELEASE/reference/html/xml.html.

I don't see yet other ways to help you, as your question is teorethical and abuts to the Docs.

Need Your Help

Websphere logs report {0} File not found, but application continues to work without issues

java jsp struts websphere file-not-found

A websphere 6.1 server is running a struts application that seems to be working fine. In the logs, however, I'm seeing the following error message, which is being continually emailed to the support...