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
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.aspx ~| 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:327676 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
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