I added some code to the cfc that would write to a log file when the
method was hit. So far it has yet to write anything to a log file. So,
here i the code I'm using. Maybe it will help.

Here is the mxml code

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical" >
   <mx:Script>
      <![CDATA[
         import mx.rpc.events.ResultEvent;
         import mx.controls.Alert;

         [Bindable]
         public var sResult:String;

         public function handleStringResult(event:ResultEvent):void{
            sResult=event.result as String;     
         }

      ]]>
   </mx:Script>

   <mx:RemoteObject
      id="myService"
      destination="ColdFusion"
      source="phils.helloWorld.HelloWorld"
      showBusyCursor="true">
<mx:method name="sayHelloString" result="handleStringResult(event)"
fault="Alert.show(event.fault.message)"/>
   </mx:RemoteObject>

<mx:Label id="lblStringResult" text="{sResult}"/>
   <mx:Button label="get String via Remote Object"
click="myService.sayHelloString()"/>
   <mx:Label text="Label me :0"/>

</mx:Application>

This is the CFC code

<cfcomponent>
        <cffunction name="sayHelloString" access="remote" returnType="string">
                <cflog file="flex" type="information" text="i ran">
                <cfreturn "Hello World!">
        </cffunction>
</cfcomponent>

On 10/17/07, Phill B <[EMAIL PROTECTED]> wrote:
> Yes, I can browse to the cfc.
>
> I haven't messed with any of the .xml config files on my laptop or the
> dev server.
>
> I have tried it using the debugger but didn't notice anything odd.
> Then again, I'm not sure I have the project set up right to work with
> debugging on a remote server.
>
> The code is from this article
> http://www.adobe.com/devnet/flex/articles/helloworld.html
> the only thing I changed was the source for the CFC. I don't have the
> code with me but I can send it in the morning.
>
> On 10/17/07, Messer, Jon <[EMAIL PROTECTED]> wrote:
> > Can you browse directly to the URL of the cfc that you are using?
> >
> > If the cfc is in a cf mapped path, did you update the
> > remoting-config.xml to <use-mappings>true</use-mappings>?
> >
> > Also have you changed any of the endpoint URIs in the services-config on
> > either server? If they don't match you'd have to compile against the one
> > on the server for it to work on that server.
> >
> > Also have you used the flex debugger to examine the result/fault event
> > that you receive?
> >
> > What does your mxml/as code look like that invokes the cfc?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4709
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to