Java equivalent of CFHTTP
Hi, (sorry if this is a repost since I cannot see my previous post) I'm looking for an equivalent to CFHTTP. I'm basically want to call a python script and be able to get its response. Is there such a thing in Java ? A way to implement that ? Thanks ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277851 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Java equivalent of CFHTTP ?
HI, Is there an equivalent to CFHTTP in Java? I'd like to be able to call a Python script and receive its response. Any code example is welcome !! Thanks ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277856 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: MX7 CFHTTP : connection failure with Proxy
Hi, The weird things is that when I call the CGI program directly from the browser using the following http://myproxy/cgi-bin/mro/pc_ptda_GetDwgDMZ.pl?strCurrentUrl=http://mycoldfusionserver/ptda/itdm/pc_tdm_ViewDrawing.cfmstrOutputTo=ScreenstrMasterDwg=PC106569strMasterRev=DstrDwgInRev=MANDATORY REVISIONstrToolNumbers=PC106569(0DstrDwgServer=wwtstrOverlay=FALSE I can get the output of the CGI program !! I am still puzzle ! Need help please ! ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227364 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: MX7 CFHTTP : connection failure with Proxy
Help Please ! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226063 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: MX7 CFHTTP : connection failure with Proxy
1) Just thinking out loud, but are you sure that you can connect to the proxy url (http://myproxy/cgi-bin/mro/perlFile.pl, in your example) from the ColdFusion MX7 server? Have you tried using cfexec to ping the proxy from within a cf page? Have you tried using cfexec and wget to see if you can get the url via http? This will eliminate the possibility of a lower level (network) snafu causing problems. I tried the fexec, runninf ping, and from the MX7 server, I can ping the proxy. So network problem is definitively discarded. 2) have you tried using the various proxy* attributes of the cfhttp tag? In this scenario, you would have a tag that looked more like : Yes I tried the different atrributed using the proxyserver and proxyport without success. I even tried to add an argument to the JVM that run Jrun server as explained in this Macromedia Technote : http://www.macromedia.com/go/95f66fd8 So now I am short on idea to resolve that problem !!! If you have some other idea to solve it ... I appreciate ! Thanks ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226100 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: MX7 CFHTTP : connection failure with Proxy
1) Just thinking out loud, but are you sure that you can connect to the proxy url (http://myproxy/cgi-bin/mro/perlFile.pl, in your example) from the ColdFusion MX7 server? Have you tried using cfexec to ping the proxy from within a cf page? Have you tried using cfexec and wget to see if you can get the url via http? This will eliminate the possibility of a lower level (network) snafu causing problems. I tried the fexec, runninf ping, and from the MX7 server, I can ping the proxy. So network problem is definitively discarded. 2) have you tried using the various proxy* attributes of the cfhttp tag? In this scenario, you would have a tag that looked more like : Yes I tried the different atrributed using the proxyserver and proxyport without success. I even tried to add an argument to the JVM that run Jrun server as explained in this Macromedia Technote : http://www.macromedia.com/go/95f66fd8 So now I am short on idea to resolve that problem !!! If you have some other idea to solve it ... I appreciate ! Thanks ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226102 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
MX7 CFHTTP : connection failure with Proxy
Hi, I have a problem with CFHTTP when used with a proxy. It gives time out / connection failure. The dump of the cfhttp is : -- struct Charset= [empty string] ErrorDetail= Connect Exception: Connection timed out: connect Filecontent= Connection Failure Header= [undefined struct element] Mimetype= Unable to determine MIME type of file. Responseheader= struct [empty] Statuscode= Connection Failure. Status code unavailable. Text= YES --- What I try to do is to execute a CGI, a perl file, to query some files, if they exist, the perl file will send it back to the client via http. The files are encoded and package within a XML tag. Basically, the network is : Client- ColdFusion MX7 --- Proxy -- CGI Server The code I used to test this is : --begin code 1--- CFHTTP METHOD=POST URL=http://myproxy/cgi-bin/mro/perlFile.pl; result=strXMLFile cfhttpparam name=strOutputTo type=formfield value=Screen cfhttpparam name=strCurrentUrl type=formfield value=http://cfmServer/cfmFile.cfm; cfhttpparam name=strMasterDwgtype=formfield value=123445 cfhttpparam name=strMasterRevtype=formfield value=D cfhttpparam name=strDwgInRev type=formfield value=REVISION cfhttpparam name=strToolNumbers type=formfield value=123445 cfhttpparam name=strDwgServertype=formfield value=wwt cfhttpparam name=strOverlay type=formfield value=FALSE /CFHTTP cfdump var=#strXMLFile# hr / cfoutput File Content 1== #HTMLCodeFormat(strXMLFile.FileContent)# == /cfoutput --end code 1--- where - myproxy = the proxy - cfmserver = the MX7 server - cgiserver = server where reside the perl file I tried to use the CFHTTP attributes proxyserver and proxyport without succes. The code 2 is shown below: ---begin code 2-- CFHTTP METHOD=POST URL=http://cgiserver/cgi-bin/mro/perlFile.pl; result=strXMLFile proxyserver=myproxy proxyport= cfhttpparam name=strOutputTo type=formfield value=Screen cfhttpparam name=strCurrentUrl type=formfield value=http://cfmServer/cfmFile.cfm; cfhttpparam name=strMasterDwgtype=formfield value=123445 cfhttpparam name=strMasterRevtype=formfield value=D cfhttpparam name=strDwgInRev type=formfield value=REVISION cfhttpparam name=strToolNumbers type=formfield value=123445 cfhttpparam name=strDwgServertype=formfield value=wwt cfhttpparam name=strOverlay type=formfield value=FALSE /CFHTTP cfdump var=#strXMLFile# hr / cfoutput File Content 1== #HTMLCodeFormat(strXMLFile.FileContent)# == /cfoutput ---end code 2 The strange things is that when I call directly the CGIserver I got what I expected ie the files I requested I google and tried a lot of suggestions from people who got a similar problem of Connection failure but not necessesarely with a proxy. Things I tried for example: 1-http://www.talkingtree.com/blog/index.cfm/2004/7/28/20040729#more 2-http://www.houseoffusion.com/cf_lists/index.cfm?method=messagesthreadid=21241forumid=4 3-http://qaix.com/coldfusion/313-460-cfhttp-connection-failure-read.shtml Anyone have an idea ? I appreciate your help ! Thanks Waltereo ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225949 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
MX7 CFHTTP : connection failure with Proxy
Hi, I have a problem with CFHTTP when used with a proxy. It gives time out / connection failure. The dump of the cfhttp is : -- struct Charset= [empty string] ErrorDetail= Connect Exception: Connection timed out: connect Filecontent= Connection Failure Header= [undefined struct element] Mimetype= Unable to determine MIME type of file. Responseheader= struct [empty] Statuscode= Connection Failure. Status code unavailable. Text= YES --- What I try to do is to execute a CGI, a perl file, to query some files, if they exist, the perl file will send it back to the client via http. The files are encoded and package within a XML tag. Basically, the network is : Client- ColdFusion MX7 --- Proxy -- CGI Server The code I used to test this is : --begin code 1--- CFHTTP METHOD=POST URL=http://myproxy/cgi-bin/mro/perlFile.pl; result=strXMLFile cfhttpparam name=strOutputTo type=formfield value=Screen cfhttpparam name=strCurrentUrl type=formfield value=http://cfmServer/cfmFile.cfm; cfhttpparam name=strMasterDwgtype=formfield value=123445 cfhttpparam name=strMasterRevtype=formfield value=D cfhttpparam name=strDwgInRev type=formfield value=REVISION cfhttpparam name=strToolNumbers type=formfield value=123445 cfhttpparam name=strDwgServertype=formfield value=wwt cfhttpparam name=strOverlay type=formfield value=FALSE /CFHTTP cfdump var=#strXMLFile# hr / cfoutput File Content 1== #HTMLCodeFormat(strXMLFile.FileContent)# == /cfoutput --end code 1--- where - myproxy = the proxy - cfmserver = the MX7 server - cgiserver = server where reside the perl file I tried to use the CFHTTP attributes proxyserver and proxyport without succes. The code 2 is shown below: ---begin code 2-- CFHTTP METHOD=POST URL=http://cgiserver/cgi-bin/mro/perlFile.pl; result=strXMLFile proxyserver=myproxy proxyport= cfhttpparam name=strOutputTo type=formfield value=Screen cfhttpparam name=strCurrentUrl type=formfield value=http://cfmServer/cfmFile.cfm; cfhttpparam name=strMasterDwgtype=formfield value=123445 cfhttpparam name=strMasterRevtype=formfield value=D cfhttpparam name=strDwgInRev type=formfield value=REVISION cfhttpparam name=strToolNumbers type=formfield value=123445 cfhttpparam name=strDwgServertype=formfield value=wwt cfhttpparam name=strOverlay type=formfield value=FALSE /CFHTTP cfdump var=#strXMLFile# hr / cfoutput File Content 1== #HTMLCodeFormat(strXMLFile.FileContent)# == /cfoutput ---end code 2 The strange things is that when I call directly the CGIserver I got what I expected ie the files I requested I google and tried a lot of suggestions from people who got a similar problem of Connection failure but not necessesarely with a proxy. Things I tried for example: 1-http://www.talkingtree.com/blog/index.cfm/2004/7/28/20040729#more 2-http://www.houseoffusion.com/cf_lists/index.cfm?method=messagesthreadid=21241forumid=4 3-http://qaix.com/coldfusion/313-460-cfhttp-connection-failure-read.shtml Anyone have an idea ? I appreciate your help ! Thanks Waltereo ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225950 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54