XPAth query
- 7 years ago
Hi
Please consider the below one
<ac:currentValues>
<ac:currentValue>
<ac:infoKey>dateTimeSent</ac:infoKey>
<ac:value>2018-06-27T15:35:03.098-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>serviceOption</ac:infoKey>
<ac:value>WILL_CALL</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>serviceOptionDisplayName</ac:infoKey>
<ac:value>10 Minute Service</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>originatingCountry</ac:infoKey>
<ac:value>USA</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>exchangeRateApplied</ac:infoKey>
<ac:value>1.00000000000</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>feeAmount</ac:infoKey>
<ac:value>0.00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receive_Country</ac:infoKey>
<ac:value>USA</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>expectedDateOfDelivery</ac:infoKey>
<ac:value>2018-06-27-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_FirstName</ac:infoKey>
<ac:value>DFDFDF</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_LastName</ac:infoKey>
<ac:value>DFDFDF</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_FirstName</ac:infoKey>
<ac:value>DHFD</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_LastName</ac:infoKey>
<ac:value>HGDHFG</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>mgiSessionType</ac:infoKey>
<ac:value>1</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>referenceNumberText</ac:infoKey>
<ac:value>TRANSACTION ON HOLD: Contact MoneyGram to provide additional information before funds can be available to your receiver.</ac:value>
</ac:currentValue>
</ac:currentValues> - 7 years ago
def infoKey = context.expand( '${SoapServiceStep#declare namespace ac=\'http://www.moneygram.com/AgentConnect1705\'; //ac:transactionLookupResponse[1]/ac:Payload[1]/ac:infos[1]/ac:info[2]/ac:infos[1]/ac:info[18]/ac:infoKey[1]}' ) log.info infoKey
This should find your value. Add a groovy step and paste this and update the name of the step where I called it "SoapServiceStep" When you run it you should get the value you are looking to find.