Adobe Dreamweaver Forums



Last 10 THreads :         Re: 2.1 GB TIF size limit (Last Post : Buko - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : pfigen@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: SFW and date created (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          help me with adjustments layers in CS4 (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 1 - Views : 2 )           »          Snippet Pod Problems (Last Post : Pat@ffic - Replies : 4 - Views : 5 )           »          bad luck (Last Post : newwaveboats - Replies : 0 - Views : 1 )           »          Cannot setup audio with Captivate 2 (Last Post : c..k - Replies : 0 - Views : 1 )           »          Re: Urgent: Can Only Record in Demonstration Mode (Last Post : halyna - Replies : 0 - Views : 1 )           »          Change custom Vector class to new Vector class in player10 (Last Post : VarioPegged - Replies : 1 - Views : 2 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-19-2008, 11:25 AM
Pirlock
 
Posts: n/a
Diggs:
Default Flex web service consumer problem

Hello guys!

I have just started messing around with Flex, and I thought that a good
practice would be trying to connect to one of the web services that my company
offers developing a simple client on Flex.

I used Flex Builder and found it really easy: With only a few lines of code a
really nice GUI... impressive!

So now lets show it to my colleagues...but UPS!

I place the application under my local Tomcat and instead of retrieving data I
get:

[FaultEvent fault=[RPC Fault faultString="Security error accessing url"
faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
messageId=null type="fault" bubbles=true cancelable=true eventPhase=2]

After a lot of research I cannot make it work... I have read about
crossdomain.xml, I have copied this file into my tomcat\webapps\ROOT folder
allowing all domains:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>

Because this crossdomain.xml should be on the server were my Flex client is
placed, isn't it? I have read some articles, and they say that this XML has to
be placed on the server which offers the web service. I think this cannot be
possible, in that case I have to ask to my IT department to upload that file,
and they for sure aren't going to allow that.

Could you please help me? Why is the client working under Flex Builder and not
when I deploy it on my Tomcat? And when I says deploy I mean that I have copied
what Flex Builder generates on "bin-release" folder into the Tomcat's webapps
folder.

Thanks for your help in advance!



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-21-2008, 01:04 PM
SujitG
 
Posts: n/a
Diggs:
Default Re: Flex web service consumer problem

Hi,

When you are running from Flex Builder, Flex Builder automatically adds your
...swf file to list of trusted files. So cross domain check is not made and you
can access the web service. Where as when it is launched from the web server,
cross domain check is made. You can use BlazeDS (Free and Open source J2EE
application) and use Proxy service to request the web service. In this case you
don't need a cross domain file to be uploaded in the web server when the web
service is exposed.

Hope this helps.

Reply With Quote
  #3 (permalink)  
Old 11-21-2008, 04:14 PM
Pirlock
 
Posts: n/a
Diggs:
Default Re: Flex web service consumer problem

Sure that helps!

In fact I have already finished the client using finally BlazeDS. I am really
happy about it, because my managers are really impressed with the final result,
and they are considering using Flex in next developments.

My only complain for the moment is that Flex hasn't got a PDF viewer
component, and we have to do an ugly workaround using an iframe (which we have
to show and hide to avoid overlapping with the SWF content). But I'm still
completely fanatic about Flex!

Thank you so much for your help and regards from Spain!

Reply With Quote


  #4 (permalink)  
Old 11-24-2008, 08:05 AM
SujitG
 
Posts: n/a
Diggs:
Default Re: Flex web service consumer problem

Hi,

Yes, Flex rocks !
Unfortunately there is no way to render PDF in Flash applications as of now. I think iframe is the way to go.

Enjoy creating Rich Internet Applications.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk