我在属性表达式中使用撇号字符时出现问题。 我试过',',但他们失败了。所以,现在我正在管理自己,将其定义为另一个属性,如下所述。如何在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