function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dfcdfc 

Sites, Flex, and Web API

I am attempting to build a site with a Flex .swf in it that is accessing the database via the Flash Connection object provided in your .swc file.  Do I need to call apex.login(new LoginRequest... and if so, what ID and password do I use? 

 

Assuming this is anonymous access, is there a way to use the .swc file you provide without logging in?  Or is access to the database impossible via this mechanism for sites?

 

Thanks!

 

Dave

 

Best Answer chosen by Admin (Salesforce Developers) 
Ron HessRon Hess

There is no valid session id for guest access by design.  

 

You could exposes the org data using a webservice ( Apex Class), which is made public,

then consume that in the SWF.

 

this can be done without a sessionid.

All Answers

Ron HessRon Hess

There is no valid session id for guest access by design.  

 

You could exposes the org data using a webservice ( Apex Class), which is made public,

then consume that in the SWF.

 

this can be done without a sessionid.

This was selected as the best answer
dfcdfc

Thanks, Ron.  Once I expose an anonymous Apex class-based web service, can I invoke it with the salesforce SWC Connection class via apex.execute() or should I go with 'raw' Flash with a WebServices class instance? 

 

(I am basically trying to find out if the swc-based Flash binding to the web api that Salesforce supplies is suitable for anonymous execution of an inbound web service.  It is working fine for me for normal non-Sites access -- where I must login first, of course, before executing anything else.)

 

Thanks! 

 

Dave

 

Ron HessRon Hess

i would use Flash features to read from the xml output of the public web services.  Inside flex you can read from this webservice using http or the webservice classes.   I've not done this, but that's how i would approach the problem.

 

You could even use a visualforce page that is mime-typed to output XML in a format the Flex can easily consume.  Has anyone done this already that would like to share?

IC-TannerIC-Tanner
Hi everyone, I would like to build something similar to this logic. The idea being to have a flash based map on a webpage that was pulling its data from a SF object. The object's records would contain geographically information that would display a dot for each record (based on the geographical information). I understand the basic logic how this could be done as Ron point out, but always wanted to know if anyone has built this type of thing before?
acl5acl5

If I use a webservice to expose my org data, is it possible to view/download attachments?  I've tried using a webservice to get product data out of my org, but I can't seem to open any of the attached documents without logging in.  Do you know of a way to view attached docs without being logged into salesforce?

 

Thanks,

Adam