Hi Sagar,

If you install samples at 
http://localhost:8100/samples/, you won't get an error because, by default Samples/WEB-INF/flex/flex-config.xml comeswith pre-defined whitelist.

If you open "WEB-INF/flex/flex-config.xml" and look for following xml node:

 

 <remote-objects>
        <!-- all locations may be specified as a URL relative to the web server document root,
             or a complete http URL; to specify relative to the context root, please
             include {context.root}
             NOTE: do not use a leading slash with {context.root} -->

        <!-- The location of the AMF Gateway. The value below is used
             when calling a page over http or when protocol is specified as http -->
        <amf-gateway>{context.root}/amfgateway</amf-gateway>

        <!-- The location of the AMF Gateway to use when calling a page over https
             or when protocol is specified as https -->
        <amf-https-gateway>{context.root}/amfgateway</amf-https-gateway>

        <!-- use proxy specified via flashvars or query parameter ?remoteURL=XXX -->
        <allow-url-override>false</allow-url-override>

        <!-- a list of urls accessible via this remote objects proxy -->
        <whitelist>
            <!-- whitelist config for unnamed objects -->
            <unnamed>
                <source>samples.*</source>
                <source>samples</source>
                <!--
                Uncomment the source element below to enable access to all classes
                during development.

                We strongly recommend not allowing access to all source files
                in production, since this exposes Java and Flex system classes.
                <source>*</source>
                -->
            </unnamed>

            <!-- whitelist config for named objects -->
            <named>
                <object name="SampleEmployeeRO">
                    <source>samples.explorer.EmployeeManager</source>
                    <type>stateful-class</type>
                    <allow-unnamed-access>true</allow-unnamed-access>
                </object>
            </named>
        </whitelist>
    </remote-objects>


See the highlighted section, it needs to be changed to accoringly if you want to access the service.  You can also read the comments below those red lines, which says, if you do
 
<source>*</source>, you would be able to access all the classes....Which is indeed not a recommended for production environment.
 
 
So you can now change <source>samples.*</source> to <source>*</source>, to make your application work.
 
Please look at the Flex docs for more:  http://livedocs.macromedia.com/flex/15/flex_docs_en/00000786.htm . Please go through the documentation for guidelines and best practices to avoid any mistake or problems at later times.
 
 
Hope that helps,
 
-abdul
 
 

-----Original Message-----
From: Ketan R Bengali [
mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 15, 2005 2:53 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Installing Flex under a full Jrun


Content-type: text/plain;
        format=flowed
Content-Disposition: inline


hello,

we have done the same thing but for the sample.war and path is
http://localhost:8100/

but in samples session code is not working .
what will be the problem.
Asking for whitelist error
path
http://localhost:8100/explorer/misc/ServerSessionDemo.mxml


Sagar

Reply via email to