【发布时间】:2017-12-08 10:45:24
【问题描述】:
我正在尝试在 WSO2 代理中填充属性。我正在使用以下语法和 xpath 表达式:
<property expression="//RelationValueList/PersonnelRelationValueUnitType[RelAttrId='R54' and DateTo=max(//RelationValueList/PersonnelRelationValueUnitType[RelAttrId='R54']/DateTo/xs:dateTime(.))][last()]/RelationValue" name="RelValue" scope="default" type="STRING"/>
这个 Xpath 表达式在在线 Xpath 测试器中运行良好。但是当在属性中介的 WSO2 表达式中使用它时,它会给我以下 Eclipse 错误:
wso2 未知突触配置标签
XML 文档如下所示:
<GetPersonnelResponse>
<GetPersonnelResult>
<RelationValueList>
<PersonnelRelationValueUnitType>
<RelAttrId>C1</RelAttrId>
<RelationValue>1234</RelationValue>
<DateFrom>1900-01-02T00:00:00</DateFrom>
<DateTo>2199-12-31T00:00:00</DateTo>
</PersonnelRelationValueUnitType>
<PersonnelRelationValueUnitType>
<RelAttrId>R54</RelAttrId>
<RelationValue>GEN123</RelationValue>
<DateFrom>1900-01-02T00:00:00</DateFrom>
<DateTo>2017-12-04T00:00:00</DateTo>
</PersonnelRelationValueUnitType>
<PersonnelRelationValueUnitType>
<RelAttrId>R54</RelAttrId>
<RelationValue>GEN456</RelationValue>
<DateFrom>2017-12-05T00:00:00</DateFrom>
<DateTo>2099-12-31T00:00:00</DateTo>
</PersonnelRelationValueUnitType>
</RelationValueList>
</GetPersonnelResult>
</GetPersonnelResponse>
在 WSO2esb 中启用了 Xpath 2.0。 我需要选择具有最高 DateTo 值的 RelationValue。如果有多个值,我取最后一个。
有人知道如何解决这个问题吗?
【问题讨论】:
-
这是完整的错误日志吗?
-
这是来自 Eclipse 的错误。我刚刚添加了完整错误消息的屏幕截图。
-
有人有想法吗?
标签: eclipse xpath properties wso2 mediator