Select to view content in your preferred language

authenticated data extraction services?

2268
17
01-28-2011 09:27 AM
JonFisher
Emerging Contributor
I have an anonymous Data Extraction task up and running, and am calling it from FlexViewer 2.2 with the DataExtract widget with no trouble. However, in addition to this task, I want a separate authenticated task that will include sensitive data. My hope was that I can use tokens just like when I connect to secure map services via the viewer, but when I set <dataextractionservice> to https://<mysecureserverpath>/rest/services/TNC_internal/core_data_extract_auth/GPServer?token=<mytoken>
and try to call it via the viewer it doesn't work. I'm using the same token I use to connect to the secure map services (which are in the same folder as the secure GP service), and I'm accessing it via the same server / identifier.

Has anyone else tried this, either successfully or unsuccessfully?
Tags (2)
0 Kudos
17 Replies
DasaPaddock
Esri Regular Contributor
Firefox doesn't send the referer header unless it's sending a POST request. Is you're token secured by referer or IP?
0 Kudos
JonFisher
Emerging Contributor
Firefox doesn't send the referer header unless it's sending a POST request. Is you're token secured by referer or IP?


By referrer. So you're saying the only way to get it to work with Firefox is to use a token secure by IP? Will it still work in other browsers?
0 Kudos
DasaPaddock
Esri Regular Contributor
The tasks automatically switch to using a POST when a token is present. Can you use a tool like HttpFox to verify whether the requests are using POST or GET?
0 Kudos
JonFisher
Emerging Contributor
The tasks automatically switch to using a POST when a token is present. Can you use a tool like HttpFox to verify whether the requests are using POST or GET?


Yes, according to firebug they appear to still be using GET, e.g. using the map link I posted above, the map is requesting:
https://maps.tnc.org/ecadpubprodanon/rest/services/testextract_auth/GPServer/Extract%20Data%20Task?t... which results in an invalid token message. I see that to display the map layers POST requests are used, but not for the data extraction GP service.
0 Kudos
DasaPaddock
Esri Regular Contributor
Try these changes to the DataExtractWidget.mxml file.

1. Make this change since Flash won't POST an empty body:
gpService.send();
to:
gpService.send({ forceFlashPOST: true });

2. Add method="POST" like this:

<mx:HTTPService id="gpService"
                        fault="gpService_faultHandler(event)"
                        method="POST"
                        result="onJSONLoad(event)"
                        resultFormat="text"/>
0 Kudos
JonFisher
Emerging Contributor
Thanks, Dasa, that worked! Will these enhancements make it into the next release of the FlexViewer?
0 Kudos
shay-geo
Frequent Contributor
All,

Does any one know, how to connect to secured services using Flex Viewer 2.2?

In previous releases, there was a sample on connecting to secured services by adding <proxy> tag into config.xml page.

We have a proxy.aspx with proxy.xml page (which has rest services urls and authentication)
http://help.arcgis.com/en/webapi/flex/help/index.html#arcgis_server/secured_services.htm#

With ESRI sample, there was no proxy tag either in config.xml page. So i was wondering, if anyone did anything special to connect to secured dynamic and cached services.



Thanks,
Shail
0 Kudos
DineshKumar1
New Contributor
Hi,

We are Providing a genuine data extraction services and following this techniques,

   

  • Extract data from databases

  •     Querying various databases

  •     Digging out important data across numerous databases and formats

  •     Updated information about competitors' services/products, pricing strategy and the latest offers they provide

  •     Extract data from websites, forums, blogs, etc. to review consumers' reviews and opinions


If you want to get more information please search "Informatics Outsourcing"
0 Kudos