我从我的企业服务出口类收到无效 XPath 错误,即使 XPath 在在线验证器中验证并返回数据。谁能解释是什么导致了错误?
日志中的错误:
[9/10/18 18:50:45:969 EDT] 00000024 SystemOut O 2018 年 9 月 10 日 18:50:45:969 [错误] [MXServer01] [] BMXAA1297E - 集成处理失败,因为消息包含无效的 XPath 表达式,例如属性指示符 [@]。null psdi.util.MXApplicationException:BMXAA1297E - 集成处理失败,因为消息包含无效的 XPath 表达式,例如属性指示符 [@]。null at psdi.iface.mic.StructureData.getStructureObjectList(StructureData.java:1219) at kub.iface.migexits.FwToMaxFollowupWoCreate.setUserValueIn(FwToMaxFollowupWoCreate.java:65) at psdi.iface.migcallexits.UserExit(Exit) 112)
用户出口中的部分 Java 代码(显示的最后一行抛出错误):
public class FwToMaxFollowupWoCreate extends UserExit {
private static MXLogger myLogger = MXLoggerFactory.getLogger("maximo.abc.custom");
private static final String STREET_CUTS_XPATH = "//*[name()='streetCuts']";
@Override
public StructureData setUserValueIn(StructureData erData) {
try {
if (myLogger.isDebugEnabled()) {
myLogger.debug(className + ": Checking for street cuts");
myLogger.debug(erData.toString());
myLogger.debug("xpath = " + STREET_CUTS_XPATH);
}
List << ? > streetCuts = erData.getStructureObjectList(STREET_CUTS_XPATH);
erData 的价值:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<metaId>2248684-A-388417</metaId>
<WONUM>D18-6286</WONUM>
<ASSETNUM>385691</ASSETNUM>
<LOCATION>G-VALVE-CONTROL-10134902</LOCATION>
<DESCRIPTION_LONGDESCRIPTION>This is a follow up work order created from field work</DESCRIPTION_LONGDESCRIPTION>
<COMMODITYGROUP>UTILITY</COMMODITYGROUP>
<COMMODITY>GAS</COMMODITY>
<REPORTEDBY>THA06318</REPORTEDBY>
<streetCuts>
<workDetails>
<WORKTYPE>PM</WORKTYPE>
<WOPRIORITY>3</WOPRIORITY>
</workDetails>
Smart猫小萌
相关分类