Hi Jonathan! Sorry about that....I just took a closer look at your code and saw that you were using RemoteObjects (and not WebServices/HttpServices). In that case, you have to uncomment out items in that section as you did.
There is no better way to do this because of security purposes. As the comment in flex-config.xml says: "Uncomment the source element below to enable access to all classes, or add the individual URLs you wish to access. We strongly recommend not allowing access to all source files in production, since this exposes Java and Flex system classes." Thanks! Susan -----Original Message----- From: Jonathan Baney [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 11:25 AM To: [email protected] Subject: Re: [flexcoders] session servlet problem I made the recommended changes...and it didn't fix anything. I got the same error. I then edited the whitelist for remote objects and added the <source>*</source> and it worked. Is there a better way to do this? Susan Chang wrote: > Hi Jonathan! > > In your flex-config.xml file, uncomment out "<url>http://*</url>" and > "<url>https://*</url>" under the <whitelist> section of > <web-service-proxy> > and <http-service-proxy>. > > Example under <web-service-proxy>: > > <whitelist> > <!-- config for unnamed web services --> > <unnamed> > <url>http://{localserver}/* > <http://%7Blocalserver%7D/*></url> > <url>https://{localserver}/* > <https://%7Blocalserver%7D/*></url> > <!-- > For security, the whitelist is locked down by default. > Uncomment the first two urls below to enable access to all > URLs, > or add above the individual URLs you wish to access. > --> > <url>http://*</url> > <url>https://*</url> > </unnamed> > ... > </whitelist> > > Hope this helps! > Susan > Flex QA > > -----Original Message----- > From: Jonathan Baney [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 06, 2004 10:50 AM > To: [email protected] > Subject: [flexcoders] session servlet problem > > Hi All, > > I am having difficulties with using the session servlet. My web.xml is > unmodified and I make no reference to the session servlet in the > flex_config.xml. I am using flex 1.0 on Jrun 4. Here is the error I get: > > "Service threw an exception during method invocation: You are not > allowed to access the service /faq. The service is not in the > configured whitelist." > > All the docs say to do is add something like this in the mxml file (this > is what I have) > <mx:RemoteObject source="servlet" id="sessionObj" encoding="AMF" > showBusyCursor="true" result="retrieveSessionParams(event)"/> > > I am using the following to access the session in the mxml file: > > //called when app is initialized > function initApp():Void { > sessionObj.session("get","currentView"); > } > function retrieveSessionParams(event):Void { > var currentView:String = event.result.currentView; > } > function setSessionParams(param:String):Void { > sessionObj.session("set","currentView",param); > } > > Am I missing something? > > Thanks, > Jonathan > > -- > Jonathan Baney > Enterprise Data Modeler > Thunderbird Consulting Application Engineering: A division of ITS > Mesa Community College > > > > > > > Yahoo! Groups Links > > > > > > Yahoo! Groups Sponsor > ADVERTISEMENT > click here > <http://rd.yahoo.com/SIG=129s7ng18/M=295196.4901138.6071305.3001176/D=groups /S=1705007207:HM/EXP=1083953154/A=2128215/R=0/SIG=10se96mf6/*http://companio n.yahoo.com> > > > > ------------------------------------------------------------------------ > Yahoo! Groups Links > > * To visit your group on the web, go to: > http://groups.yahoo.com/group/flexcoders/ > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > -- Jonathan Baney Enterprise Data Modeler Thunderbird Consulting Application Engineering: A division of ITS Mesa Community College (480) 461-7283

