在有 3 个节点的简单消息流中。一个是接收 xml 输入的 MQ 输入节点。另一个是 MQ 输出节点,它正在接收从 MQ 输入传递的消息。中间有跟踪节点。跟踪节点被配置为在文件中生成跟踪。它追踪整个 xml msg,它在文件中的内容。如果我想跟踪 xml 文件的单个标签(如联系电话)怎么办。
IE:
<contactDetails>
<contactName>Acme</contactName>
<contactNumber>09200209</contactNumber>
</contactDetails>
我应该使用哪种模式?我已经尝试过${Body.contactDetails.contactNumber}
,${Environment.contactDetails.contactNumber}
但我的输出为空。任何人都可以帮忙吗?
编辑:以下是整个消息:
<?xml version="1.0" encoding="utf-8"?>
<tns:In_Request xmlns:tns="http://www.ibm.lab.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ActionRequest>O</ActionRequest>
<DateRequest>10/12/2005</DateRequest>
<customerNumber>1</customerNumber>
<customerName>ACME Hardware</customerName>
<customerDetails>
<customerAddress1>1254 Main St</customerAddress1>
<customerAddress2>Suite 12</customerAddress2>
<customerCity>Dime Box</customerCity>
<customerState>TX</customerState>
<customerCountry>USA</customerCountry>
<customerPostalCode>76543</customerPostalCode>
<customerCreditLimit>1200</customerCreditLimit>
<customerCreditScore>123</customerCreditScore>
</customerDetails>
<contactDetails>
<contactFirstName>Freddy</contactFirstName>
<contactLastName>Bloggs</contactLastName>
<contactPhoneNumber>555-123-6543</contactPhoneNumber>
</contactDetails>
<requestDecision>Y</requestDecision>
<comments>Just a Comment</comments>
</tns:In_Request>