Not quite right, you can either pre-establish the arguments and then use
myService.getProjects.send(), or just provide them (if any) at the time
of calling using myService.getProjects(). When you use the parentheses,
you're actually invoking the operation as a function call (which gets
dynamically resolved for you to a WebService Operation).
 
You're successfully invoking a call with myService.getProjects(), that's
not the problem, it's that the HTTP request failed. Perhaps you need a
crossdomain.xml file on the localhost server to allow for your Flash
client to make a request?
 
 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of bobignacio
Sent: Thursday, March 08, 2007 1:11 PM
To: [email protected]
Subject: [flexcoders] Re: new to webservices in flex - need help! :)



Try this...

The property:

click="myService.getProjects()"

should be:

click="myService.getProjects().send()"

Hope this helps,

Bob I.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "captnjay_mobile" <[EMAIL PROTECTED]> 
wrote:
>
> [RPC Fault faultString="HTTP request error"
> faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent
> type="ioError" bubbles=false cancelable=false eventPhase=2 
text="Error
> #2032: Stream Error. URL: http://localhost/HelloWorld.cfc
<http://localhost/HelloWorld.cfc> "]. URL:
> http://localhost/HelloWorld.cfc <http://localhost/HelloWorld.cfc> "]
> at
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa
<http://www.adobe.com/2006/flex/mx/internal::fa> 
ul\
> tHandler()
> at mx.rpc::Responder/fault()
> at mx.rpc::AsyncRequest/fault()
> at ::DirectHTTPMessageResponder/errorHandler()
> at
> 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
en\
> tFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
> 
> Code:
> <mx:WebService id="myService"
> wsdl="http://localhost/HelloWorld.cfc?WSDL
<http://localhost/HelloWorld.cfc?WSDL> " useProxy="false">
> <mx:operation name="getProjects" resultFormat="object" >
> </mx:operation>
> </mx:WebService>
> 
> *I can hit the http://localhost/HelloWorld.cfc?WSDL
<http://localhost/HelloWorld.cfc?WSDL>  URL so I know 
that
> path is correct.
> 
> I'm calling it via button..
> <mx:Button label="get projectsx" click="myService.getProjects()" 
x="377"
> y="199"/>
> 
> 
> Then I'm trying to populate the results to a data grid
> <mx:DataGrid dataProvider="{myService.getProjects.arrProjects}"
> width="668" height="376" x="20" y="240">
> 
> I have an array of structures coming back from the HelloWorld 
cfc... 
> arrProjects
> 
> Thanks in advance!
>



 

Reply via email to