See the sample code in flex-config.mxml below.
-------------------------------------------------------------------------------------------------------------------------------------------------------
<web-service-proxy>
<!-- 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} -->
<!-- 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} -->
<!-- determine whether the proxy is used or bypassed.
client - up to the client via the useProxy attribute on the WebService, if unspecified will use the proxy
always - always use the proxy, useProxy='false' on the WebService will generate a Warning
never - never use the proxy, useProxy='true' on WebService will generate a Warning
-->
<proxy-use-policy>client</proxy-use-policy>
client - up to the client via the useProxy attribute on the WebService, if unspecified will use the proxy
always - always use the proxy, useProxy='false' on the WebService will generate a Warning
never - never use the proxy, useProxy='true' on WebService will generate a Warning
-->
<proxy-use-policy>client</proxy-use-policy>
<!-- the web service proxy to use when calling a page over http or -->
<!-- when protocol is specified as http -->
<url>{context.root}/flashproxy</url>
<!-- the web service proxy to use when calling a page over https or -->
<!-- when protocol is specified as https -->
<https-url>{context.root}/flashproxy</https-url>
<!-- use proxy specified via flashvars or query parameter ?proxyURL=XXX -->
<allow-url-override>false</allow-url-override>
<!-- Whether to accept self-signed certificates. Dangerous in production -->
<allow-lax-ssl>false</allow-lax-ssl>
<!-- a list of urls accessible via this web service proxy -->
<!-- the {localserver} token may be added in place of actual host and port number
to ensure that services created with relative URLs are allowed -->
<whitelist>
<!-- config for unnamed web services -->
<unnamed>
<url>http://{localserver}/*</url>
<url>https://{localserver}/*</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>
<!-- config for named web services -->
<!-- the {localserver} token may be added in place of actual host and port number
to ensure that services created with relative URLs are allowed -->
<whitelist>
<!-- config for unnamed web services -->
<unnamed>
<url>http://{localserver}/*</url>
<url>https://{localserver}/*</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>
<!-- config for named web services -->
<named>
<service name="EmployeeWS">
<!-- enables use of custom fault code on the client for handling authentication failures -->
<use-custom-authentication>false</use-custom-authentication>
<!-- wsdl location for the named service -->
<wsdl>{context.root}/EmployeeWS.jws?wsdl</wsdl>
<!-- endpoints for the named web service -->
<endpoints>
<!-- actual url to use when accessing the named web service -->
<endpoint>{context.root}/EmployeeWS.jws</endpoint>
</endpoints>
<!-- user-name and password to use when accessing this web service -->
<!-- <run-as user="user" password="pwd"/> -->
<!-- Adds the service's wsdl and endpoints to the unnamed whitelist. If false, these can never be used unnamed -->
<!-- This should be set to false if using web application security with this named service -->
<!-- <allow-unnamed-access>true</allow-unnamed-access> -->
</service>
<service name="ProjectWS">
<!-- enables use of custom fault code on the client for handling authentication failures -->
<use-custom-authentication>false</use-custom-authentication>
<!-- wsdl location for the named service -->
<wsdl>{context.root}/services/ProjectWS?wsdl</wsdl>
<!-- endpoints for the named web service -->
<endpoints>
<!-- actual url to use when accessing the named web service -->
<endpoint>{context.root}/services/ProjectWS</endpoint>
</endpoints>
<!-- user-name and password to use when accessing this web service -->
<!-- <run-as user="user" password="pwd"/> -->
<!-- Adds the service's wsdl and endpoints to the unnamed whitelist. If false, these can never be used unnamed -->
<!-- This should be set to false if using web application security with this named service -->
<!-- <allow-unnamed-access>true</allow-unnamed-access> -->
</service>
</named>
<service name="EmployeeWS">
<!-- enables use of custom fault code on the client for handling authentication failures -->
<use-custom-authentication>false</use-custom-authentication>
<!-- wsdl location for the named service -->
<wsdl>{context.root}/EmployeeWS.jws?wsdl</wsdl>
<!-- endpoints for the named web service -->
<endpoints>
<!-- actual url to use when accessing the named web service -->
<endpoint>{context.root}/EmployeeWS.jws</endpoint>
</endpoints>
<!-- user-name and password to use when accessing this web service -->
<!-- <run-as user="user" password="pwd"/> -->
<!-- Adds the service's wsdl and endpoints to the unnamed whitelist. If false, these can never be used unnamed -->
<!-- This should be set to false if using web application security with this named service -->
<!-- <allow-unnamed-access>true</allow-unnamed-access> -->
</service>
<service name="ProjectWS">
<!-- enables use of custom fault code on the client for handling authentication failures -->
<use-custom-authentication>false</use-custom-authentication>
<!-- wsdl location for the named service -->
<wsdl>{context.root}/services/ProjectWS?wsdl</wsdl>
<!-- endpoints for the named web service -->
<endpoints>
<!-- actual url to use when accessing the named web service -->
<endpoint>{context.root}/services/ProjectWS</endpoint>
</endpoints>
<!-- user-name and password to use when accessing this web service -->
<!-- <run-as user="user" password="pwd"/> -->
<!-- Adds the service's wsdl and endpoints to the unnamed whitelist. If false, these can never be used unnamed -->
<!-- This should be set to false if using web application security with this named service -->
<!-- <allow-unnamed-access>true</allow-unnamed-access> -->
</service>
</named>
</whitelist>
</web-service-proxy>
-------------------------------------------------------------------------------------------------------------------------------------------------------
--- In [email protected], "Jeremy Rottman" <[EMAIL PROTECTED]> wrote:
>
> During development, I used something like this to handle all data
> sending/retreiving.
>
> <mx:WebService id="SaleMod" useProxy="false"
> wsdl="http://flex.homesmartagent.com/cfc/adminHS2F.cfc?wsdl"
> showBusyCursor="true" />
>
> Currently I develope on one box, and I upload the compiled swf to
> anohter box that contains our cf/sql servers. How can I setup a named
> webservice with in flex.
>
> any help will be greatly appreciated.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

