Re: XML - no encoding
CDATA: MyXMLObj.MyXMLChild[1].XMLCData=http://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote: I'm working with a vendor to troubleshoot an error and he's asked me to *not* replace with amp; etc in a URL field. I'm building an XML doc with xmlnew() and then posting it with cfhttp method=post and I'm not explicitly calling urlencodedformat() or anything. CF is just automatically and (I think) correctly performing the encoding. Any way I can stop this from happening just for the duration of the troubleshooting...? -- John Bliss - http://www.linkedin.com/in/jbliss ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358744 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML - no encoding
So, using your example, instead of: MyXMLObj.MyXMLChild[1] = 'http://myurl.com?x=ya=b'; ...I'd use: MyXMLObj.MyXMLChild[1].XMLCData = 'http://myurl.com?x=ya=b'; ...? On Tue, Jun 17, 2014 at 2:39 PM, Jon Clausen jon_clau...@silowebworks.com wrote: CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote: I'm working with a vendor to troubleshoot an error and he's asked me to *not* replace with amp; etc in a URL field. I'm building an XML doc with xmlnew() and then posting it with cfhttp method=post and I'm not explicitly calling urlencodedformat() or anything. CF is just automatically and (I think) correctly performing the encoding. Any way I can stop this from happening just for the duration of the troubleshooting...? -- John Bliss - http://www.linkedin.com/in/jbliss ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML - no encoding
Exactly. On Jun 17, 2014, at 2:54 PM, John M Bliss bliss.j...@gmail.com wrote: So, using your example, instead of: MyXMLObj.MyXMLChild[1] = 'http://myurl.com?x=ya=b'; ...I'd use: MyXMLObj.MyXMLChild[1].XMLCData = 'http://myurl.com?x=ya=b'; ...? On Tue, Jun 17, 2014 at 2:39 PM, Jon Clausen jon_clau...@silowebworks.com wrote: CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote: I'm working with a vendor to troubleshoot an error and he's asked me to *not* replace with amp; etc in a URL field. I'm building an XML doc with xmlnew() and then posting it with cfhttp method=post and I'm not explicitly calling urlencodedformat() or anything. CF is just automatically and (I think) correctly performing the encoding. Any way I can stop this from happening just for the duration of the troubleshooting...? -- John Bliss - http://www.linkedin.com/in/jbliss ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358746 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML - no encoding
CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. I'm pretty sure that this will only work for element values, not attribute values. I'm not sure whether John's using this in an element or an attribute. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358747 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML - no encoding
Element. This changed my XML from this: Urlhttp://myurl.com/?x=yamp;a=b/Url ...to this: Url![CDATA[ http://myurl.com/?x=ya=b]]/Url ...which, I guess, was the desired effect. Now, response I'm getting has changed to, URL 'http:// http://myurl.com/?x=ya=b' is not in the expected format. Repeating http://; is new... On Tue, Jun 17, 2014 at 3:03 PM, Dave Watts dwa...@figleaf.com wrote: CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. I'm pretty sure that this will only work for element values, not attribute values. I'm not sure whether John's using this in an element or an attribute. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML - no encoding
SOLVED: URL had leading space. trim() fixed it. Thanks! :-) On Tue, Jun 17, 2014 at 3:10 PM, John M Bliss bliss.j...@gmail.com wrote: Element. This changed my XML from this: Urlhttp://myurl.com/?x=yamp;a=b http://myurl.com/?x=ya=b/Url ...to this: Url![CDATA[ http://myurl.com/?x=ya=b]]/Url ...which, I guess, was the desired effect. Now, response I'm getting has changed to, URL 'http:// http://myurl.com/?x=ya=b' is not in the expected format. Repeating http://; is new... On Tue, Jun 17, 2014 at 3:03 PM, Dave Watts dwa...@figleaf.com wrote: CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b'; Most XML libraries for other languages will read CDATA just like they would a non-escaped node. I'm pretty sure that this will only work for element values, not attribute values. I'm not sure whether John's using this in an element or an attribute. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML Security
I was presented with some questions regarding XML and was wondering if there are any setting in Coldfusion to disable any of these or I do not need to worry about it since we do not use any XML in our code: 1. How application employs methods for XML schema validation. 2. How application disables use of inline XML Document Type Definition (DTD) schemas in XML parsing objects. 3. How application manages DTD parsing behavior as a key to preventing the invocation of XML bombs. Is it safe to say IF we were to use XML we could use the XML validation function built in CF9? Honestly, I don't know whether CF's validation would prevent any of these issues. CF's parser does allow you to declare DTD entities directly within an XML document, I think. You'd need to pre-parse the document yourself to prevent this, perhaps. But since your application doesn't use XML, your best bet is to say just that, and no more. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350660 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML Security
That's correct Chad. If you run linux or strict casing this is also a security improvement over loose DTD as well. It eerily close to SOX compliance questions that auditors generally ask when reviewing apps. On Thu, Apr 5, 2012 at 8:52 AM, Chad Baloga cbal...@gmail.com wrote: I was presented with some questions regarding XML and was wondering if there are any setting in Coldfusion to disable any of these or I do not need to worry about it since we do not use any XML in our code: 1. How application employs methods for XML schema validation. 2. How application disables use of inline XML Document Type Definition (DTD) schemas in XML parsing objects. 3. How application manages DTD parsing behavior as a key to preventing the invocation of XML bombs. Is it safe to say IF we were to use XML we could use the XML validation function built in CF9? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350645 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML and unicode: 0x1a
I don't want to sound stupid but how does regex work? I could use something similar to this and always fall flat on my face every time someone mentions regex Ken Hammond IT Director The Salem Group Phone: 630-873-3018 Fax: 630-932-7010 Email: khamm...@saleminc.com www.saleminc.com On Feb 23, 2012, at 1:04 PM, Leigh wrote: Have you tried a regex replace of \x1a ? It *might* work. Worth a shot anyway. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350187 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML and unicode: 0x1a
Have you tried a regex replace of \x1a ? It *might* work. Worth a shot anyway. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350079 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML and unicode: 0x1a
On 2/24/2012 2:04 AM, Leigh wrote: Have you tried a regex replace of \x1a ? It *might* work. Worth a shot anyway. and there are several other codepoints that are illegal in XML. probably should sweep them all away. these are supposed to be a-ok for XML: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] /* any Unicode character, excluding the surrogate blocks, FFFE, and . */ http://www.w3.org/TR/REC-xml/#charsets so maybe this (probably wrong, regex isn't my strong suit): [^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x1-x10] - No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1913 / Virus Database: 2114/4827 - Release Date: 02/23/12 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350085 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: XML! Aaargh! How do I do this?
Hopefully, the error of my ways will be obvious to thos of you who work with xml a lot, but...HELP!!! Given this demo xml: ?xml version=1.0? Products Category ID=1Air Conditioners/Category SubCategory ID=1 SubCategoryNameAir Conditioners/SubCategoryName ShortDescription/ LongDescription/ Product ID=XC21 New=N EnergyStar=Y SortOrder=100 ModelNumberXC21/ModelNumber ModelNameXC21 Air Conditioner/ModelName OneLinerThe most quiet and efficient central air conditioner you can buy/OneLiner Ratings Rating Type=SEERup to 20.5/Rating Rating Type=Sound69/Rating /Ratings SmallImagehttp://www.lennox.com/res/photos/44383_small.jpg/SmallImage PriceGuide$$$/PriceGuide /Product (product repeats ...) What's wrong with this code? I constantly get the error: The value coldfusion.xml.XmlNodeList cannot be converted to a number. The error occurred on line 44, which reads: cfset arrResult = xmlSearch(xmllennox-products,xp) Suggests, good tutorials? The one I've been following isn't quite complete enough the complexity of my xml sheet. Rick html head titleLennox XML Search Test/title /head body h1xmlSearch()/h1 cfset xmlLennox = xmlParse(expandPath('lennox-products.xml')) cfoutput table border='1' cellpadding='2' cellspacing='0' tr thXPath/th thResult/th /tr cfset arrXPs = arrayNew(1) cfset arrayAppend(arrXPs,'/products') cfset arrayAppend(arrXPs,'/products/category') cfset arrayAppend(arrXPs,'/products/category/subCategory') cfset arrayAppend(arrXPs,'/products/category/subCategory/subCategoryName') cfset arrayAppend(arrXPs,'/products/category/subCategory/shortDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/longDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelNumber') cfset arrayAppend(arrXPs,'/produtts/category/subCategory/product/modelName') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelName/text()' ) cfset arrayAppend(arrXPs,'/products/category/subCategory/product/oneLiner') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/ratings') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/smallImage') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/priceGuide') cfloop index='index' from='1' to='#arrayLen(arrXPs)#' cfset xp = arrXPs[index] cfset arrResult = xmlSearch(xmllennox-products,xp) tr valign='top' td#xp#/td td ul cfloop index='index' from='1' to='#arrayLen(arrResult)#' li#xmlGetNodeType(arrResult[index])#: cftry #arrResult[index].xmlText# cfcatch type='any'#arrResult[index]#/cfcatch /cftry /li /cfloop /ul /td /tr /cfloop /table /cfoutput /body /html -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Friday, December 30, 2011 8:14 PM To: cf-talk Subject: Re: XML! Aaargh! How do I do this? If you are just after products, you can dramatically simplify the code by using xmlsearch() to get them with xpath instead of manually looping multiple levels down. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ On 31 December 2011 08:50, Justin Scott leviat...@darktech.org wrote: Okay... I've worked this every way I can think of and, I admit it, I just don't get it. Hi Rick, replace your inner-most loop with the following. It should get you going in the right direction. It looks like there is another layer of sub
Re: XML! Aaargh! How do I do this?
Rick, I generally find the easiest way to work through an XML doc is to create a page that just converts it to an XMLDOC first using cfxml or xmlparse() and them CFDUMP the result. This makes it must easier to find the node references you need to loop through or reference. I also prefer to simplify my code by creating a new reference out deep nested blocks, such as nodes I need to loop over, as this results in shorter references, especially if they contains array counters, dynamic evaluations etc to get at the correct element. If your still struggling, then I would suggest posting the full code and XML at pastebin.com so we can see it and test it. -- Russ Michaels www.bluethunderinternet.com : Business hosting services solutions www.cfmldeveloper.com: ColdFusion developer community www.michaels.me.uk : my blog www.cfsearch.com : ColdFusion search engine ** *skype me* : russmichaels ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349285 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: XML! Aaargh! How do I do this?
What are the values of xmllennox in the xml page (or what is it supposed to be derived from)? And what is the search trying to search for? -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Sunday, January 01, 2012 3:53 PM To: cf-talk Subject: RE: XML! Aaargh! How do I do this? Hopefully, the error of my ways will be obvious to thos of you who work with xml a lot, but...HELP!!! Given this demo xml: ?xml version=1.0? Products Category ID=1Air Conditioners/Category SubCategory ID=1 SubCategoryNameAir Conditioners/SubCategoryName ShortDescription/ LongDescription/ Product ID=XC21 New=N EnergyStar=Y SortOrder=100 ModelNumberXC21/ModelNumber ModelNameXC21 Air Conditioner/ModelName OneLinerThe most quiet and efficient central air conditioner you can buy/OneLiner Ratings Rating Type=SEERup to 20.5/Rating Rating Type=Sound69/Rating /Ratings SmallImagehttp://www.lennox.com/res/photos/44383_small.jpg/SmallImage PriceGuide$$$/PriceGuide /Product (product repeats ...) What's wrong with this code? I constantly get the error: The value coldfusion.xml.XmlNodeList cannot be converted to a number. The error occurred on line 44, which reads: cfset arrResult = xmlSearch(xmllennox-products,xp) Suggests, good tutorials? The one I've been following isn't quite complete enough the complexity of my xml sheet. Rick html head titleLennox XML Search Test/title /head body h1xmlSearch()/h1 cfset xmlLennox = xmlParse(expandPath('lennox-products.xml')) cfoutput table border='1' cellpadding='2' cellspacing='0' tr thXPath/th thResult/th /tr cfset arrXPs = arrayNew(1) cfset arrayAppend(arrXPs,'/products') cfset arrayAppend(arrXPs,'/products/category') cfset arrayAppend(arrXPs,'/products/category/subCategory') cfset arrayAppend(arrXPs,'/products/category/subCategory/subCategoryName') cfset arrayAppend(arrXPs,'/products/category/subCategory/shortDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/longDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelNumber') cfset arrayAppend(arrXPs,'/produtts/category/subCategory/product/modelName') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelName/text()' ) cfset arrayAppend(arrXPs,'/products/category/subCategory/product/oneLiner') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/ratings') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/smallImage') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/priceGuide') cfloop index='index' from='1' to='#arrayLen(arrXPs)#' cfset xp = arrXPs[index] cfset arrResult = xmlSearch(xmllennox-products,xp) tr valign='top' td#xp#/td td ul cfloop index='index' from='1' to='#arrayLen(arrResult)#' li#xmlGetNodeType(arrResult[index])#: cftry #arrResult[index].xmlText# cfcatch type='any'#arrResult[index]#/cfcatch /cftry /li /cfloop /ul /td /tr /cfloop /table /cfoutput /body /html -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Friday, December 30, 2011 8:14 PM To: cf-talk Subject: Re: XML! Aaargh! How do I do this? If you are just after products, you can dramatically simplify the code by using xmlsearch() to get them with xpath instead of manually looping multiple levels down. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au
RE: XML! Aaargh! How do I do this?
Sorry, guys... complete forgot to post the CF code! At this point, all I'm really after is the modelName/text() (See below)... I just haven't gotten to the point where I understand how to parse through the node and info, therein. If you need more code, I'll go to pastbin. Thanks for the feedback! Rick html head titleLennox XML Search Test/title /head body h1xmlSearch()/h1 cfset xmlLennox = xmlParse(expandPath('lennox-products.xml')) cfoutput table border='1' cellpadding='2' cellspacing='0' tr thXPath/th thResult/th /tr cfset arrXPs = arrayNew(1) cfset arrayAppend(arrXPs,'/products') cfset arrayAppend(arrXPs,'/products/category') cfset arrayAppend(arrXPs,'/products/category/subCategory') cfset arrayAppend(arrXPs,'/products/category/subCategory/subCategoryName') cfset arrayAppend(arrXPs,'/products/category/subCategory/shortDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/longDescription') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelNumber') cfset arrayAppend(arrXPs,'/produtts/category/subCategory/product/modelName') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/modelName/text()' ) cfset arrayAppend(arrXPs,'/products/category/subCategory/product/oneLiner') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/ratings') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/smallImage') cfset arrayAppend(arrXPs,'/products/category/subCategory/product/priceGuide') cfloop index='index' from='1' to='#arrayLen(arrXPs)#' cfset xp = arrXPs[index] cfset arrResult = xmlSearch(xmllennox-products,xp) tr valign='top' td#xp#/td td ul cfloop index='index' from='1' to='#arrayLen(arrResult)#' li#xmlGetNodeType(arrResult[index])#: cftry #arrResult[index].xmlText# cfcatch type='any'#arrResult[index]#/cfcatch /cftry /li /cfloop /ul /td /tr /cfloop /table /cfoutput /body /html -Original Message- From: Eric Roberts [mailto:ow...@threeravensconsulting.com] Sent: Sunday, January 01, 2012 6:32 PM To: cf-talk Subject: RE: XML! Aaargh! How do I do this? What are the values of xmllennox in the xml page (or what is it supposed to be derived from)? And what is the search trying to search for? -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Sunday, January 01, 2012 3:53 PM To: cf-talk Subject: RE: XML! Aaargh! How do I do this? Hopefully, the error of my ways will be obvious to thos of you who work with xml a lot, but...HELP!!! Given this demo xml: ?xml version=1.0? Products Category ID=1Air Conditioners/Category SubCategory ID=1 SubCategoryNameAir Conditioners/SubCategoryName ShortDescription/ LongDescription/ Product ID=XC21 New=N EnergyStar=Y SortOrder=100 ModelNumberXC21/ModelNumber ModelNameXC21 Air Conditioner/ModelName OneLinerThe most quiet and efficient central air conditioner you can buy/OneLiner Ratings Rating Type=SEERup to 20.5/Rating Rating Type=Sound69/Rating /Ratings SmallImagehttp://www.lennox.com/res/photos/44383_small.jpg/SmallImage PriceGuide$$$/PriceGuide /Product (product repeats ...) What's wrong with this code? I constantly get the error: The value coldfusion.xml.XmlNodeList cannot be converted to a number. The error occurred on line 44, which reads: cfset arrResult = xmlSearch(xmllennox-products,xp) Suggests, good tutorials? The one I've been following isn't quite complete enough the complexity of my xml sheet
Re: XML! Aaargh! How do I do this?
Try searching directly for the modelName: cfset result = xmlSearch(xmllennox-products,//modelName) Dump that result to see how to get the name. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ On 2 January 2012 09:18, Rick Faircloth r...@whitestonemedia.com wrote: At this point, all I'm really after is the modelName/text() ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349288 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML! Aaargh! How do I do this?
BTW, the issue with the existing code is this: xmllennox-products CF thinks you are trying to do maths on xmllennox and products by subtracting one from the other. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ On 2 January 2012 10:10, James Holmes james.hol...@gmail.com wrote: xmllennox-products ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349289 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML! Aaargh! How do I do this?
Okay... I've worked this every way I can think of and, I admit it, I just don't get it. Hi Rick, replace your inner-most loop with the following. It should get you going in the right direction. It looks like there is another layer of sub-categories which needs to be accounted for: !--- Loop over the sub-categories --- cfloop from='1' to='#arrayLen(xmlProductContent.products.SubCategory)#' index='subCategoryCount' !--- Localize our current sub-category --- cfset thisSubCategory = xmlProductContent.products.SubCategory[subCategoryCount] / h2#thisSubCategory.SubCategoryName.xmlText#/h2 !--- Loop over the products in this sub-category --- cfloop from=1 to=#arrayLen(thisSubCategory.Product)# index=productCount !--- Localize our current product for easier access --- cfset thisProduct = thisSubCategory.Product[productCount] / !---cfdump var=#thisProduct# /--- p ID: #thisProduct.xmlAttributes.ID#br / Model Name: #thisProduct.ModelName.xmlText#br / Image: img src=#thisProduct.SmallImage.xmlText# / /p /cfloop !--- Products --- /cfloop !--- Sub-Categories --- -Justin Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349274 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML! Aaargh! How do I do this?
If you are just after products, you can dramatically simplify the code by using xmlsearch() to get them with xpath instead of manually looping multiple levels down. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ On 31 December 2011 08:50, Justin Scott leviat...@darktech.org wrote: Okay... I've worked this every way I can think of and, I admit it, I just don't get it. Hi Rick, replace your inner-most loop with the following. It should get you going in the right direction. It looks like there is another layer of sub-categories which needs to be accounted for: !--- Loop over the sub-categories --- cfloop from='1' to='#arrayLen(xmlProductContent.products.SubCategory)#' index='subCategoryCount' !--- Localize our current sub-category --- cfset thisSubCategory = xmlProductContent.products.SubCategory[subCategoryCount] / h2#thisSubCategory.SubCategoryName.xmlText#/h2 !--- Loop over the products in this sub-category --- cfloop from=1 to=#arrayLen(thisSubCategory.Product)# index=productCount !--- Localize our current product for easier access --- cfset thisProduct = thisSubCategory.Product[productCount] / !---cfdump var=#thisProduct# /--- p ID: #thisProduct.xmlAttributes.ID#br / Model Name: #thisProduct.ModelName.xmlText#br / Image: img src=#thisProduct.SmallImage.xmlText# / /p /cfloop !--- Products --- /cfloop !--- Sub-Categories --- -Justin Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349275 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: XML! Aaargh! How do I do this?
Thanks for the tip, Justin! I'll give it a try! Rick -Original Message- From: Justin Scott [mailto:leviat...@darktech.org] Sent: Friday, December 30, 2011 7:51 PM To: cf-talk Subject: Re: XML! Aaargh! How do I do this? Okay... I've worked this every way I can think of and, I admit it, I just don't get it. Hi Rick, replace your inner-most loop with the following. It should get you going in the right direction. It looks like there is another layer of sub-categories which needs to be accounted for: !--- Loop over the sub-categories --- cfloop from='1' to='#arrayLen(xmlProductContent.products.SubCategory)#' index='subCategoryCount' !--- Localize our current sub-category --- cfset thisSubCategory = xmlProductContent.products.SubCategory[subCategoryCount] / h2#thisSubCategory.SubCategoryName.xmlText#/h2 !--- Loop over the products in this sub-category --- cfloop from=1 to=#arrayLen(thisSubCategory.Product)# index=productCount !--- Localize our current product for easier access --- cfset thisProduct = thisSubCategory.Product[productCount] / !---cfdump var=#thisProduct# /--- p ID: #thisProduct.xmlAttributes.ID#br / Model Name: #thisProduct.ModelName.xmlText#br / Image: img src=#thisProduct.SmallImage.xmlText# / /p /cfloop !--- Products --- /cfloop !--- Sub-Categories --- -Justin Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349276 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: XML! Aaargh! How do I do this?
Thanks for the info, James! I had actually been doing some more research on CF and XML and was reading about xmlSearch. I'll give that try, too. Rick -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Friday, December 30, 2011 8:14 PM To: cf-talk Subject: Re: XML! Aaargh! How do I do this? If you are just after products, you can dramatically simplify the code by using xmlsearch() to get them with xpath instead of manually looping multiple levels down. -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ On 31 December 2011 08:50, Justin Scott leviat...@darktech.org wrote: Okay... I've worked this every way I can think of and, I admit it, I just don't get it. Hi Rick, replace your inner-most loop with the following. It should get you going in the right direction. It looks like there is another layer of sub-categories which needs to be accounted for: !--- Loop over the sub-categories --- cfloop from='1' to='#arrayLen(xmlProductContent.products.SubCategory)#' index='subCategoryCount' !--- Localize our current sub-category --- cfset thisSubCategory = xmlProductContent.products.SubCategory[subCategoryCount] / h2#thisSubCategory.SubCategoryName.xmlText#/h2 !--- Loop over the products in this sub-category --- cfloop from=1 to=#arrayLen(thisSubCategory.Product)# index=productCount !--- Localize our current product for easier access --- cfset thisProduct = thisSubCategory.Product[productCount] / !---cfdump var=#thisProduct# /--- p ID: #thisProduct.xmlAttributes.ID#br / Model Name: #thisProduct.ModelName.xmlText#br / Image: img src=#thisProduct.SmallImage.xmlText# / /p /cfloop !--- Products --- /cfloop !--- Sub-Categories --- -Justin Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349277 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML signature generation failed
No the code does not write to file system. However, it reads a config file and a PFX certificate file to generate the XML signature. Isidro On 10/21/11 9:53 PM, Dave Watts dwa...@figleaf.com wrote: I am invoking a java method that will generate an xml signature. I successfully invoke and define the method, however if the method if the code is run more more than once, the first user gets the XML signature the second user gets the error XML signature generation failed. Can anyone suggest where else other than the application log to see where this is going wrong? Does the code write anything to the filesystem? If so, maybe you're running into a problem overwriting the file created on the first iteration. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348317 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML signature generation failed
I am invoking a java method that will generate an xml signature. I successfully invoke and define the method, however if the method if the code is run more more than once, the first user gets the XML signature the second user gets the error XML signature generation failed. Can anyone suggest where else other than the application log to see where this is going wrong? Does the code write anything to the filesystem? If so, maybe you're running into a problem overwriting the file created on the first iteration. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348301 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML parse
Jobs is capitalized in the XML. This works: cfset myxmldoc = XmlParse( http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;) cfset title = XmlSearch(myxmldoc, /Jobs/job/title) cfdump var=#title# On Wed, Sep 21, 2011 at 9:02 AM, Torrent Girl moniqueb...@gmail.com wrote: Hi all I tried to parse the XML from the following feed as I normally do and kept getting error messages (not defined) on everything I tried. http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682 Here are a few snippets that I tried: cfset xmldoc = XmlParse( http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;) cfloop list=#xmldoc# index=i cfoutput #xmlDoc.jobs.job.title.XmlText#br / /cfoutput /cfloop cfset myxmldoc= XmlParse( http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;) cfset title = XmlSearch(myxmldoc, /jobs/job/title) cfset location= XmlSearch(myxmldoc, /jobs/job/location) cfset department = XmlSearch(myxmldoc, /jobs/job/department) cfset referencenumber = XmlSearch(myxmldoc, /jobs/job/referencenumber) cfset link= XmlSearch(myxmldoc, /jobs/job/url) cfset description = XmlSearch(myxmldoc, /jobs/job/description) Any suggestions? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347556 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: XML parse
are you sure that CF is actually getting the XML ? try grabbing it with CFHTTP first instead just to make sure. On Wed, Sep 21, 2011 at 2:02 PM, Torrent Girl moniqueb...@gmail.com wrote: Hi all I tried to parse the XML from the following feed as I normally do and kept getting error messages (not defined) on everything I tried. http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682 Here are a few snippets that I tried: cfset xmldoc = XmlParse(http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;) cfloop list=#xmldoc# index=i cfoutput #xmlDoc.jobs.job.title.XmlText#br / /cfoutput /cfloop cfset myxmldoc = XmlParse(http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;) cfset title = XmlSearch(myxmldoc, /jobs/job/title) cfset location = XmlSearch(myxmldoc, /jobs/job/location) cfset department = XmlSearch(myxmldoc, /jobs/job/department) cfset referencenumber = XmlSearch(myxmldoc, /jobs/job/referencenumber) cfset link = XmlSearch(myxmldoc, /jobs/job/url) cfset description = XmlSearch(myxmldoc, /jobs/job/description) Any suggestions? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347557 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: XML-RPC
Does anyone have up to date information on connecting to a XMLRPC webservice. I am trying to connect to the www.infusionsoft.com web service and that is what they provide. Hi David, check this out: http://dougharrison.info/66/infusionsoft-coldfusion-sdk I had to integrate an application with InfusionSoft beginning the middle of last year. We purchased the SDK that Liquifusion created and it works like a charm. We purchased the option that includes the source code and support and I've not been disappointed. Their SDK is CF-based and maps directly to the InfusionSoft API. You just createObject() the SDK and you're up and running. It's worth every penny. -Justin ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329532 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML-RPC
Thanks Justin. I did talk to them after I posted and I will be buying that on Monday morning. He gave me a demo and showed me some of the code and it would take me weeks, at least, to recreate that stuff if I even understood it in the first place. Good to hear that it is as easy and powerful as I was hoping. Thanks, On Fri, Jan 8, 2010 at 1:30 PM, Justin Scott jscott-li...@gravityfree.comwrote: Does anyone have up to date information on connecting to a XMLRPC webservice. I am trying to connect to the www.infusionsoft.com web service and that is what they provide. Hi David, check this out: http://dougharrison.info/66/infusionsoft-coldfusion-sdk I had to integrate an application with InfusionSoft beginning the middle of last year. We purchased the SDK that Liquifusion created and it works like a charm. We purchased the option that includes the source code and support and I've not been disappointed. Their SDK is CF-based and maps directly to the InfusionSoft API. You just createObject() the SDK and you're up and running. It's worth every penny. -Justin ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329537 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
i can i and that is what i use but i am still having hitches splitting my list of 5000 numbers into batches of 100. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Ramon Ecung succ...@ramonecung.com To: cf-talk cf-talk@houseoffusion.com Sent: Tue, October 27, 2009 3:07:46 AM Subject: Re: XML POST with Coldfusion I need someone to develop a coldfusion script that will communicate to a server/service using XML POST. Sorry if it's a silly question, but can you just do post's to their server in a loop? -Ramon Ecung II, BS, ACHDS, MCP ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
well i guess to make things easy, i may just need a loop that can split a list of 5000 numbers into batches of 100 each. so i can send via http post. The one i am using splits and does not validate how many numbers are left, so i get a -1 error message. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Tue, October 27, 2009 12:11:50 AM Subject: Re: XML POST with Coldfusion I'm reading this on my phone, so I could be wrong about this, but it appears to me that the PHP code you posted doesn't appear to create an XML document. Dave Watts, CTO, Fig Leaf Software On 2009-10-26, Anene Isioma Wealth anene.quor...@yahoo.com wrote: ok, let me be very explicit. I presently have a form with the following fields for clients to submit data: 1. mobile numbers (either single or bulk. ie uploading a text file. numbers are separated by ,) 2. Sender's Name 3. SMS message then i send with the following cfhttp code: cfhttpparam type=body value=This is a URL variable /cfhttp this works perfectly. But i noticed that if i send to more that 100 numbers, the SMS is not delivered. Maybe something about amount of characters the address bar can hold. So, i was asked to submit via XML POST formatted like this: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS Now this is the huddle i need to scale. Someone gave me a cURL code, but its in PHP.: ?php // Saint Tosins version of Curl for infobip // for your own sms gateway copy, call 08035898361 $request = ; //initialize the request variable $param[user] = $username; $param[password] = $password; $param[SMSText] = $message; //this is the message that we want to send $param[GSM] = $numbers; //these are the recipients of the message $param[sender] = $sender; //this is our sender $param[IsFlash] = 0; //we want to send the message via global route $param[type] = LongSMS; //message type is plain text foreach($param as $key=$val) //traverse through each member of the param array { $request.= $key.=.urlencode($val); //we have to urlencode the values $request.= ''; //append the ampersand () sign after each paramter/value pair } $len = strlen($request)-1; $request = substr($request, 0, $len); //remove the final ampersand sign from the request $url = http://www.infobip.com/Addon/SMSService/SendSMS.aspx;; $ch = curl_init(); //initialize curl handle curl_setopt($ch, CURLOPT_URL, $url); //set the url curl_setopt($ch, CURLOPT_HEADER, 0); //header param curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //return as a variable curl_setopt($ch, CURLOPT_POST, 1); //set POST method curl_setopt($ch, CURLOPT_POSTFIELDS, $request); //set the POST variables $response = curl_exec($ch); //run the whole process and return the response curl_close($ch); //close the curl handle ? Well all these codes have managed to mess up my head. So i called for instant help and will not mind giving $20 to the guide that will make it work. Happy Hunting! Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 11:33:07 PM Subject: Re: XML POST with Coldfusion i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. I think you missed my point. If you're not sure whether you're building your POST correctly in CF, you can test sending an HTTP POST directly using any number of HTTP test tools, or using telnet, and see what kind of response you get. That will let you determine whether (a) the service even accepts HTTP POST, (b) your XML is malformed or not what the service expects, or (c) you're having a specific issue with CF sending the data, as opposed to the format of the data itself. But in any case, you will need to learn how to help yourself. You simply aren't providing enough information for anyone else to help you. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information
Re: XML POST with Coldfusion
Okay, this should be a nut-cracker on this Blog. I need someone to develop a coldfusion script that will communicate to a server/service using XML POST. Parameters are: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS service url is:: http://www.myserver.com/AddOn/myService/XML/XMLInput. No replies yet. Okay let me step this up a little bit. $20.00 (Taxable) for anyone on cracks this one. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327683 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
cfsavecontent variable=myXmlString SMSauthentification username/username password/password/authentificationmessage sender/sender text/text/messagerecipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm/recipients /SMS /cfsavecontent cfhttp url=http://www.myserver.com/AddOn/myService/XML/XMLInput.aspx; method=post result=servicePostBack cfhttpparam type=XML value=#myXmlString# /cfhttp -Matt ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327697 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
this will create a valid xml header to send along, over cfsavecontent: !---create xml--- cfxml variable=apisend SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS /cfxml !---send--- cfhttp url=http://www.myserver.com/AddOn/myService/XML/XMLInput; method=POST throwOnError=Yes charset=utf-8 result=getresp cfhttpparam type=XML value=#apisend# /cfhttp !---dump the response--- cfdump var=#getresp.filecontent# Okay, this should be a nut-cracker on this Blog. I need someone to develop a coldfusion script that will communicate to a server/service using XML POST. Parameters are: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS service url is:: http://www.myserver.com/AddOn/myService/XML/XMLInput. No replies yet. Okay let me step this up a little bit. $20.00 (Taxable) for anyone on cracks this one. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327704 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML POST with Coldfusion
sorry, that didnt work Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Matt Williams mgw...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 8:54:13 PM Subject: Re: XML POST with Coldfusion cfsavecontent variable=myXmlString SMSauthentification username/username password/password/authentificationmessage sender/sender text/text/messagerecipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm/recipients /SMS /cfsavecontent cfhttpparam type=XML value=#myXmlString# /cfhttp -Matt ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327706 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
sorry, that didnt work Maybe, you should either post the error message you got (or whatever response you got) or post a public URL to the service you're trying to invoke, if possible. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
sorry, no replies from server Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Jessica Kennedy police_kidnapped_your_child...@yahoo.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 10:06:59 PM Subject: Re: XML POST with Coldfusion this will create a valid xml header to send along, over cfsavecontent: !---create xml--- cfxml variable=apisend SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS /cfxml !---send--- cfhttpparam type=XML value=#apisend# /cfhttp !---dump the response--- cfdump var=#getresp.filecontent# Okay, this should be a nut-cracker on this Blog. I need someone to develop a coldfusion script that will communicate to a server/service using XML POST. Parameters are: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS service url is:: http://www.myserver.com/AddOn/myService/XML/XMLInput. No replies yet. Okay let me step this up a little bit. $20.00 (Taxable) for anyone on cracks this one. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327709 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
i did not get any error message. it is an sms server. the reply is supposed to be an sms to my mobile number. Nothing came to me, so i presume the code didnt work. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 10:38:15 PM Subject: Re: XML POST with Coldfusion sorry, that didnt work Maybe, you should either post the error message you got (or whatever response you got) or post a public URL to the service you're trying to invoke, if possible. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327710 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
i did not get any error message. it is an sms server. the reply is supposed to be an sms to my mobile number. Nothing came to me, so i presume the code didnt work. It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327712 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
i've done all these my brother. It works using GET METHOD, but now i want to use XML POST for it. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 10:55:12 PM Subject: Re: XML POST with Coldfusion i did not get any error message. it is an sms server. the reply is supposed to be an sms to my mobile number. Nothing came to me, so i presume the code didnt work. It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327715 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. i've done all these my brother. It works using GET METHOD, but now i want to use XML POST for it. So, you've confirmed that you can successfully send data via XML POST without using CF? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327716 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 11:13:50 PM Subject: Re: XML POST with Coldfusion It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. i've done all these my brother. It works using GET METHOD, but now i want to use XML POST for it. So, you've confirmed that you can successfully send data via XML POST without using CF? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327717 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
Does the service output anything when you use the GET method? Try dumping the http response from the code Jessica provided, ie. ... jessica's code ... cfdump var=#cfhttp.filecontent# / Dominic 2009/10/26 Anene Isioma Wealth anene.quor...@yahoo.com i've done all these my brother. It works using GET METHOD, but now i want to use XML POST for it. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 10:55:12 PM Subject: Re: XML POST with Coldfusion i did not get any error message. it is an sms server. the reply is supposed to be an sms to my mobile number. Nothing came to me, so i presume the code didnt work. It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327718 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
GET and POST are both HTTP methods. XML is not a protocol. You can however send xml as string data over either HTTP GET or POST. You will need to start providing some more information if anyone is to help you efficiently / at all; e.g. how have you successfully been using the service using GET? Dominic 2009/10/26 Anene Isioma Wealth anene.quor...@yahoo.com i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 11:13:50 PM Subject: Re: XML POST with Coldfusion It seems to me that there are lots of other reasons why you might not get an SMS that have nothing to do with your CF client. Perhaps you should try a simpler test that doesn't even involve CF, and see if that works. i've done all these my brother. It works using GET METHOD, but now i want to use XML POST for it. So, you've confirmed that you can successfully send data via XML POST without using CF? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327719 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
Chuka, All the SMS services I've ever used send a response code back when you try to send an SMS - a success code or an error code. If you're not gettting anything back, then I'd assume you're not sending anything - or if you are, you're not authenticating correctly on the SMS service. Dave's advice is good advice - verify that if you send an XML packet without involving CF, that it will work.That will prove that their XML service is listening, and that you are authenticating correctly. Then create your CF code to produce the same XML that you send manually. As Dave said (and I always listen to Dave Watts - he's about the most wise and experienced CF Programmer there is anywhere) there are lots of reasons why it might not work. You need to eliminate all the possible reasons one by one until you have only one left - then you know the problem you have to solve. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Tue, Oct 27, 2009 at 10:18 AM, Dominic Watson watson.domi...@googlemail.com wrote: Does the service output anything when you use the GET method? Try dumping the http response from the code Jessica provided, ie. ... jessica's code ... cfdump var=#cfhttp.filecontent# / Dominic ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327721 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML POST with Coldfusion
Also find out how they are expecting the POST. You can send a field involving a name/value pair (like a name field in a form post) or you could have the xml be the entire body of the post. If it works via GET, then you might need to be sending the xml as the right field name. There is no way (that I am aware of) to send data in the body of a get, it is all name/value pairs in the request string. If they expect the same field name in the body of a post, you'll have to name your cfhttpparam accordingly. Judah On Mon, Oct 26, 2009 at 4:27 PM, Mike Kear afpwebwo...@gmail.com wrote: Chuka, All the SMS services I've ever used send a response code back when you try to send an SMS - a success code or an error code. If you're not gettting anything back, then I'd assume you're not sending anything - or if you are, you're not authenticating correctly on the SMS service. Dave's advice is good advice - verify that if you send an XML packet without involving CF, that it will work. That will prove that their XML service is listening, and that you are authenticating correctly. Then create your CF code to produce the same XML that you send manually. As Dave said (and I always listen to Dave Watts - he's about the most wise and experienced CF Programmer there is anywhere) there are lots of reasons why it might not work. You need to eliminate all the possible reasons one by one until you have only one left - then you know the problem you have to solve. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Tue, Oct 27, 2009 at 10:18 AM, Dominic Watson watson.domi...@googlemail.com wrote: Does the service output anything when you use the GET method? Try dumping the http response from the code Jessica provided, ie. ... jessica's code ... cfdump var=#cfhttp.filecontent# / Dominic ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327722 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML POST with Coldfusion
i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. I think you missed my point. If you're not sure whether you're building your POST correctly in CF, you can test sending an HTTP POST directly using any number of HTTP test tools, or using telnet, and see what kind of response you get. That will let you determine whether (a) the service even accepts HTTP POST, (b) your XML is malformed or not what the service expects, or (c) you're having a specific issue with CF sending the data, as opposed to the format of the data itself. But in any case, you will need to learn how to help yourself. You simply aren't providing enough information for anyone else to help you. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327723 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML POST with Coldfusion
There is no way (that I am aware of) to send data in the body of a get, it is all name/value pairs in the request string. This is correct, there's no request body at all with GET. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327724 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
ok, let me be very explicit. I presently have a form with the following fields for clients to submit data: 1. mobile numbers (either single or bulk. ie uploading a text file. numbers are separated by ,) 2. Sender's Name 3. SMS message then i send with the following cfhttp code: cfhttpparam type=body value=This is a URL variable /cfhttp this works perfectly. But i noticed that if i send to more that 100 numbers, the SMS is not delivered. Maybe something about amount of characters the address bar can hold. So, i was asked to submit via XML POST formatted like this: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=âclientmsgID1â/gsm gsm messageId=âclientmsgID2â/gsm gsm messageId=âclientmsgID3â/gsm gsm messageId=âclientmsgID4â/gsm /recipients /SMS Now this is the huddle i need to scale. Someone gave me a cURL code, but its in PHP.: ?php // Saint Tosins version of Curl for infobip // for your own sms gateway copy, call 08035898361 $request = ; //initialize the request variable $param[user] = $username; $param[password] = $password; $param[SMSText] = $message; //this is the message that we want to send $param[GSM] = $numbers; //these are the recipients of the message $param[sender] = $sender; //this is our sender $param[IsFlash] = 0; //we want to send the message via global route $param[type] = LongSMS; //message type is plain text foreach($param as $key=$val) //traverse through each member of the param array { $request.= $key.=.urlencode($val); //we have to urlencode the values $request.= ''; //append the ampersand () sign after each paramter/value pair } $len = strlen($request)-1; $request = substr($request, 0, $len); //remove the final ampersand sign from the request $url = http://www.infobip.com/Addon/SMSService/SendSMS.aspx;; $ch = curl_init(); //initialize curl handle curl_setopt($ch, CURLOPT_URL, $url); //set the url curl_setopt($ch, CURLOPT_HEADER, 0); //header param curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //return as a variable curl_setopt($ch, CURLOPT_POST, 1); //set POST method curl_setopt($ch, CURLOPT_POSTFIELDS, $request); //set the POST variables $response = curl_exec($ch); //run the whole process and return the response curl_close($ch); //close the curl handle ? Well all these codes have managed to mess up my head. So i called for instant help and will not mind giving $20 to the guide that will make it work. Happy Hunting! Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 11:33:07 PM Subject: Re: XML POST with Coldfusion i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. I think you missed my point. If you're not sure whether you're building your POST correctly in CF, you can test sending an HTTP POST directly using any number of HTTP test tools, or using telnet, and see what kind of response you get. That will let you determine whether (a) the service even accepts HTTP POST, (b) your XML is malformed or not what the service expects, or (c) you're having a specific issue with CF sending the data, as opposed to the format of the data itself. But in any case, you will need to learn how to help yourself. You simply aren't providing enough information for anyone else to help you. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327726 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
I'm reading this on my phone, so I could be wrong about this, but it appears to me that the PHP code you posted doesn't appear to create an XML document. Dave Watts, CTO, Fig Leaf Software On 2009-10-26, Anene Isioma Wealth anene.quor...@yahoo.com wrote: ok, let me be very explicit. I presently have a form with the following fields for clients to submit data: 1. mobile numbers (either single or bulk. ie uploading a text file. numbers are separated by ,) 2. Sender's Name 3. SMS message then i send with the following cfhttp code: cfhttpparam type=body value=This is a URL variable /cfhttp this works perfectly. But i noticed that if i send to more that 100 numbers, the SMS is not delivered. Maybe something about amount of characters the address bar can hold. So, i was asked to submit via XML POST formatted like this: SMS authentification username/username password/password /authentification message sender/sender text/text /message recipients gsm messageId=clientmsgID1/gsm gsm messageId=clientmsgID2/gsm gsm messageId=clientmsgID3/gsm gsm messageId=clientmsgID4/gsm /recipients /SMS Now this is the huddle i need to scale. Someone gave me a cURL code, but its in PHP.: ?php // Saint Tosins version of Curl for infobip // for your own sms gateway copy, call 08035898361 $request = ; //initialize the request variable $param[user] = $username; $param[password] = $password; $param[SMSText] = $message; //this is the message that we want to send $param[GSM] = $numbers; //these are the recipients of the message $param[sender] = $sender; //this is our sender $param[IsFlash] = 0; //we want to send the message via global route $param[type] = LongSMS; //message type is plain text foreach($param as $key=$val) //traverse through each member of the param array { $request.= $key.=.urlencode($val); //we have to urlencode the values $request.= ''; //append the ampersand () sign after each paramter/value pair } $len = strlen($request)-1; $request = substr($request, 0, $len); //remove the final ampersand sign from the request $url = http://www.infobip.com/Addon/SMSService/SendSMS.aspx;; $ch = curl_init(); //initialize curl handle curl_setopt($ch, CURLOPT_URL, $url); //set the url curl_setopt($ch, CURLOPT_HEADER, 0); //header param curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //return as a variable curl_setopt($ch, CURLOPT_POST, 1); //set POST method curl_setopt($ch, CURLOPT_POSTFIELDS, $request); //set the POST variables $response = curl_exec($ch); //run the whole process and return the response curl_close($ch); //close the curl handle ? Well all these codes have managed to mess up my head. So i called for instant help and will not mind giving $20 to the guide that will make it work. Happy Hunting! Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Dave Watts dwa...@figleaf.com To: cf-talk cf-talk@houseoffusion.com Sent: Mon, October 26, 2009 11:33:07 PM Subject: Re: XML POST with Coldfusion i said via HTTP GET. i havent been able to send via XML post. That is why we are having this discussion in the first place. Dont worry, the server has over 9000 clients, this means that their service works. I think you missed my point. If you're not sure whether you're building your POST correctly in CF, you can test sending an HTTP POST directly using any number of HTTP test tools, or using telnet, and see what kind of response you get. That will let you determine whether (a) the service even accepts HTTP POST, (b) your XML is malformed or not what the service expects, or (c) you're having a specific issue with CF sending the data, as opposed to the format of the data itself. But in any case, you will need to learn how to help yourself. You simply aren't providing enough information for anyone else to help you. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327728 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
I need someone to develop a coldfusion script that will communicate to a server/service using XML POST. Sorry if it's a silly question, but can you just do post's to their server in a loop? -Ramon Ecung II, BS, ACHDS, MCP ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327732 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML POST with Coldfusion
Sorry, I copy pasted the wrong line (the emai didnt send from my phone)... It actually looks like that PHP code just creates a curl (http post) message to their server. Sorry if it's a silly question, but can you just do post's to their server in a loop? -Ramon Ecung II, BS, ACHDS, MCP ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327733 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Issues with webservices
Ok I've discovered what I think is the root of the problem. I have got the cfc to do a dump of the arguments scope into a cfsavecontent tag and pass that back. When the component is called locally it passes back my orginal xml request. However when I call it as a webservice I get back what looks like a java class named object of org.apache.xerces.dom.DeferredDocumentImpl This means that any operations I perform on this object fail as it is no longer an xml object. Is this a bug with Coldfusion, or should it be doing this for some reason? Surely I can't be the only person that wants to feed a cfc xml via a webservice, or can I? I'm running CF8.01 on IIS, so if it is a bug there's probably not a lot I can do. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323194 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Issues with webservices
Ok I've discovered what I think is the root of the problem. I have got the cfc to do a dump of the arguments scope into a cfsavecontent tag and pass that back. When the component is called locally it passes back my orginal xml request. However when I call it as a webservice I get back what looks like a java class named object of org.apache.xerces.dom.DeferredDocumentImpl This means that any operations I perform on this object fail as it is no longer an xml object. Is this a bug with Coldfusion, or should it be doing this for some reason? Surely I can't be the only person that wants to feed a cfc xml via a webservice, or can I? I'm running CF8.01 on IIS, so if it is a bug there's probably not a lot I can do. Have you tried converting it to an XML object? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323198 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Issues with webservices
Hi Dave, I've tried doing an xmlParse(variable_name) before performing any operations but that errors as well. Is there another method of converting into xml I should know about? Cheers Jim Have you tried converting it to an XML object? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323201 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Issues with webservices
Hi Dave, I've tried doing an xmlParse(variable_name) before performing any operations but that errors as well. Is there another method of converting into xml I should know about? Off the top of my head, I wouldn't be surprised if you have to convert it to a string first. Most Java classes have a toString() method you can invoke. You'd then have to use xmlParse to convert it back into XML. Alternatively, you could just return a string in the first place, instead of XML. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323202 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Issues with webservices
And what are the errors? Are you sure the xml is still valid? I have recently worked with a couple of webservices talking in XML. I have generally returned things as a string as opposed to type=xml. Just something else to try. -Matt Hello all. Was hoping someone could help me solve this irritating issue. Curently I have a cfc called gateway.cfc setup to recieve incoming xml, perform some operations and then pass back some xml. Here is the component cffunction name=sfrequest description=I take a method name and some arguments as xml and call a cfc access=remote returntype=xml output=false cfargument name=xmlRequest type=xml required=true !---Take the xml input and do something with it --- cfoutput cfxml variable=xmlOutput response resultSUCCESS/result result_code100/result_code messageUser #xmlRequest.request.username.xmltext# Logged In/message /response /cfxml /cfoutput cfreturn xmlOutput / /cffunction I'm calling this function using the following code to create some xml and then call the component as a webservice cfscript xmlRequest = XmlNew(); xmlRequest.xmlRoot = XmlElemNew(xmlRequest,Request); xmlRequest.Request.xmlChildren[1] = XmlElemNew(xmlRequest, Username); xmlRequest.Request.Username.XmlText = Jim; xmlRequest.Request.xmlChildren[2] = XmlElemNew(xmlRequest, Password); xmlRequest.Request.Password.XmlText = password; /cfscript cfdump var=#xmlRequest# cfscript ws = CreateObject(webservice, #variables.wsURL#); ret = ws.sfrequest(xmlRequest); /cfscript cfdump var=#ret# Now this works fine if I call the cfc locally, but I get an error when I access it as a webservice. The webservice works fine if I just return the xmlRequest variable and it also works fine I I just return the generated xmlOutput without doing anything to the inputted xml. However as soon as I try to do anything with the xmlRequest such as pulling some text from it as above, it errors. Any ideas?? Cheers Jim ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323182 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml data referencing
Hi Daniel, Yes you'll need to loop through and append them to a string if you are trying to save them to one query record. What does the entire xml file look, I assume that previous piece of code is just one of the entries? Thing is, I don't know how many of them there are, or rather I don't know how to determine how many 'category' entries there are, so I can't loop through them. I don't want to repeat information in a second post, so if you check out my earlier post, I describe my current quandry (http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:57962#314699) The xml is presented here: http://www.blogger.com/feeds/1550840680584738668/posts/default?published-min=2008-11-11T00:00:00published-max=2008-11-25T23:59:59 I found that if I go to that in Firefox and check it's source code, then it shows the xml as-is. I put it into Dreamweaver and Command- Apply Source Formatting to work with it. I am very close to making this work. I appreciate the assistance. daniel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315877 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: xml data referencing
On Tue, Nov 25, 2008 at 6:31 AM, daniel kessler [EMAIL PROTECTED] wrote: Hi Daniel, Yes you'll need to loop through and append them to a string if you are trying to save them to one query record. What does the entire xml file look, I assume that previous piece of code is just one of the entries? Thing is, I don't know how many of them there are, or rather I don't know how to determine how many 'category' entries there are, so I can't loop through them. I don't want to repeat information in a second post, so if you check out my earlier post, I describe my current quandry (http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:57962#314699) You might want to look into XPath queries using the XMLSearch function, that's how I did it. Here's my code to get and loop through the categories: cfsavecontent variable=xml?xml version=1.0 encoding=utf-8? entry id tag:blogger.com,1999:blog-1550840680584738668.post-851696689458182282 /id published 2008-10-29T09:49:00.002-04:00 /published updated 2008-10-29T09:56:21.122-04:00 /updated category scheme='http://www.blogger.com/atom/ns#' term='What are you doing?'/ category scheme='http://www.blogger.com/atom/ns#' term='Health in the News'/ title type='text' Family Election Guide with Dr. Elaine Anderson /title /entry /cfsavecontent cfscript xml = XMLParse(xml); categories = XMLSearch(xml, /entry/category); total_categories = ArrayLen(categories); /cfscript !--- cfdump var=#xml# cfdump var=#categories# --- cfoutput cfloop index=currentitem from=1 to=#total_categories# #categories[currentitem].XMLAttributes.term#br / /cfloop /cfoutput ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315889 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml data referencing
I thought I was gonna have it off of that, but after mucking with it for quite awhile, I still don't have it working. sigh In your example, coming off of my batch of data, there's only one entry. In my case, I have several entries and I'm already rooting through each one. I don't know how to set the XPath to designate a particular indexed entry. For example you have: categories = XMLSearch(xml, /entry/category); but I need it to be something like: categories = XMLSearch(xml, /entry[index]/category); Here's the actual structure: http://www.blogger.com/feeds/1550840680584738668/posts/default?published-min=2008-11-11T00:00:00published-max=2008-11-25T23:59:59 I'm really totally lost at this point and I'm just shooting from the hip. cfscript xml = XMLParse(xml); categories = XMLSearch(xml, /entry/category); total_categories = ArrayLen(categories); /cfscript !--- cfdump var=#xml# cfdump var=#categories# --- cfoutput cfloop index=currentitem from=1 to=#total_categories# #categories[currentitem].XMLAttributes.term#br / /cfloop /cfoutput ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315898 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: xml data referencing
Your intuition was correct, you can indeed use /entry[index]/category - except that index would want to be a numerical value; ie. cfset variables.xml = XmlParse('http://www.blogger.com/feeds/1550840680584738668/posts/default?published-min=2008-11-11T00:00:00published-max=2008-11-25T23:59:59') cfset variables.entries = XmlSearch(xml, '/:feed/:entry') cfoutput cfloop from=1 to=#ArrayLen(entries)# index=variables.i cfset variables.categories = XmlSearch(xml, '/:feed/:entry[#i#]/:category') !--- ... etc. --- /cfloop /cfoutput A quick example of what else can be done using XPath in this way: //[EMAIL PROTECTED]http://www.google.com]/category This will select all the category elements with in an entry element that has an 'id' attribute with a value of 'http://www.google.com'. XML and XPath are wonderful beasts. While it may not help you in terms of your deadline; I'd highly recommend getting a copy of XML In A Nutshell. XML can be tricky to explain and this book does it really comprehensively and readably. W3Schools also have a fairly good reference and forum: http://www.w3schools.com/Xpath/ HTH Dominic 2008/11/25 daniel kessler [EMAIL PROTECTED]: I thought I was gonna have it off of that, but after mucking with it for quite awhile, I still don't have it working. sigh In your example, coming off of my batch of data, there's only one entry. In my case, I have several entries and I'm already rooting through each one. I don't know how to set the XPath to designate a particular indexed entry. For example you have: categories = XMLSearch(xml, /entry/category); but I need it to be something like: categories = XMLSearch(xml, /entry[index]/category); Here's the actual structure: http://www.blogger.com/feeds/1550840680584738668/posts/default?published-min=2008-11-11T00:00:00published-max=2008-11-25T23:59:59 I'm really totally lost at this point and I'm just shooting from the hip. cfscript xml = XMLParse(xml); categories = XMLSearch(xml, /entry/category); total_categories = ArrayLen(categories); /cfscript !--- cfdump var=#xml# cfdump var=#categories# --- cfoutput cfloop index=currentitem from=1 to=#total_categories# #categories[currentitem].XMLAttributes.term#br / /cfloop /cfoutput ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315902 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: xml data referencing
Your intuition was correct, you can indeed use /entry[index]/category - except that index would want to be a numerical value; ie. ah alright - thanks. XML and XPath are wonderful beasts. While it may not help you in terms of your deadline; I'd highly recommend getting a copy of XML In A Nutshell. XML can be tricky to explain and this book does it really comprehensively and readably. W3Schools also have a fairly good reference and forum: Well I plan on doing alot of XML in the future. I didn't know alot of that XPath stuff until Judah referenced it and I started looking into it. I didn't know there was that much to learn - wow! I'll definitely get the book. Thanks. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315903 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: xml data referencing
Hi Daniel You'll need to use XMLAttributes and it will return a structure. XMLChildren[index].category.XMLAttributes On Fri, Oct 31, 2008 at 8:06 AM, daniel kessler [EMAIL PROTECTED] wrote: I'm using another person's library (feedToQuery) to work with my xml document and make it into a query. I'm having trouble referencing some of the data. Most of it is done through xmlText. But this data is in the entries scheme. Here's the entry and the code that I use to work with it. I'm trying to get the category information out of the category scheme. Oh, I'd also like to know if there's a way of finding out the data in however many category entries there are. DATA: entry id tag:blogger.com,1999:blog-1550840680584738668.post-851696689458182282 /id published 2008-10-29T09:49:00.002-04:00 /published updated 2008-10-29T09:56:21.122-04:00 /updated category scheme='http://www.blogger.com/atom/ns#' term='What are you doing?'/ category scheme='http://www.blogger.com/atom/ns#' term='Health in the News'/ title type='text' Family Election Guide with Dr. Elaine Anderson /title /entry Here's the part of the code that I'm using to currently reference xml text (and put it into a created db) which isn't working to grab the data out of category scheme: if (structKeyExists(parsed[feed].XMLChildren[index], category)) querySetCell(retQuery, category, parsed[feed].XMLChildren[index].category.XMLText, rows); If there's multiple categories, I'd like it to combine them with a delimiter and put them into one db cell. thanks in advance about whatever learning I get. daniel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314685 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml data referencing
Hi Daniel You'll need to use XMLAttributes and it will return a structure. XMLChildren[index].category.XMLAttributes ah that worked nicely. It gave me a struct and I referenced 'term' to get my data. parsed[feed].XMLChildren[index].category.XMLAttributes.term However, if there were two 'category' items, it only gave me the last one. I figured out how to reference them with [n], but how do I know how many of them there are? I'm supposing that I need to loop through them to get all the 'category' entries. If I try to reference more than what's there, I receive an error. Here is my attempt to deal with all that, but I receive an error: for (ll = 1; ll LTE 25; ll=ll+1){ if (isdefined(parsed[feed].XMLChildren[index].category[ll].XMLAttributes.term)) categories = categories 'some_data|'; } if (structKeyExists(parsed[feed].XMLChildren[index], category)) querySetCell(retQuery, category, categories, rows); Receives error: Element CATEGORY is undefined in a Java object of type class coldfusion.xml.XmlNodeMap referenced as any additional help would be greatly appreciated and thanks Nick for your help getting me this far. daniel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314699 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml data referencing
Hi Daniel, Yes you'll need to loop through and append them to a string if you are trying to save them to one query record. What does the entire xml file look, I assume that previous piece of code is just one of the entries? On Fri, Oct 31, 2008 at 12:06 PM, daniel kessler [EMAIL PROTECTED] wrote: Hi Daniel You'll need to use XMLAttributes and it will return a structure. XMLChildren[index].category.XMLAttributes ah that worked nicely. It gave me a struct and I referenced 'term' to get my data. parsed[feed].XMLChildren[index].category.XMLAttributes.term However, if there were two 'category' items, it only gave me the last one. I figured out how to reference them with [n], but how do I know how many of them there are? I'm supposing that I need to loop through them to get all the 'category' entries. If I try to reference more than what's there, I receive an error. Here is my attempt to deal with all that, but I receive an error: for (ll = 1; ll LTE 25; ll=ll+1){ if (isdefined(parsed[feed].XMLChildren[index].category[ll].XMLAttributes.term)) categories = categories 'some_data|'; } if (structKeyExists(parsed[feed].XMLChildren[index], category)) querySetCell(retQuery, category, categories, rows); Receives error: Element CATEGORY is undefined in a Java object of type class coldfusion.xml.XmlNodeMap referenced as any additional help would be greatly appreciated and thanks Nick for your help getting me this far. daniel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml populated pdf forms and livecycle designer?? [FIXED]
This forum is not full of Acrobat experts that reply to messages. I have yet to figure out how to populate the barcode field. I think the basic approach would be to extract the data (to get the structure) now use this as a template. Fill in your data and add it back to the PDF. cfpdfform source=c:\employeeid123.pdf result=c:\ formdata.xml overwrite=yes action=read/ cfpdfform source=c:\payslipTemplate.pdf action=populate XMLdata=c:\formdata.xml/ alternatively you can use structs instead of XML. -aP ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314194 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml populated pdf forms and livecycle designer?? [FIXED]
or, alternatively, you can forego the xml route, and use the cfpdfsubform and other tags and just skip the xml part altogether :) but thanks andrew... -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama On Tue, Oct 21, 2008 at 2:54 PM, Andrew Powell [EMAIL PROTECTED] wrote: This forum is not full of Acrobat experts that reply to messages. I have yet to figure out how to populate the barcode field. I think the basic approach would be to extract the data (to get the structure) now use this as a template. Fill in your data and add it back to the PDF. cfpdfform source=c:\employeeid123.pdf result=c:\ formdata.xml overwrite=yes action=read/ cfpdfform source=c:\payslipTemplate.pdf action=populate XMLdata=c:\formdata.xml/ alternatively you can use structs instead of XML. -aP ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314195 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: xml populated pdf forms and livecycle designer?? [FIXED]
seek a bit harder and ye shall find... thanks anyway kids :) ?xml version=1.0 encoding=UTF-8? - xfa:data xmlns:xfa=http://www.xfa.org/schema/xfa-data/1.0/; - form1 SSN354325426/SSN fnamecoldfusion/fname num354325426.00/num - Subform1 SSN / /Subform1 /form1 /xfa is the new format and here is the link to it... http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=formsPDF_03.html -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama On Mon, Oct 20, 2008 at 5:10 PM, Tony [EMAIL PROTECTED] wrote: hi there. in the past, acrobat 8 professional gave me the ability to create a new pdf, add form fields to it, save it as a pdf, write some xml to populate the pdf, and then open the PDF in a browser, and the data in the pdf forms would be filled with the data i expected from the xml file. HOWEVER, with an update that has happened on my adobe updates, now, acrobat forces me to use LIVE CYCLE DESIGNER, rather than itself to manage the forms... OK, i can work with that but i cannot get the darn pdfs to be filled with the data like they were before... PLEASE someone tell me how i can make these dynamic again, this is truly crippling me for one particular client... or please also someone tell me how i can uninstall live cycle designer so that acrobat does its thing like it used to just perfectly... i suspect there is some sort of data provider that i need to set, but i cannot seem to get anything to work in LIVE CYCLE DESIGNER to make that happen. in acrobat prof 8 you didnt have to set this you could do it simply with some XML and the pdf that acrobat made :( help, anyone, please, client needs this, and i just have one left to do!!! grrr... what a bad update adobe! -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314164 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml populated pdf forms and livecycle designer?? [FIXED]
actually, its not fixed :( i cannot get the values in the xml file to show up in the pdf !!! wtf, how could they change this??? here is my xml: its SIMPLE... and if i try to create a connection it tells me the xml is invalid? ?xml version=1.0 encoding=UTF-8? xfa:data xmlns:xfa=http://www.xfa.org/schema/xfa-data/1.0/; page1 city_countyWICOMICO COUNTY/city_county /page1 /xfa and no workie?? anyone have any ideas? thanks! -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama On Mon, Oct 20, 2008 at 5:21 PM, Tony [EMAIL PROTECTED] wrote: seek a bit harder and ye shall find... thanks anyway kids :) ?xml version=1.0 encoding=UTF-8? - xfa:data xmlns:xfa=http://www.xfa.org/schema/xfa-data/1.0/; - form1 SSN354325426/SSN fnamecoldfusion/fname num354325426.00/num - Subform1 SSN / /Subform1 /form1 /xfa is the new format and here is the link to it... http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=formsPDF_03.html -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama On Mon, Oct 20, 2008 at 5:10 PM, Tony [EMAIL PROTECTED] wrote: hi there. in the past, acrobat 8 professional gave me the ability to create a new pdf, add form fields to it, save it as a pdf, write some xml to populate the pdf, and then open the PDF in a browser, and the data in the pdf forms would be filled with the data i expected from the xml file. HOWEVER, with an update that has happened on my adobe updates, now, acrobat forces me to use LIVE CYCLE DESIGNER, rather than itself to manage the forms... OK, i can work with that but i cannot get the darn pdfs to be filled with the data like they were before... PLEASE someone tell me how i can make these dynamic again, this is truly crippling me for one particular client... or please also someone tell me how i can uninstall live cycle designer so that acrobat does its thing like it used to just perfectly... i suspect there is some sort of data provider that i need to set, but i cannot seem to get anything to work in LIVE CYCLE DESIGNER to make that happen. in acrobat prof 8 you didnt have to set this you could do it simply with some XML and the pdf that acrobat made :( help, anyone, please, client needs this, and i just have one left to do!!! grrr... what a bad update adobe! -- tony Better than a thousand hollow words, is one word that brings peace. -- siddhartha gautama ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314170 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML-RPC with CF8?
+1 to this CFC. Just used it to consume the Oodle.com classifieds API. ~Che -Original Message- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2008 12:21 AM To: CF-Talk Subject: Re: XML-RPC with CF8? I actually just got done doing a project that consumed an XML-RPC web service. There is a CFC Roger Benningfield wrote that will translate xml-rpc xml to ColdFusion vars and back again. There is a link in the comments of my blog here: http://www.codersrevolution.com/index.cfm/2008/8/30/XMLRPC-Alive-yes-but-sti ll-kicking Basically, you call the webservice with a cfhttp tag, and you simply pass the XML as the body of the request and parse the XML that comes back. Here's a snippet of code that goes with the CFC I mentioned above (error checking removed). cfset local.request_xml = CFML2XMLRPC(local.inputs_array,'call') cfhttp url=#arguments.web_service_location# method=POST timeout=60 result=local.cfhttp cfhttpparam name=request_body value=#local.request_xml# type=xml /cfhttp cfset local.response = XMLRPC2CFML(local.cfhttp.filecontent) ~Brad ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312755 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML-RPC with CF8?
I've found some web references to consuming XMP-RPC using CF8's built-in funcitonality, but no examples. I took it to mean that it may be possible to use cfinvoke to consume XML-RPC data, but I'm not really sure if I'm on the right track. cfinvoke webservice=http://xml.a.com; ... CFINVOKE lets you call SOAP services. I don't think it supports XML-RPC. For that, you're basically on your own. You'll have to use CFHTTP and CF's XML parser. Someone may have written code for this already, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312728 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML-RPC with CF8?
I actually just got done doing a project that consumed an XML-RPC web service. There is a CFC Roger Benningfield wrote that will translate xml-rpc xml to ColdFusion vars and back again. There is a link in the comments of my blog here: http://www.codersrevolution.com/index.cfm/2008/8/30/XMLRPC-Alive-yes-but-still-kicking Basically, you call the webservice with a cfhttp tag, and you simply pass the XML as the body of the request and parse the XML that comes back. Here's a snippet of code that goes with the CFC I mentioned above (error checking removed). cfset local.request_xml = CFML2XMLRPC(local.inputs_array,'call') cfhttp url=#arguments.web_service_location# method=POST timeout=60 result=local.cfhttp cfhttpparam name=request_body value=#local.request_xml# type=xml /cfhttp cfset local.response = XMLRPC2CFML(local.cfhttp.filecontent) ~Brad - Original Message - From: Dave Watts [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, September 17, 2008 6:12 PM Subject: RE: XML-RPC with CF8? I've found some web references to consuming XMP-RPC using CF8's built-in funcitonality, but no examples. I took it to mean that it may be possible to use cfinvoke to consume XML-RPC data, but I'm not really sure if I'm on the right track. cfinvoke webservice=http://xml.a.com; ... CFINVOKE lets you call SOAP services. I don't think it supports XML-RPC. For that, you're basically on your own. You'll have to use CFHTTP and CF's XML parser. Someone may have written code for this already, though. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312737 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml include not working
Hey Richard, You might want to ask this question over on the model-glue google group. This is fairly specific to model-glue and while you may get a response here, there's liable to be more help available on the google group. I know a lot of folks I've spoken to over the years have mentioned not being on the cf-talk list because there's more traffic here than they want to deal with. But the same folks often do participate in these more specific lists. http://groups.google.com/group/model-glue hth -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312227 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml include not working
Richard, It is not an event handler so should not go in that section - try it right under your opening modelglue Dan On Tue, Sep 9, 2008 at 8:58 AM, Richard White [EMAIL PROTECTED] wrote: hi, i am trying to include one xml file into another can anyone tell me what i am doing wrong please: event-handlers include template=/re_base_mg/config/event_handlers/MainControllerEventHandlers.xml / /event-handlers i am getting no errors but when i run the page it cannot find the error handlers inside the MainControllerEventHandlers.xml file that i am trying to include - indicating that it is not including the xml file properly thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312249 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: xml include not working
hi, i have just joined the model glue group, thanks for the link also i tried your suggestion dan but also didnt work unfortunately :( thanks for your responses richard Richard, It is not an event handler so should not go in that section - try it right under your opening modelglue Dan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312253 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML rendering issue
This still generates problems with certain characters such as ' and I was wondering if people had any tips or advise on this at all? While you're using a CDATA block in body_text, and that will take care of the problem there, you also have to escape XML character entities in attribute values: test name=#XMLEncodedFormat(qTemplate.test)# Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311582 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML rendering issue
XMLFormat() takes care of escaping those characters and making them XML safe. On Tue, Aug 26, 2008 at 11:35 PM, Simon Bailey [EMAIL PROTECTED] wrote: Hi all, I have this pain in the rear issue with cf generated xml... [snip] This still generates problems with certain characters such as ' and I was wondering if people had any tips or advise on this at all? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311583 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML rendering issue
test name=#XMLEncodedFormat(qTemplate.test)# I think that should be XmlFormat(), not XmlEncodedFormat() ;) Dominic ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311584 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML rendering issue
Ahhh ok so I can implement the XMLFormat method as opposed to the XMLEncodedFormat, wicked thanks! Is there a way of avoiding having to utilise that method on each xml node i.e. use it higher up the xml generation method? Cheers, Simon On 26 Aug 2008, at 16:43, Dominic Watson wrote: test name=#XMLEncodedFormat(qTemplate.test)# I think that should be XmlFormat(), not XmlEncodedFormat() ;) Dominic ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311586 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML rendering issue
test name=#XMLEncodedFormat(qTemplate.test)# I think that should be XmlFormat(), not XmlEncodedFormat() ;) Yes, it should! Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311587 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML rendering issue
Sweet thanks Dave and all :-) On 26 Aug 2008, at 16:43, Dave Watts wrote: This still generates problems with certain characters such as ' and I was wondering if people had any tips or advise on this at all? While you're using a CDATA block in body_text, and that will take care of the problem there, you also have to escape XML character entities in attribute values: test name=#XMLEncodedFormat(qTemplate.test)# Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311588 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML / XSL / XSLT and CF
So I'm looking at using XML to define forms and form elemements, along with data. Then use XSL to build the form. (I read a bit about XForm, still getting my brain around it.) I'm looking to do this because the application I need to build has 53 screens, with no less than 30 items per screen. Many of the form items are shared form to form. Anyway, so does anyone have experience with doing this? Thoughts? Advice? My advice to you is to use CF instead of XSLT to render your forms. Unless you work with XSLT all the time, it's a pain. Even if you do, it's a pain. You can choose to represent your form fields in XML or in a relational schema. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310307 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML / XSL / XSLT and CF
Dave, Thanks for the reply. Yes, I was reading about CFORM and setting it to XML (I think?) and that would generate your XForm code. I need to do more research, I just really really really do not want to code all those forms. I'd rather seperate the data from the presentation, while the presentation is dictated by a config file so it will be much more scalable. Thanks! BN So I'm looking at using XML to define forms and form My advice to you is to use CF instead of XSLT to render your forms. Unless you work with XSLT all the time, it's a pain. Even if you do, it's a pain. You can choose to represent your form fields in XML or in a relational schema. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310309 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML / XSL / XSLT and CF
I need to do more research, I just really really really do not want to code all those forms. I'd rather seperate the data from the presentation, while the presentation is dictated by a config file so it will be much more scalable. XSLT is not a config file though. It's a Turing-complete programming language that will let you transform one XML language to another, or to HTML. CF will also let you do that sort of thing, and it'll generally be a lot easier. I wouldn't get too hung up on the idea of representing your forms as XML, either. You can represent reusable form elements just as easily with a relational database. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310310 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML / XSL / XSLT and CF
XSLT is not a config file though. It's a Turing-complete programming language that will let you transform one XML language to another, or to HTML. CF will also let you do that sort of thing, and it'll generally be a lot easier. Indeed. On the web XSLT is great if you want to pass the XML file/data directly to the browser and have the browser render it in a certain way (using XSLT to convert the XML to HTML output). If you're running it through ColdFusion anyway, it's easier to write CF than deal with XSLT. I wouldn't get too hung up on the idea of representing your forms as XML, either. You can represent reusable form elements just as easily with a relational database. I'll second that also. One project I worked on we just defined the form fields in a pipe-delimited text file that would get read and parsed into a ColdFusion application variable. Then we had a custom tag that we could call and it would generate all of the HTML for each form field in whatever form definition we needed. -Justin Scott ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310311 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML / XSL / XSLT and CF
Justin / Dave, Thanks for your replies. Yes, I'm seeing from the little bit of research that I'm doing that XSLT might not do what I need it to and introduce a certian level of risk to the project. I am interested in learning more about highly abstracted form generation if any one has any links on this to share. If either of you are able to shed a little more light on the TEXT/pipe technique or the database technique I'd be greatly appreciative. Don't go way out of your way though. I'll keep researching. Thanks! BN XSLT is not a config file though. It's a Turing-complete programming language that will let you transform one XML language to another, or to HTML. CF will also let you do that sort of thing, and it'll generally be a lot easier. Indeed. On the web XSLT is great if you want to pass the XML file/data directly to the browser and have the browser render it in a certain way (using XSLT to convert the XML to HTML output). If you're running it through ColdFusion anyway, it's easier to write CF than deal with XSLT. I wouldn't get too hung up on the idea of representing your forms as XML, either. You can represent reusable form elements just as easily with a relational database. I'll second that also. One project I worked on we just defined the form fields in a pipe-delimited text file that would get read and parsed into a ColdFusion application variable. Then we had a custom tag that we could call and it would generate all of the HTML for each form field in whatever form definition we needed. -Justin Scott ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310312 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML / XSL / XSLT and CF
I don't disagree with anything Dave says here. But on the flip side, XML/XSLT is a more marketable skill and looks good on your res. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 4:39 PM To: CF-Talk Subject: RE: XML / XSL / XSLT and CF So I'm looking at using XML to define forms and form elemements, along with data. Then use XSL to build the form. (I read a bit about XForm, still getting my brain around it.) I'm looking to do this because the application I need to build has 53 screens, with no less than 30 items per screen. Many of the form items are shared form to form. Anyway, so does anyone have experience with doing this? Thoughts? Advice? My advice to you is to use CF instead of XSLT to render your forms. Unless you work with XSLT all the time, it's a pain. Even if you do, it's a pain. You can choose to represent your form fields in XML or in a relational schema. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310313 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML / XSL / XSLT and CF
On the flip side as well - If you were going to end up writing the XML by hand, to then convert into your forms, why not author up some really nice custom tags, and do it on the page? There is a nice uniForm custom tag set around somewhere as well, which may also save you some time? Mark On Thu, Aug 7, 2008 at 7:10 AM, Dave Francis [EMAIL PROTECTED] wrote: I don't disagree with anything Dave says here. But on the flip side, XML/XSLT is a more marketable skill and looks good on your res. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 4:39 PM To: CF-Talk Subject: RE: XML / XSL / XSLT and CF So I'm looking at using XML to define forms and form elemements, along with data. Then use XSL to build the form. (I read a bit about XForm, still getting my brain around it.) I'm looking to do this because the application I need to build has 53 screens, with no less than 30 items per screen. Many of the form items are shared form to form. Anyway, so does anyone have experience with doing this? Thoughts? Advice? My advice to you is to use CF instead of XSLT to render your forms. Unless you work with XSLT all the time, it's a pain. Even if you do, it's a pain. You can choose to represent your form fields in XML or in a relational schema. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310317 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML / XSL / XSLT and CF
Then there is the much under-rated cfforms xmlformat.I use that all the time and it's great. The forms render very fast - a FRACTION of the time it takes for Flex forms or flash forms - , you can automate the generation because you're only creating coldfusion tags, all the XSLT is done for you by the good folks on teh CFMX development team. Give that a try - i bet it already does most of what you want to do out of the box. If you want to tinker with the XSLT you can - all the scripts are editable so you can customise it by yourself if you want. And the CSS Style sheets are all there to tinker around with too if you want, so the html renders exactly how you want it to look. I dont understand why more people dont use it. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Thu, Aug 7, 2008 at 7:53 AM, Mark Mandel [EMAIL PROTECTED] wrote: On the flip side as well - If you were going to end up writing the XML by hand, to then convert into your forms, why not author up some really nice custom tags, and do it on the page? There is a nice uniForm custom tag set around somewhere as well, which may also save you some time? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310329 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Error = invalid character Unicode 0x19.
Probably a result of a copy/paste from Word. Look for ' - ' (a space, a dash, a space) within that block. Word creates some stupid-ass smart character when that is typed in. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308583 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Error = invalid character Unicode 0x19.
Apparently, the org.apache.commons.lang.StringEscapeUtils java class' escapeXml method escapes this (and other) characters properly. So something like: cfset escapers = CreateObject('java', 'org.apache.commons.lang.StringEscapeUtils') cfset cleanedDescription = escapers.escapeXml(description) When I first tested this out I found that the org.apache.commons.lang.StringEscapeUtils class could not be found so I had to install the org.apache.commons.lang package which can be found here: http://commons.apache.org/downloads/download_lang.cgi Note: I've not been able to test this with a string that produces the error you are having. HTH Dominic 2008/7/4 Mike Kear [EMAIL PROTECTED]: I'm getting this error in a XML job i'm doing and I can't see where this illegal character is creeping in. The offending text field is one called 'description', - i know that becuase if i remove it from the XML I get valid XML. Unicode 0x19 is called End of Medium and is a control character. So i have used trim() on the data going into the description element, and also XMLFormat(). I would have thought that XMLFormat() would have fixed it, but it hasn't. I can't see where this character is creeping in, becuase it's a control character. I've also tried setting the page encoding to UTF-8 to see if that makes any difference but it doesn't. I've googled for quite a while now, and there are lots of people who see this problem - it's on forums everywhere, but no one seems to give an answer that works. Has anyone here come across this problem and solved it? ( The problem seems to be common to PHP and .Net applications too, but none of them have posted an answer that i have found. ) If you got round it, what did you do? -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308584 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Error = invalid character Unicode 0x19.
You were on the right track, Matt. It was one of those smart quotes - a curly apostrophe, as a result of a paste from word. I deleted that character and replaced it with a ASCII one and the XML validated. Also i used the suggestion Terry gave me - replace chr(25) with nothing and that did worked on another record that was giving the same error. Now to figure out what to do about the 200 fields on several hundred thousand records, now I know what's causing it to break. I am hoping i am going to be able to think of a way to loop through them all instead of spending the rest of the day typing out a replace function in each field. (sigh). Story of my life with this project! Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Fri, Jul 4, 2008 at 5:53 PM, Matt Quackenbush [EMAIL PROTECTED] wrote: Probably a result of a copy/paste from Word. Look for ' - ' (a space, a dash, a space) within that block. Word creates some stupid-ass smart character when that is typed in. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308585 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Error = invalid character Unicode 0x19.
Now to figure out what to do about the 200 fields on several hundred thousand records, now I know what's causing it to break. I am hoping i am going to be able to think of a way to loop through them all instead of spending the rest of the day typing out a replace function in each field. (sigh). Story of my life with this project! If the org.apache.commons.lang.StringEscapeUtils java class works, it could save you a whole heap of work! ;) Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308588 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Error = invalid character Unicode 0x19.
Dominic Watson wrote: Apparently, the org.apache.commons.lang.StringEscapeUtils java class' escapeXml method escapes this (and other) characters properly. So something like: cfset escapers = CreateObject('java', 'org.apache.commons.lang.StringEscapeUtils') cfset cleanedDescription = escapers.escapeXml(description) When I first tested this out I found that the org.apache.commons.lang.StringEscapeUtils class could not be found so I had to install the org.apache.commons.lang package which can be found here: http://commons.apache.org/downloads/download_lang.cgi Note: I've not been able to test this with a string that produces the error you are having. HTH Dominic I remember using safetext (http://cflib.org/index.cfm?event=page.udfbyidudfid=56) to remove the special chars like: the quicj Dr jhg and other stuff. Please test and I hope it works ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308595 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Node Traversal
On Wed, Mar 19, 2008 at 9:33 AM, Sonny Savage [EMAIL PROTECTED] wrote: Hello, I apologize if this is a dumb question, but I'm a bit a n00b when it comes to XML in CF. I have XML that looks something like this: testElements testElementtext 1/testElement testElementtext 2/testElement /testElements What I want to know is how I get the values from both sub-nodes, even though they have the same name. cfsavecontent variable=myXML testElements testElementtext 1/testElement testElementtext 2/testElement /testElements /cfsavecontent cfset parsedXML = xmlParse(myXML) cfdump var=#parsedXML# cfoutput Text 1: #parsedXML.testElements.testElement[1].XmlText#br / Text 2: #parsedXML.testElements.testElement[2].XmlText#br / /cfoutput -- Evelyn the dog, having undergone further modification pondered the significance of short-person behaviour in pedal depressed, pan-chromatic resonance, and other highly ambient domains. Arf, she said. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301584 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Node Traversal
On Wednesday 19 Mar 2008, Charlie Griefer wrote: cfdump var=#parsedXML# cfdump is almost always the answer to parsing XML :-) -- Tom Chiverton Helping to preemptively monetize prospective services on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301585 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Node Traversal
On Wed, Mar 19, 2008 at 9:40 AM, Charlie Griefer [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 9:33 AM, Sonny Savage [EMAIL PROTECTED] wrote: Hello, I apologize if this is a dumb question, but I'm a bit a n00b when it comes to XML in CF. I have XML that looks something like this: testElements testElementtext 1/testElement testElementtext 2/testElement /testElements What I want to know is how I get the values from both sub-nodes, even though they have the same name. cfsavecontent variable=myXML testElements testElementtext 1/testElement testElementtext 2/testElement /testElements /cfsavecontent cfset parsedXML = xmlParse(myXML) cfdump var=#parsedXML# cfoutput Text 1: #parsedXML.testElements.testElement[1].XmlText#br / Text 2: #parsedXML.testElements.testElement[2].XmlText#br / /cfoutput you can also get a little more dynamic and loop over testElements.testElement as an array: cfoutput cfloop from=1 to=#arrayLen(parsedXML.testElements.testElement)# index=idx #parsedXML.testElements.testElement[idx].xmlText#br / /cfloop /cfoutput -- Evelyn the dog, having undergone further modification pondered the significance of short-person behaviour in pedal depressed, pan-chromatic resonance, and other highly ambient domains. Arf, she said. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301586 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Node Traversal
Thanks Charlie! cfdump was not revealing that I could access the elements as an array. On Wed, Mar 19, 2008 at 12:44 PM, Charlie Griefer [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 9:40 AM, Charlie Griefer [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 9:33 AM, Sonny Savage [EMAIL PROTECTED] wrote: Hello, I apologize if this is a dumb question, but I'm a bit a n00b when it comes to XML in CF. I have XML that looks something like this: testElements testElementtext 1/testElement testElementtext 2/testElement /testElements What I want to know is how I get the values from both sub-nodes, even though they have the same name. cfsavecontent variable=myXML testElements testElementtext 1/testElement testElementtext 2/testElement /testElements /cfsavecontent cfset parsedXML = xmlParse(myXML) cfdump var=#parsedXML# cfoutput Text 1: #parsedXML.testElements.testElement[1].XmlText#br / Text 2: #parsedXML.testElements.testElement[2].XmlText#br / /cfoutput you can also get a little more dynamic and loop over testElements.testElement as an array: cfoutput cfloop from=1 to=#arrayLen(parsedXML.testElements.testElement )# index=idx #parsedXML.testElements.testElement[idx].xmlText#br / /cfloop /cfoutput -- Evelyn the dog, having undergone further modification pondered the significance of short-person behaviour in pedal depressed, pan-chromatic resonance, and other highly ambient domains. Arf, she said. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301587 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML Node Traversal
True that. I like to think of XML in CF simply as structs of arrays. You can access the data just as you would traverse structs and arrays. Once you cfdump the XML, it becomes clearer. ~Brad you can also get a little more dynamic and loop over testElements.testElement as an array: cfoutput cfloop from=1 to=#arrayLen(parsedXML.testElements.testElement)# index=idx #parsedXML.testElements.testElement[idx].xmlText#br / /cfloop /cfoutput ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301588 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Node Traversal
cfdump is the answer to *everything*. Well, that and 42. On Wed, Mar 19, 2008 at 12:44 PM, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 19 Mar 2008, Charlie Griefer wrote: cfdump var=#parsedXML# cfdump is almost always the answer to parsing XML :-) -- Tom Chiverton Helping to preemptively monetize prospective services on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301589 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML Question
How are you referencing the XML node? Is the query below the generated query? Adrian -Original Message- From: Jenny Gavin-Wear Sent: 16 March 2008 17:20 To: CF-Talk Subject: XML Question Banging head on desk, sure I'm doing something daft ... When I reference the xml item it looks fine, then I try and insert it into a table and this happenes: insert into tbl_emails (UserName, Password, FirstName, LastName, IsSystemAdmin, IsDomainAdmin) Values ( '?xml version=1.0 encoding=UTF-8? UserName xmlns=http://tempuri.org/;[EMAIL PROTECTED]/UserName', How come the XML info is being shown and not just the item, please? TIA, Jenny ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301391 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML Question
Hi Adrian, this is an excerpt from the generating code: cfoutput cfloop from=1 to=#NumUsers# index=I Cfset found = 0 cfquery datasource=#application.dsn# name=exists select * from list_emails where sitedomain like 'fasttrackonline.co.uk' /cfquery cfloop query=exists cfif exists.username is MyXML.UserInfoListResult.Users.UserInfo[I].Username cfset found = 1 /cfif /cfloop cfif found is 0 cfquery datasource=#application.dsn# insert into tbl_emails (UserName, Password, FirstName, LastName, IsSystemAdmin, IsDomainAdmin) Values ( '#MyXML.UserInfoListResult.Users.UserInfo[I].Username#', '#ToString(MyXML.UserInfoListResult.Users.UserInfo[I].Password)#', '#MyXML.UserInfoListResult.Users.UserInfo[I].Firstname#', '#MyXML.UserInfoListResult.Users.UserInfo[I].LastName#', cfif MyXML.UserInfoListResult.Users.UserInfo[I].IsSystemAdmin is true1cfelse0/cfif, cfif MyXML.UserInfoListResult.Users.UserInfo[I].IsDomainAdmin is true1cfelse0/cfif ) /cfquery /cfif /cfloop /cfoutput -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 16 March 2008 18:04 To: CF-Talk Subject: RE: XML Question How are you referencing the XML node? Is the query below the generated query? Adrian -Original Message- From: Jenny Gavin-Wear Sent: 16 March 2008 17:20 To: CF-Talk Subject: XML Question Banging head on desk, sure I'm doing something daft ... When I reference the xml item it looks fine, then I try and insert it into a table and this happenes: insert into tbl_emails (UserName, Password, FirstName, LastName, IsSystemAdmin, IsDomainAdmin) Values ( '?xml version=1.0 encoding=UTF-8? UserName xmlns=http://tempuri.org/;[EMAIL PROTECTED]/UserName', How come the XML info is being shown and not just the item, please? TIA, Jenny ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301393 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4