Thursday, 15 March 2012

spring integration - Posting empty payload - inbound-gateway -



spring integration - Posting empty payload - inbound-gateway -

i have next config.

<int-http:inbound-gateway request-channel="requestchannel" path="/contractname/-/{resource}/**" supported-methods="post,put,patch,delete" request-payload-type="java.util.linkedhashmap" error-channel="errorchannel" id="inboundgateway" > </int-http:inbound-gateway>

when posting json server payload transformed linkedhashmap expected, in cases need post request has no payload, when posting empty payload conversion fails bad request. wondering if there simple/quick workaround in config tell skip conversion if payload empty. need post "{}" work.

thanks lot.

the 1 way see coding custom httpmessageconverter. , guess need override bit mappingjackson2httpmessageconverter populate empty map empty request body.

spring-integration

No comments:

Post a Comment