我在屬性表達式中使用撇號字符時出現問題。 我試過',',但他們失敗了。所以,現在我正在管理自己,將其定義爲另一個屬性,如下所述。如何在fn:concat-property表達式中使用撇號字符WSO2 ESB
<property value="'" name="apos" scope="default" type="STRING"/>
<property description="xpathexpr" expression="fn:concat('$ctx:hotel-static-data-rs//jsonObject/rows[id=',$ctx:apos,'hotelbeds_v3-',$ctx:hotelcode,$ctx:apos,']/value')" name="xpathexpr" scope="default" type="STRING"/>
<property description="hotel-static-data-element" expression="evaluate($ctx:xpathexpr)" name="hotel-static-data-element" scope="default" type="OM"/>
我確定必須有更好的方法來處理這個問題。所以,如果有人有線索請更新。
- WSO2 ESB版本:5.0.0
您可以試試[1]。 [1] http://stackoverflow.com/questions/42862240/how-to-escape-apostrophe-in-wso2-property-xpath-expression –
我也現在做它以同樣的方式,vivekanathan。我在提問中提到過。我認爲必須有更好的方式,而不是將其定義爲常量。 – namalfernandolk