0
我想驗證WSO2 ESB 4.0.3中的代理服務中的GET請求參數。我有以下代碼邏輯驗證WSO2 ESB 4.0.3中的GET請求參數時出錯
<filter source="get-property('To')" regex="^(?=.*inSerialNr=).*$">
<then>
<send>
<endpoint key="conf:/tqs/rma/ds_endpoint.xml" />
</send>
</then>
<else>
<log level="custom" separator=",">
<property name="Missing-Input" value="Input validation failed...Missing Input Parameter - inSerialNr" />
</log>
<script language="js"><![CDATA[mc.setPayloadXML(<ERROR><DESCRIPTION>Input validation failed...Missing Input Parameter - inSerialNr</DESCRIPTION></ERROR>);]]></script>
<property name="RESPONSE" value="true" scope="default" type="STRING" />
<send>
<endpoint key="conf:/tqs/tqsAnonymous.xml" />
</send>
<drop />
</else>
</filter>
我期望當參數「inSerialNr」丟失時丟棄消息處理。它怎麼都找不到作爲客戶端的「http://www.w3.org/2005/08/addressing/anonymous」終點。
即使我試着做xslt,將結果作爲文本/純文本發回,但仍無法找到發送到匿名結束點。由於它無法找到終點,所以它會去掉序列並在那裏執行代碼。
如何完成get參數的錯誤處理?
請指教。 謝謝 Abhijit
謝謝阿米拉。這很有幫助。 – 2012-08-07 22:46:20