Post new topic Reply to topic  [ 3 posts ] 

Board index : TeleFlow Forums : TeleFlow Developers

Author Message
 Post subject:
PostPosted: Tue Jul 11, 2006 12:42 pm 
Offline

Joined: Wed Jun 21, 2006 12:28 pm
Posts: 15
I'm using the HTTP resource control, It access a web services with the Get command(Http request type). For example: <a href="http://127.0.0.1/WS/GetName?Id=1 " target="_new">http://127.0.0.1/WS/GetName?Id=1 </a><br>After that step I performed a XML Load. They both finalized sucessfully. But when I performed the XML Fetch, it shows this error "Warning: Node has no attributes FAILURE". <br>For example, if the xml is: <br><?xml version="1.0" encoding="utf-8" ?> <br><RESPONSE> <br> <NAME>Card Balance</NAME> <br></RESPONSE> <br>How can I fill the XML Fetch control to obtain the name data. I have tried: <br>---------------------------- <br>XML_HANDLE=022 <br>NODE= RESPONSE->NAME <br>VARIABLE TO REC DATA= @LCLNAME <br>--------------------------- <br>XML_HANDLE=022 <br>RESPONSE->NAME AS LCLNAME <br>--------------------------- <br>XML_HANDLE=022 <br>NODE= RESPONSE <br>NAME AS LCLNAME <br>--------------------------- <br>The problem is that they failed. How can I store the result in the LCLNAME variable? <br> <br>Thanks


Back to top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 11, 2006 2:11 pm 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
The first of your fetch examples was correct. This is actually a problem with the XML Fetch step. <br> <br>This issue (Failure due to empty attributes field) will be fixed in an upcoming release of TeleFlow. <br> <br>In the meantime, you have two possible workarounds: <br> <br>1) You can create some false attributes in the node you are fetching, and retrieve them. <br>Sample XML for this: <br><?xml version="1.0" encoding="utf-8" ?> <br><RESPONSE> <br><NAME UNUSED="UNUSED">Card Balance</NAME> <br></RESPONSE> <br> <br>Attributes field: UNUSED <br> <br>This will create a variable called @UNUSED, but will work. <br> <br>2) Put "UNUSED" in the attributes field. This will cause the step to go down the FAIL path when it tries to retrieve the attribute that isn't in the XML document. You can route the FAIL (bomb) path of the XML fetch to a Compare step. Use that compare to see if the node was empty. If it is empty, assume the fetch failed for some reason other than the attribute problem, or that the node was indeed empty. If it is populated with data, this simply means the step failed because of the missing attribute. You should create the empty local or global variable to receive the node data prior to the XML Fetch.


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Wed Aug 09, 2006 10:39 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
The current release version of TeleFlow addresses this issue. <br> <br>You can now have an empty attributes field, and still run the XML Fetch to retrieve the nodes you are looking for.


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

Board index : TeleFlow Forums : TeleFlow Developers


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.