我正在尝试将一些额外的静态数据添加到入站http消息(作为URL参数接收)有效负载,然后再将其提交到基于出站http表单的端点.我的mule配置如下:
<flow name="login" doc:name="login">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8081/login" doc:name="Login"/>
<http:body-to-parameter-map-transformer doc:name="Body to Parameter Map"/>
<http:outbound-endpoint address="http://localhost:8090/mayapp/Main/login.do"
method="POST" contentType="application/x-www-form-urlencoded" exchange-pattern="request-response">
</http:outbound-endpoint>
</flow>
Run Code Online (Sandbox Code Playgroud)
以上将URL参数转换为http表单POST(名称/值对)非常好.我现在需要的是能够为POST(ed)数据添加新的名称 - 值对吗?我发布的表单需要一些静态数据(作为隐藏的HTML字段发布),我希望将其作为转换过程的一部分来处理.
我已经设法使用自定义组件完成此任务.我想知道是否有更简单的方法来处理这个使用Mule的原生变换器/消息处理器!