[英]using enriching response payload from call mediator
我正在通過WSO2 ESB Config語言調用介體調用微服務,然后將請求傳遞給豐富介體,然后登錄並使用響應介體。
我遇到的問題是,盡管我的微服務表明它已被調用並返回了響應有效載荷,但沒有任何錯誤,但我什至看不到微服務返回的有效載荷。 其次,我的序列在運行時會引發錯誤。 我的錯誤如下。
JsonUtil #writeAsJson。 有效負載無法編寫為JSON。 MessageID:urn:uuid:fe8d8ec5-473e-43c0-bc98-22a7211e2d86 [2018-06-08 12:30:26,209] []錯誤-寫入application / json java.lang.reflect.InvocationTargetException時發生了JsonStreamFormatter錯誤
以下是我的順序。
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="balanceEnquirySeq" trace="disable"
xmlns="http://ws.apache.org/ns/synapse">
<property expression="json-eval($.)" name="data_request"
scope="default" type="STRING" />
<log level="custom">
<property expression="json-eval($.)" name="in_request" />
</log>
<switch source="json-eval($.agentInstitutionCode)">
<case regex="001">
<payloadFactory media-type="json">
<format>{
"channel": "",
"type": "",
"customerId": $1,
"customerIdType": "",
"submissionTime": "",
"reqTranId": $2,
"passcode": ""
}
</format>
<args>
<arg evaluator="json" expression="$.agentAccountNumber" />
<arg evaluator="json" expression="$.requestID" />
</args>
</payloadFactory>
<log level="custom">
<property expression="json-eval($.)" name="CHANGED_REQUEST" />
</log>
<property name="messageType" scope="default" type="STRING"
value="application/json" />
<call >
<endpoint>
<http method="post" uri-template="http://127.0.0.1:8080/stanbic/dobalenquiry" />
</endpoint>
</call>
<enrich>
<source type="body" clone="true" />
<target type="property" action="child" property="org_type" />
</enrich>
<log level="full"/>
<respond />
</case>
</switch>
</sequence>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.