wso2esb - WSO2 ESB REST API Chaining issue -


i facing issues when doing service chaining wso2 esb. below xml file. following use case. need call service 1, response, validation check on , call service 2. through below code able call service 1. service 2 request, have hard coded request in payload. issue coming when setting header parameters. header properties not getting set due call service 2 not going. testing purpose have kept both urls same.

please let me know following: 1. how set http header values. 2. there way persist initial input request , use in second service call.

although synapse configs not there i'll answer question.

  1. you can 2 ways. 1 using header mediator. can reffer this doc. example code below,
<header name="accept" value="image/jpeg" scope="transport"/> 

the second approach using property mediator, can set header value , set scope transport. header property added.

  1. what need assign original request content property, can use later. there many ways this, following example using enrich mediator
<enrich> <source type="body" clone="true"/> <target type="property" property="request"/> </enrich> 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -