Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject:
PostPosted: Tue Sep 28, 2004 1:29 pm 
Offline
User avatar

Joined: Fri Feb 06, 2004 11:05 am
Posts: 115
Location: Costa Rica
Using Teleflow Simulator with a small test application, I perform a call to a web service via the HTTP Step (Get call) and leave the result into a variable. <br> <br>From that variable I create a handle with XML Load and then I try to fetch some values from a specific node in the XML structure. <br> <br>But when XML Fetch tries to do so, it aborts with the "access violation" exception... <br> <br>This is part of the log file: <br> <br>Sep 28 14:27:01.48: ==>Main <br>Sep 28 14:27:01.49: [1] START <br>Sep 28 14:27:01.49: [8] Set Language <br>Sep 28 14:27:01.49: Loading language 'E:\32\TeleFlow\Lang_Spanish.dll' <br>Sep 28 14:27:01.51: Setting system variable '@PROMPT' to 'E:\32\TeleFlow\Languages\Spanish' <br>Sep 28 14:27:01.52: [23] Wait for Call <br>Sep 28 14:27:03.02: Wait for 1 rings and then pickup <br>Sep 28 14:27:05.73: Connection delay: 500 ms <br>Sep 28 14:27:06.23: [10] Play <br>Sep 28 14:27:06.24: Message Code: Bienvenida <br>Sep 28 14:27:06.24: Playing 'F:\Projects\[IVRs]\WS_Test\Vox\Eng\Scripts\Welcome.wav' <br>Sep 28 14:27:07.94: [3] Set Local Variable <br>Sep 28 14:27:07.94: Setting local variable '@CARD' to '00000002' <br>Sep 28 14:27:07.94: [12] Set Local Variable <br>Sep 28 14:27:07.94: Setting local variable '@PWD' to '4321' <br>Sep 28 14:27:07.94: [25] Set Local Variable <br>Sep 28 14:27:07.95: Setting local variable '@TEMP' to '' <br>Sep 28 14:27:07.95: [5] HTTP <br>Sep 28 14:27:07.95: Setting global variable '@RESULT_LOGIN' to '' <br>Sep 28 14:27:07.95: Connecting to host '10.3.1.12' <br>Sep 28 14:27:08.00: Sending request: 'GET /ivr/infrastructure.asmx/Login?p_cardNumber=00000002&p_password=4321 HTTP/1.0 <br> <br> User-Agent: TeleFlow <br> <br> Host: 10.3.1.12:80 <br> <br> Accept: */* <br> <br> <br> <br> ' <br>Sep 28 14:27:08.05: Connection successful <br>Sep 28 14:27:08.06: Request successful, waiting for reponse <br>Sep 28 14:27:08.09: Response received: 37 <br>Sep 28 14:27:08.09: Setting global variable '@RESULT_LOGIN' to '<?xml version="1.0" encoding="utf-8"?> <br> <br> <LoginResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://SistemasGalileo.com/Devices/IVR/"> <br> <br> <ResultCode>0</ResultCode> <br> <br> <AccType>CreditCard</AccType> <br> <br> <AccNumber>10000000000002</AccNumber> <br> <br> </LoginResult>' <br>Sep 28 14:27:08.10: [18] XML Load <br>Sep 28 14:27:08.30: [20] XML Fetch <br>Sep 28 14:27:08.30: Handle 1001: Retrieving node '' <br>Sep 28 14:27:08.30: Warning: No variable specified to capture node value <br>Sep 28 14:27:08.30: Variable assignment scope: GLOBAL <br>Sep 28 14:27:08.30: Fetching first node... <br>Sep 28 14:27:08.32: 5A2C17: EXCEPTION_ACCESS_VIOLATION attempting to read at location 0. <br>Sep 28 14:27:08.32: Exception occurred! Thread exiting. <br>Sep 28 14:27:08.32: Shutting down... <br> <br>I've tried this: <br>- Shutting down and restarting TeleFlow <br>- Giving @TEMP a non-null value at initialization <br>- Using different parameters for @CARD & @PWD <br> <br>But nothing... Does anyone know how to debug an access violation generated internally in the Simulator app?


Back to top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 28, 2004 3:41 pm 
Offline
User avatar

Joined: Fri Feb 06, 2004 11:05 am
Posts: 115
Location: Costa Rica
Just to add to this request: I tested specifying a node value and storing this value into a temporary variable @TEMP, with this result: <br> <br>Sep 28 16:38:19.16: Connection successful <br>Sep 28 16:38:19.17: Request successful, waiting for reponse <br>Sep 28 16:38:19.18: Response received: 37 <br>Sep 28 16:38:19.18: Setting global variable '@RESULT_LOGIN' to '<?xml version="1.0" encoding="utf-8"?> <br> <br> <LoginResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://SistemasGalileo.com/Devices/IVR/"> <br> <br> <ResultCode>0</ResultCode> <br> <br> <AccType>CreditCard</AccType> <br> <br> <AccNumber>10000000000002</AccNumber> <br> <br> </LoginResult>' <br>Sep 28 16:38:19.19: [18] XML Load <br>Sep 28 16:38:19.19: [20] XML Fetch <br>Sep 28 16:38:19.20: Handle 1001: Retrieving node 'LoginResult' <br>Sep 28 16:38:19.20: Save node value to '@TEMP' <br>Sep 28 16:38:19.20: Variable assignment scope: LOCAL <br>Sep 28 16:38:19.20: Fetching first node... <br>Sep 28 16:38:19.20: 5A28CD: EXCEPTION_ACCESS_VIOLATION attempting to read at location 0. <br>Sep 28 16:38:19.20: Exception occurred! Thread exiting. <br> <br>So, how can I parse the XML? What am I doing wrong?


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 01, 2004 12:05 pm 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
There is a bug in the XML that occurs if you retrieve the top-level node value or attributes only. Although we are looking into this, there are a couple of things you can do to eliminate the exception and the error you will otherwise have. <br> <br>If you have a single extra document or "wrapper" node for the whole document, that will stop the exception. For example: <br> <br><?xml version="1.0" encoding="utf-8"?> <br><XML> <br><LoginResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://SistemasGalileo.com/Devices/IVR/"> <br> <br><ResultCode>0</ResultCode> <br> <br><AccType>CreditCard</AccType> <br> <br><AccNumber>10000000000002</AccNumber> <br> <br></LoginResult> <br></XML> <br> <br>Next, you will have a problem getting the LoginResult node, because you are trying to gather a node value that doesn't actually exist. If you are trying to get attributes of the LoginResult node, such as the xmlnm:xsd attribute, you must populate the "Attributes:" section of the XML Fetch step with the attributes you want to get. Also, since @XMLNM:XSD is not a valid TeleFlow variable, you will need to "alias" the attribute to a valid TeleFlow variable name. All you must do for this is type AS between the attribute name and the name of the TeleFlow variable you want. So, a single attribute line in the TeleFlow step might look like this: <br>xmlns:xsd AS XMLNSXSD <br> <br>That would, according to your example in the log output, create a TeleFlow variable called @XMLNSXSD which would contain <a href="http://www.w3.org/2001/XMLSchema " target="_new">http://www.w3.org/2001/XMLSchema </a><br> <br>If you were looking for the value of a sub-node of LoginResult, the notation in the node field is actually: <br>Node->Sub-node <br>or, for one of your specific nodes, for example: <br>LoginResult->ResultCode <br>The -> "tells" the server to look at the sub-node.


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Fri Oct 01, 2004 1:51 pm 
Offline
User avatar

Joined: Fri Feb 06, 2004 11:05 am
Posts: 115
Location: Costa Rica
Thanks a lot, Chris. Actually, what I intended to do is read sub-node values, not the attributes, so your second suggestion worked perfectly ;-) <br> <br>I had a small confusion about "attributes" and "nodes" here... Now it's clear to me & the prototype is beginning to work. <br> <br>Thanks again!


Back to top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.