Have you set up an HTTP sniffer between the Flash Player and your .NET
proxy? You need to check that the GET and POST requests are correctly
being sent as well as getting more specific information about the error.
 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of rzilist
Sent: Thursday, March 29, 2007 11:23 AM
To: [email protected]
Subject: [flexcoders] Re: How to use Proxy script with Flex WebService?



Peter,

Thanks for your reply. I've tried the suggested way of invoking 
webservice thru proxy, but it didn't work. I'm getting the same 
error: HTTP Request error. Btw, I set useProxy="false" since I'm not 
using FDS. 
You're abs right, and my SWF file resides on the same domain (IIS 
server) as my proxy script (I have both JS and C#->dll proxies).
The webservice resides on another server (no crossdomain.xml) to 
which I obviously don't have access. 
Based on my Java experience, I just need to instantiate the class 
declared inside the proxy script, then call a web method passing 
parameters, but I'm not sure how to do it in Flex. 
Thanks,
/Roman

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Peter Farland" <[EMAIL PROTECTED]> 
wrote:
>
> I thought you would do something like this:
> 
> <mx:WebService id="ws"
> 
> wsdl=http://mydotnetserver/myapplication/myproxy.asmx?
<http://mydotnetserver/myapplication/myproxy.asmx?> 
url=/some_encoded_
> url_to_your_wsdl"
> result="handleResult(event)"
> fault="handleFault(event)" />
> 
> If you SWF is not served from http://mydotnetserver/
<http://mydotnetserver/>  then you will 
need
> a crossdomain.xml file on the dotnet server to set policies to 
allow
> your SWF from the other domain to contact it directly (...and I'm
> assuming that you're trying to use a .NET proxy in the first place
> because this is a third party web service and you can't get them 
to put
> a crossdomain.xml file on that server).
> 
> The SOAP address location (usually defined at the bottom of your 
WSDL in
> the port section of the service) will also need to be changed so 
that it
> goes through your proxy.
> 
> Pete
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of rzilist
> Sent: Wednesday, March 28, 2007 11:50 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: How to use Proxy script with Flex 
WebService?
> 
> 
> 
> Peter,
> Thank you for your post. I've tried your suggestion, but getting 
> the "HTTP request error" every time I invoke the Proxy. I'm not 
sure 
> I'm doing it right, but I have the .NET proxy script sitting on 
the 
> same server my .swf file is. Now, in my .mxml, inside 
> <mx:WebService, I set the wsdl="myProxyFile". This results in the 
> above mentioned HTTP error. I see my webservice methods defined 
> inside proxy script, but I don't know how to invoke it from MXML 
> file. I'll probably have to publish it in a new post.
> Thanks,
> Roman 
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> , "Peter Farland" <pfarland@> 
> wrote:
> >
> > If you set useProxy="true" WebService will generated an
> > HTTPRequestMessage as it is expecting to communicate with the FDS
> > ProxyService which runs on a messaging backbone. The format of 
the
> > message depends on the ChannelSet assigned to the WebService (or 
> the
> > defaults set for the DefaultHTTPS destination for secure URLs in
> > services-config.xml). Instead of trying to deserialize an
> > HTTPRequestMessage I think you should leave useProxy="false" (the
> > default, btw) and just set the URL to your own custom proxy.
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> 
> [mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of rzilist
> > Sent: Friday, March 23, 2007 4:46 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%
40yahoogroups.com> 
> > Subject: [flexcoders] How to use Proxy script with Flex 
WebService?
> > 
> > 
> > 
> > Hi folks,
> > I'm consuming a webservice from secured domain which with no 
> > crossdomain.xml file at server root. To get around the "Security 
> error 
> > accessing url" message, and as the only feasible solution, I 
wrote 
> a 
> > proxy script in .NET and uploaded to the IIS server hosting the 
> swf. 
> > Now, when I try to use the proxy script specifying 
useProxy="true" 
> I 
> > get an error saying "File Not Found". How would I go about 
> invoking 
> > my proxy script? I've tried the same way I do with Webservice, 
but 
> all 
> > in vain. Please help.
> > Thanks,
> > Roman
> >
>



 

Reply via email to