Hello,
New to Plum Voice.
I'm trying to pull a UStmtBal from a webservice response.
In the example below, I am trying to grab the 332.04 value.
Script:
------------
<?xml version="1.0"?>
<vxml version="2.1">
<form>
<data name="thedata" src="http://10.5.35.40/csp/test1/BAR.WS.Gen. ... id=5167565"/>
<block>
Your balance is <value expr="thedata.documentElement.childNodes.item(0).getElementsByTagName('UStmtBal')"/>.
</block>
</form>
</vxml>
WebService:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<UStatementBalanceResponse xmlns="http://mytestserver/cb/BAR.WS.Gen.Account">
<UStatementBalanceResult>
<AccountUStatementBalance>
<AccountUStatementBalance>
<UStmtBal>332.04</UStmtBal>
</AccountUStatementBalance>
</AccountUStatementBalance>
</UStatementBalanceResult>
</UStatementBalanceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
WebService
Re: WebService
To grab the 332.04, your <value> tag needs to looks like this:
This is because 332.04 is nested inside 7 tags in the SOAP's return.
Code: Select all
<value expr="thedata.documentElement.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.toString()"/>
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: WebService
Thank you, I did finally figure this out. I didn't realize this posting went through as I never saw anything that indicated it was created, otherwise I would have removed the posting (if that is possible).
Thanks anyway.
Don
Thanks anyway.
Don