<int:chain id="chain" input-channel="refundChannel" output-channel="nullChannel">
<int:json-to-object-transformer object-mapper="jackson2JsonObjectMapper"/>
<int:transformer ref="refundTransformer" method="transformToEntry"/>
<int:transformer ref="marshallingTransformer" method="doTransform"/>
<int:header-filter header-names="Content-Type,contentType,content_type,content-type,Accept,accept"/>
<int:header-enricher>
<int:header name="Accept" value="application/xml" overwrite="true"/>
<int:header name="Content-Type" value="application/xml" overwrite="true"/>
<int:header name="Authorization" value="Basic test" overwrite="true"/>
</int:header-enricher>
<int:service-activator ref="messageLogger" method="log"/>
<int-http:outbound-gateway url="${url}refund" http-method="POST"
reply-timeout="20000" header-mapper="httpHeaderMapper" request-factory="bufferingRequestFactory"
expected-response-type="com.xxxxx.response.RefundResponse"/>
<int:service-activator ref="messageLogger" method="log"/>
</int:chain>
As you see, I am getting JSON
message from Channel and converting into Object
and sending http request with xml
type.
However when I receive response, Spring Integration is invoking json
converter instead of xml
unmarshaller and because of the same, I am getting error response.
I tried almost doing everything without success. Using Spring integration 4.1.2.RELEASE
Aucun commentaire:
Enregistrer un commentaire