ColdFusion Proxy Page?

1096
6
08-06-2010 07:42 AM
DavidJones2
New Contributor
Hi,

I am deploying a AGS JavaScript site to a ColdFusion website, where ArcGIS Server remains on a IIS server.  This creates the classic cross-domain problem with large requests using POST, such as buffers.  ESRI provides proxies for .Net, PHP & Java, but not ColdFusion.  Does anyone have an example I could use?  I am a .Net developer not a ColdFusion developer.

Thanks very much!
0 Kudos
6 Replies
timgogl
New Contributor II
were you ever able to get the proxy page set up for coldfusion?
0 Kudos
Todd
by
New Contributor III
Late reply, but yes it was a bit more simple than I thought.  Thanks!
Regards,
Todd
0 Kudos
DanielNieto_Jr
New Contributor
I am attempting to write a proxy page using cold fusion as well.  Any hints you could give me on how to best accomplish this?  I am very new to cold fusion.
0 Kudos
AdneKylleso
New Contributor II
Late reply, but yes it was a bit more simple than I thought.  Thanks!


I'm new to ColdFusion as well, so I would appreciate some pointers. I have something going, but it does not work with the Sample Flex Viewer.

Any input would be appreciated:D
0 Kudos
DanielNieto_Jr
New Contributor
I ended up getting one to work for the most part, I am not sure if it works 100% the same as the ESRI provided ones but here is the basic outline.

1.  Turn off the debug output

2.  Grab the URL from the url string I did it like this
<cfset reqURL = getToken(cgi.query_string,1,"&") />


3. Set up your security logic as far as what servers you want to use, tokens etc.  I have not implemented this part yet.

4. Set up a cfhttp to open a connection the the proxied URL, method post, name a result you can read on adobe about this tag as I am not exactly familiar with all the technicalities of it and do not want to pass along bad advice.


5. within that cfhttp loop through all the form values and use http param, where it has name=#i# and value = #form set that to however you choose to do the loop, tokens, etc

<cfhttpparam type=formField name = #i# value = #form#>


6. after you finish the cfhttp logic output the result so whatever you named your result in the cfhttp tag, use that name.fileContent in a cfoutput


Basically I just used firebug to see what it was passing around in the requests. However this is bare minimum as it doesn't handle any security issues what so ever and can probably be improved on a lot. The original poster never got back to me on this, so he may have a way better implementation.
0 Kudos
MarcEhrenkrantz
New Contributor
Late reply, but yes it was a bit more simple than I thought.  Thanks!


Can you share theCF proxy code. Thanks!
0 Kudos