JSON을 WSO2 ESB에 객체로 전달하려고합니다. 나는이 같은 JSON을 얻고있다 :WSO2에서 JSON을 변환하는 방법 ESB
'{FIELDNAME":"NAME",FIELDVALUE:"KISHORE"}'
이 JSON 내가 동적 컬럼으로 내 ESB를 통과해야합니다. 하지만 JSON {"NAME":"KISHORE"}
처럼 받아들입니다. WSO2 ESB에서 JSON보다 위의 값으로 변환하려면 어떻게해야합니까? 내가 하나 이상을 얻으면 나는 대리인에게 패스 할 수 없다. 내가 하나 아래에 있다면 나는이 (//name/child::text())
처럼 전달할 것이고 나는 ENRICH 중재자와 함께 노력했지만 그것이 효과가 없다는 것을 "KISHORE"라고 평가할 것이다.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="test_dynamic" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<enrich>
<source type="body" clone="true"/>
<target type="property" property="RM"/>
</enrich>
<property name="RM" expression="//fieldname/child::text()" scope="default" type="STRING"/>
<log level="custom">
<property name="r_no" expression="get-property('R_no')"/>
<property name="r_value" expression="get-property('R_value')"/>
<property name="emp_d" expression="get-property('emp')"/>
<property name="RM" expression="get-property('RM')"/>
</log>
<log level="full"/>
</inSequence>
</target>
<description></description>
</proxy>
ANS : 요청, 봉투 :
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body><fieldname>e_no</fieldname><fieldvalue>5</fieldvalue></soapenv:Body>
</soapenv:Envelope>
내 검색어는 다음과 같습니다 (select * from emp where col =?; 열은 select *와 같이 동적으로 추가됩니다. emp from? =?; 내가 wso2 dss 또는 wso2 esb에서 어떻게 처리 할 것인가? – Faisal