我正在调用下面的其余服务
<resource methods="GET" url-mapping="/getallpayments" faultSequence="error_handler_">
<inSequence>
<log level="custom">
<property name="CashreceiptsService" value="**************Entered into getallpayments*************"/>
<property name="Request Payload" expression="get-property('JSON_OBJECT')"/>
</log>
<property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
<property name="messageType" value="application/json" scope="axis2"/>
<oauthService remoteServiceUrl="https://localhost:9443/services/OAuth2TokenValidationService/" username="admin" password="admin"/>
<log level="custom">
<property name="CashreceiptService" value="^^^^^^^^^^^^OAUTH COMPLETED^^^^^^^^^^^^"/>
<property name="User Name******" expression="get-property('username')"/>
</log>
<send>
<endpoint>
<http format="rest" method="GET" uri-template="http://localhost:8080/rest/commonService/getallpayments"/>
</endpoint>
</send>
<drop/>
</inSequence>
它将给出以下响应
[{"typeId":1,"name":"Entity_Type","value":"EMPLOYER","description":"Employer","createdDate":"08/12/2013","tenantId":0,"hasPhiFields":false},{"typeId":2,"name":"Entity_Type","value":"BROKER","description":"Broker","createdDate":"08/12/2013","tenantId":0,"hasPhiFields":false}]
我能够在 UI 中得到上述响应。但我需要 Api 中的“typeId”响应,并且我需要获取该 typeId 并将其作为输入参数传递给另一个服务,该服务将对 UI 给出最终响应。现在我正在使用服务链来实现。
主要问题是如何获得一项服务的响应并作为输入参数传递给另一项服务?请建议我,我是 WSO2 ESB 的新手。
以及如何获取用户发送的 POST 数据?