Re: [flexcoders] Calls to CFCs

2005-09-29 Thread Greg Johnson






I will give that the / suggestion a try. As a workaround I switched to
a webservice vs remoteobject and it has no problems and seems to let
the client load faster.

But I just commented out the remoteobject so I will try flipping back
and see what happens.

Now my biggest problems are I am making a call to a CFC and passing it
a parameter but the CFC is complaining that it wasn't passed. Plus my
debugger for some reason who let me watch variables anymore. I put an
alert in the Flex code just before the CFC call and it shows valid data
in the variable I am sending, but it just doesn't get to the CFC for
some reason. Doing the same exact thing with all the other CFCs and
they work fine :/

Peter Farland wrote:

Actually, it's likely that you're getting an AppendToGatewayUrl AMF
Response Header from the server because it detected that while a session
was created during the request, the client didn't inform the server
whether it could accept cookies. 
  
This AMF Response Header is trying to tell the client NetConnection to
decorate its connection URL with some extra info, for example a
jsessionid for Java or a cfid/cftoken for ColdFusion.
  
You may then be using IIS... In which case it may be barfing on the
semi-colon in something like the jsessionid token, irrespective of
whether you have a ;.
  
  http://cfxtest.research.unc.edu/flashservices/gateway/;jessionid=XYZ123A
BC
  
I believe CF released a hot fix for this issue, but the work around is
easy... Just add a ? To the gateway URL (or "endpoint" in flex speak) so
that the session information won't annoy IIS.
  
endpoint="http://cfxtest.research.unc.edu/flashservices/gateway?"
  
  
Pete
  
  
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Muzak
Sent: Wednesday, September 28, 2005 11:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Calls to CFCs
  
A wild guess: try adding a "/" at the end of the gateway url.
  
endpoint="http://cfxtest.research.unc.edu/flashservices/gateway/"
  
I've seen USERID and alike being added to the gateway url when making
remote calls.
In that case, without the ending '/', the gateway url gets messed up.
  
Might not be the case here, but it's the first thing I'd check ;-)
  
regards,
Muzak
  
- Original Message -
From: "Greg Johnson" [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 28, 2005 2:28 PM
Subject: Re: [flexcoders] Calls to CFCs
  
  
 Here is where the connection is setup in the main file:



 mx:RemoteObject id="mr_cfc"
 endpoint="http://cfxtest.research.unc.edu/flashservices/gateway"
 source="mr.mr_cfc"
 fault="mx.controls.Alert.show(event.fault.faultstring)"
 showBusyCursor="true" 
  
  
  
  
  
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.com
  
Yahoo! Groups Links
  
  
  
  
  
  
  

  
  
  

As
a professional in computers, I personaly recommend Avast Antivirus
avast! Antivirus: Inbound
message clean.

Virus
Database (VPS): 0539-1, 09/27/2005
Tested on: 9/29/2005 8:13:54 AM
avast! - copyright (c) 2000-2004 ALWIL Software.


  
  


-- 
Greg Johnson
Owner  Lead Technician
[EMAIL PROTECTED]

Techno-Fix-It
Filling the Gap Between the Store and the Repair Shop
--
www.technofixit.com
Phone:(919)-371-1476
Fax:(919)-882-9804
P.O. Box 1094
Morrisville, N.C. 27560






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  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.



  










RE: [flexcoders] Calls to CFCs

2005-09-29 Thread Peter Farland





Note that my suggestion was to append the ? query 
string marker, please let me know if this resolves the issue as your initial 
symptoms described the issue with AppendToGatewayUrl 
exactly.

Also, the problem is that Flash Remoting (and hence 
stillFlex's RemoteObject)with ColdFusion introduced the concept of 
named arguments. That is, if your CFC is expecting a Struct as a single argument 
and you're sending it an object, then it won't work as the CFC proxy between the 
gateway interprets them as "named arguments" and thus looks for parameters to 
match each of the keys in the AS Object. Try adding a second, dummy variable to 
the CFC function and let me know if this solves the issue.




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Greg 
JohnsonSent: Thursday, September 29, 2005 8:42 AMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Calls to 
CFCs
I will give that the / suggestion a try. As a workaround I 
switched to a webservice vs remoteobject and it has no problems and seems to let 
the client load faster.But I just commented out the remoteobject so I 
will try flipping back and see what happens.Now my biggest problems are 
I am making a call to a CFC and passing it a parameter but the CFC is 
complaining that it wasn't passed. Plus my debugger for some reason who 
let me watch variables anymore. I put an alert in the Flex code just 
before the CFC call and it shows valid data in the variable I am sending, but it 
just doesn't get to the CFC for some reason. Doing the same exact thing 
with all the other CFCs and they work fine :/Peter Farland wrote: 
Actually, it's likely that you're getting an 
  AppendToGatewayUrl AMFResponse Header from the server because it detected 
  that while a sessionwas created during the request, the client didn't 
  inform the serverwhether it could accept cookies. This AMF 
  Response Header is trying to tell the client NetConnection todecorate its 
  connection URL with some extra info, for example ajsessionid for Java or a 
  cfid/cftoken for ColdFusion.You may then be using IIS... In which case 
  it may be barfing on thesemi-colon in something like the jsessionid token, 
  irrespective ofwhether you have a ;.http://cfxtest.research.unc.edu/flashservices/gateway/;jessionid=XYZ123ABCI 
  believe CF released a hot fix for this issue, but the work around 
  iseasy... Just add a ? To the gateway URL (or "endpoint" in flex speak) 
  sothat the session information won't annoy IIS.endpoint="http://cfxtest.research.unc.edu/flashservices/gateway?"Pete-Original 
  Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
  OnBehalf Of MuzakSent: Wednesday, September 28, 2005 11:22 AMTo: 
  flexcoders@yahoogroups.comSubject: 
  Re: [flexcoders] Calls to CFCsA wild guess: try adding a "/" at the 
  end of the gateway url.endpoint="http://cfxtest.research.unc.edu/flashservices/gateway/"I've 
  seen USERID and alike being added to the gateway url when makingremote 
  calls.In that case, without the ending '/', the gateway url gets messed 
  up.Might not be the case here, but it's the first thing I'd check 
  ;-)regards,Muzak- Original Message -From: 
  "Greg Johnson" [EMAIL PROTECTED]To: 
  flexcoders@yahoogroups.comSent: 
  Wednesday, September 28, 2005 2:28 PMSubject: Re: [flexcoders] Calls to 
  CFCs Here is where the connection is setup in the main 
  file: 
  mx:RemoteObject id="mr_cfc" endpoint="http://cfxtest.research.unc.edu/flashservices/gateway" 
  source="mr.mr_cfc" 
  fault="mx.controls.Alert.show(event.fault.faultstring)" 
  showBusyCursor="true" --Flexcoders Mailing 
  ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives:http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
  


As 
a professional in computers, I personaly recommend Avast Antivirusavast! Antivirus: Inbound message clean. 

Virus 
Database (VPS): 0539-1, 09/27/2005Tested on: 9/29/2005 8:13:54 
AMavast! - copyright (c) 2000-2004 ALWIL 
Software.
-- 
Greg Johnson
Owner  Lead Technician
[EMAIL PROTECTED]

Techno-Fix-It
Filling the Gap Between the Store and the Repair Shop
--
www.technofixit.com
Phone:(919)-371-1476
Fax:(919)-882-9804
P.O. Box 1094
Morrisville, N.C. 27560





--
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
  
  
  

Re: [flexcoders] Calls to CFCs

2005-09-29 Thread Greg Johnson






Well the problem with it not passing solved itself somehow. Debugger
still wont let me watch variables though.

I tried the ? and while it prevented it from hanging, when I go do one
search I get a message about unsupported type in stream so I just went
back to the webservice. Even tried diffferent tweeks to the cfc etc
and it wouldn't work.

Peter Farland wrote:

  
  
  
  Note that my suggestion was
to append the ? query string marker, please let me know if this
resolves the issue as your initial symptoms described the issue with
AppendToGatewayUrl exactly.
  
  Also, the problem is that
Flash Remoting (and hence stillFlex's RemoteObject)with ColdFusion
introduced the concept of named arguments. That is, if your CFC is
expecting a Struct as a single argument and you're sending it an
object, then it won't work as the CFC proxy between the gateway
interprets them as "named arguments" and thus looks for parameters to
match each of the keys in the AS Object. Try adding a second, dummy
variable to the CFC function and let me know if this solves the issue.
  
  
  
  
  From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Greg Johnson
  Sent: Thursday, September 29, 2005 8:42 AM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Calls to CFCs
  
  
I will give that the / suggestion a try. As a workaround I switched to
a webservice vs remoteobject and it has no problems and seems to let
the client load faster.
  
But I just commented out the remoteobject so I will try flipping back
and see what happens.
  
Now my biggest problems are I am making a call to a CFC and passing it
a parameter but the CFC is complaining that it wasn't passed. Plus my
debugger for some reason who let me watch variables anymore. I put an
alert in the Flex code just before the CFC call and it shows valid data
in the variable I am sending, but it just doesn't get to the CFC for
some reason. Doing the same exact thing with all the other CFCs and
they work fine :/
  
Peter Farland wrote:
  Actually, it's likely that you're getting an
AppendToGatewayUrl AMF
Response Header from the server because it detected that while a session
was created during the request, the client didn't inform the server
whether it could accept cookies. 

This AMF Response Header is trying to tell the client NetConnection to
decorate its connection URL with some extra info, for example a
jsessionid for Java or a cfid/cftoken for ColdFusion.

You may then be using IIS... In which case it may be barfing on the
semi-colon in something like the jsessionid token, irrespective of
whether you have a ;.

http://cfxtest.research.unc.edu/flashservices/gateway/;jessionid=XYZ123A
BC

I believe CF released a hot fix for this issue, but the work around is
easy... Just add a ? To the gateway URL (or "endpoint" in flex speak) so
that the session information won't annoy IIS.

endpoint="http://cfxtest.research.unc.edu/flashservices/gateway?"


Pete


-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Muzak
Sent: Wednesday, September 28, 2005 11:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Calls to CFCs

A wild guess: try adding a "/" at the end of the gateway url.

endpoint="http://cfxtest.research.unc.edu/flashservices/gateway/"

I've seen USERID and alike being added to the gateway url when making
remote calls.
In that case, without the ending '/', the gateway url gets messed up.

Might not be the case here, but it's the first thing I'd check ;-)

regards,
Muzak

- Original Message -
From: "Greg Johnson" [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 28, 2005 2:28 PM
Subject: Re: [flexcoders] Calls to CFCs


 Here is where the connection is setup in the main file:



 mx:RemoteObject id="mr_cfc"
 endpoint="http://cfxtest.research.unc.edu/flashservices/gateway"
 source="mr.mr_cfc"
 fault="mx.controls.Alert.show(event.fault.faultstring)"
 showBusyCursor="true" 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com

Yahoo! Groups Links









  
  As
a professional in computers, I personaly recommend Avast Antivirus
  avast! Antivirus: Inbound
message clean. 
  Virus
Database (VPS): 0539-1, 09/27/2005
Tested on: 9/29/2005 8:13:54 AM
  avast! - copyright (c) 2000-2004 ALWIL
Software.
  
  


  
  
  -- 
Greg Johnson
Owner  Lead Technician
[EMAIL PROTECTED]

Techno-Fix-It
Filling the Gap Between the Store and the Repair Shop
--

RE: [flexcoders] Calls to CFCs

2005-09-29 Thread Peter Farland





Are you setting remote-objects-debug in flex-config.xml? 
What version of ColdFusion are you using? 

Re: the unsupported type in stream message... are you doing 
anything like the following:

var s:String = new String("foo");
var b:Boolean = 
new Boolean(true);
var n:Number = new 
Number(4);

Unfortunately in AS1/AS2 the Flash Player does not 
recognize the Object form of String, Boolean or Number type for serialization 
purposes so it sends them (yes, oddly) as an unsupported type when serialized as 
AMF which the remoting gateway rejects. If you use the "primitive" forms of 
these types in ActionScript:


var s:String = "foo";
var b:Boolean = 
true;
var n:Number = 4;

It should work 
fine.

Out of curiosity, how 
are you generating the data that is sent to the CFC? Are you loading a web 
service first by any chance and then trying to send that result to a CFC via 
remote object?

Can you post the 
cffunction and accompanying cfargument tags from your CFC method 
that you're invoking? Can you also post the ActionScript line you're using to 
call the RemoteObject abstraction of your CFC?

Thanks,
 
Pete





From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Greg 
JohnsonSent: Thursday, September 29, 2005 11:00 AMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Calls to 
CFCs
Well the problem with it not passing solved itself somehow. 
Debugger still wont let me watch variables though.I tried the ? and 
while it prevented it from hanging, when I go do one search I get a message 
about unsupported type in stream so I just went back to the webservice. 
Even tried diffferent tweeks to the cfc etc and it wouldn't work.Peter 
Farland wrote: 

  
  Note that my suggestion was to append the ? query 
  string marker, please let me know if this resolves the issue as your initial 
  symptoms described the issue with AppendToGatewayUrl 
  exactly.
  
  Also, the problem is that Flash Remoting (and hence 
  stillFlex's RemoteObject)with ColdFusion introduced the concept of 
  named arguments. That is, if your CFC is expecting a Struct as a single 
  argument and you're sending it an object, then it won't work as the CFC proxy 
  between the gateway interprets them as "named arguments" and thus looks for 
  parameters to match each of the keys in the AS Object. Try adding a second, 
  dummy variable to the CFC function and let me know if this solves the 
  issue.
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of Greg JohnsonSent: Thursday, September 29, 2005 
  8:42 AMTo: flexcoders@yahoogroups.comSubject: 
  Re: [flexcoders] Calls to CFCsI will give that the / 
  suggestion a try. As a workaround I switched to a webservice vs 
  remoteobject and it has no problems and seems to let the client load 
  faster.But I just commented out the remoteobject so I will try 
  flipping back and see what happens.Now my biggest problems are I am 
  making a call to a CFC and passing it a parameter but the CFC is complaining 
  that it wasn't passed. Plus my debugger for some reason who let me watch 
  variables anymore. I put an alert in the Flex code just before the CFC 
  call and it shows valid data in the variable I am sending, but it just doesn't 
  get to the CFC for some reason. Doing the same exact thing with all the 
  other CFCs and they work fine :/Peter Farland wrote: 
  Actually, it's likely that you're getting an 
AppendToGatewayUrl AMFResponse Header from the server because it 
detected that while a sessionwas created during the request, the client 
didn't inform the serverwhether it could accept cookies. This 
AMF Response Header is trying to tell the client NetConnection 
todecorate its connection URL with some extra info, for example 
ajsessionid for Java or a cfid/cftoken for ColdFusion.You may 
then be using IIS... In which case it may be barfing on thesemi-colon in 
something like the jsessionid token, irrespective ofwhether you have a 
;.http://cfxtest.research.unc.edu/flashservices/gateway/;jessionid=XYZ123ABCI 
believe CF released a hot fix for this issue, but the work around 
iseasy... Just add a ? To the gateway URL (or "endpoint" in flex speak) 
sothat the session information won't annoy IIS.endpoint="http://cfxtest.research.unc.edu/flashservices/gateway?"Pete-Original 
Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
OnBehalf Of MuzakSent: Wednesday, September 28, 2005 11:22 AMTo: 
flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] Calls to CFCsA wild guess: try adding a "/" at the 
end of the gateway url.endpoint="http://cfxtest.research.unc.edu/flashservices/gateway/"I've 
seen USERID and alike being added to the gateway url when makingremote 
calls.In that case, without the ending '/', the gateway url gets messed 
up.Migh

Re: [flexcoders] Calls to CFCs

2005-09-29 Thread Greg Johnson






I tried to set that once and started getting J-Run errors. We are
running MX7.

I am not exactly doing that. The related code that is run when that
message shows up is below where Person_List is a datagrid, and
otd_tech_after_db is empty at the time of the cfc call

var
otd_tech_after_db:String = new String();
var otd_tech_before_db:String = new String();

function initFunction() {
 MainNavigation.visible=false;
 Selections.visible=false;
 otd_tech_before_db = getToday();
}

function getToday():String {
 var today_date:Date = new Date();
 var date_str:String =
((today_date.getMonth()+1)+"/"+today_date.getDate()+"/"+today_date.getFullYear());
 return date_str;
}

private function getTechSearch():Void { 
  mr_cfc.get_tech_search(otd_tech_before_db, otd_tech_after_db,
getPIDs());
}

private function
getPIDs():Array {
 var SelectionPIDs:Array = new Array();
 for (var i=0; iPerson_List.length; i++) {
  SelectionPIDs[i] = Person_List.dataProvider[i].PERSON_ID;
 }
 return SelectionPIDs;
}

private function
doResultGetTechSearch(result:Array):Void {
 var TempObject:Object = new Object();
 var GetTechSearchArray:Array = new Array();
 for(var i=0; i  result.length; i++){
 TempObject = result[i];
 GetTechSearchArray.push(TempObject);
 }
 OTD_TECH_RESULTS.dataProvider = GetTechSearchArray;
}



Peter Farland wrote:

  
  
  
  Are you setting
remote-objects-debug in flex-config.xml? What
version of ColdFusion are you using? 
  
  Re: the unsupported type in
stream message... are you doing anything like the following:
  
  var s:String = new String("foo");
  var
b:Boolean = new Boolean(true);
  var n:Number = new Number(4);
  
  Unfortunately in AS1/AS2 the
Flash Player does not recognize the Object form of String, Boolean or
Number type for serialization purposes so it sends them (yes, oddly) as
an unsupported type when serialized as AMF which the remoting gateway
rejects. If you use the "primitive" forms of these types in
ActionScript:
  
  
  var s:String = "foo";
  var
b:Boolean = true;
  var n:Number = 4;
  
  It should
work fine.
  
  Out of
curiosity, how are you generating the data that is sent to the CFC? Are
you loading a web service first by any chance and then trying to send
that result to a CFC via remote object?
  
  Can you
post the cffunction and accompanying cfargument tags
from your CFC method that you're invoking? Can you also post the
ActionScript line you're using to call the RemoteObject abstraction of
your CFC?
  
  Thanks,
   Pete
  
  
  
  
  
  
  








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  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.



  










RE: [flexcoders] Calls to CFCs

2005-09-29 Thread Peter Farland





I could probably solve your JRun errors too if you posted 
them... but that aside, I can help you turn on server side tracing for the CFMX 
7 version of the gateway what you need to do is look out for the 
gateway-config.xml file that is specific to the gateway that you're calling. It 
might be under:

/WEB-INF/coldfusion/gateway-config.xml

I believe the servlet that's mapped to /flashservices will 
have an init param in /WEB-INF/web.xml that points you to the location of the 
configuration file that the gateway is using.

Anyway, in this file you'd set the logger to 
debug:

logger level="Debug"(whatever gateway 
logger implementation CF uses would be listed here... I think it was 
coldfusion.flash.ColdFusionLogger if I remember 
correctly)/logger

You should then be able to look at the log to see a dump of 
the AMF traffic that went through the gateway's serializer... this might give 
you a clue as to which parameters are being sent to your CFC 
method.

I think CFMX 7 redirects log info to a flash.log. If you 
started JRun from the command line and wanted to just see this info on the 
console you could always switch to use the DefaultLogger:

logger 
level="Error"flashgateway.log.DefaultLogger/logger


Also, I'd still like to look at the cffunction and 
cfargument tag signatures for your CFC method


In any case, can you try this instead:

var otd_tech_after_db:String = "";var otd_tech_before_db:String = 
"";

If 
it's not that, can you try narrowing down which attribute is causing it in the 
call (i.e. by sending null or something you know is a primitive type or a 
structure that could not possibly contain non-primitive types for the 
aforementioned Boolean, String or Class types... i.e. don't necessarily trust an 
API to return you a primitive until you've tracked down the 
cause)?





From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Greg 
JohnsonSent: Thursday, September 29, 2005 11:22 AMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Calls to 
CFCs
I tried to set that once and started getting J-Run errors. We 
are running MX7.I am not exactly doing that. The related code that 
is run when that message shows up is below where Person_List is a datagrid, and 
otd_tech_after_db is empty at the time of the cfc callvar otd_tech_after_db:String = new 
String();var otd_tech_before_db:String = new String();function 
initFunction() { 
MainNavigation.visible=false; 
Selections.visible=false; otd_tech_before_db = 
getToday();}function getToday():String { var 
today_date:Date = new Date(); var date_str:String = 
((today_date.getMonth()+1)+"/"+today_date.getDate()+"/"+today_date.getFullYear()); 
return date_str;}private function getTechSearch():Void { 
  
mr_cfc.get_tech_search(otd_tech_before_db, otd_tech_after_db, 
getPIDs());}private function getPIDs():Array 
{ var SelectionPIDs:Array = new 
Array(); for (var i=0; iPerson_List.length; i++) 
{  SelectionPIDs[i] = 
Person_List.dataProvider[i].PERSON_ID; 
} return 
SelectionPIDs;}private function 
doResultGetTechSearch(result:Array):Void { var 
TempObject:Object = new Object(); var 
GetTechSearchArray:Array = new Array(); for(var i=0; i 
 result.length; i++){ TempObject = 
result[i]; 
GetTechSearchArray.push(TempObject); 
} OTD_TECH_RESULTS.dataProvider = 
GetTechSearchArray;}Peter Farland 
wrote: 

  
  Are you setting remote-objects-debug in flex-config.xml? 
  What version of ColdFusion are you using? 
  
  Re: the unsupported type in stream message... are you 
  doing anything like the following:
  
  var s:String = new String("foo");
  var b:Boolean = 
  new Boolean(true);
  var n:Number = new 
  Number(4);
  
  Unfortunately in AS1/AS2 the Flash Player does not 
  recognize the Object form of String, Boolean or Number type for serialization 
  purposes so it sends them (yes, oddly) as an unsupported type when serialized 
  as AMF which the remoting gateway rejects. If you use the "primitive" forms of 
  these types in ActionScript:
  
  
  var s:String = "foo";
  var b:Boolean = 
  true;
  var n:Number = 4;
  
  It should work 
  fine.
  
  Out of curiosity, how 
  are you generating the data that is sent to the CFC? Are you loading a web 
  service first by any chance and then trying to send that result to a CFC via 
  remote object?
  
  Can you post the 
  cffunction and accompanying cfargument tags from your CFC 
  method that you're invoking? Can you also post the ActionScript line you're 
  using to call the RemoteObject abstraction of your 
  CFC?
  
  Thanks,
   
  Pete
  
  
  
  
  
  





--
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
  
  
 

RE: [flexcoders] Calls to CFCs

2005-09-29 Thread Peter Farland





Er,that wouldrequire the "Debug" level log 
too...

logger 
level="Debug"flashgateway.log.DefaultLogger/logger

And I should have 
also mentioned that you need to restart JRun if you change any config 
files.






--
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.



  









Re: [flexcoders] Calls to CFCs

2005-09-29 Thread Greg Johnson






Here is the start of the CFC function
 cffunction name="get_tech_search" access="remote"
returntype="array"
  cfargument name="before" type="string"
  cfargument name="after" type="string"
  cfargument name="innovators" type="array"

I tried the change on the variables and nothing.

I then replaced the variables I was sending with '' and in the cfc made
innovators a string vs array and still got the error message.
Peter Farland wrote:

  
  
  
  I could probably solve your JRun
errors too if you posted them... but that aside, I can help you turn on
server side tracing for the CFMX 7 version of the gateway what you
need to do is look out for the gateway-config.xml file that is specific
to the gateway that you're calling. It might be under:
  
  /WEB-INF/coldfusion/gateway-config.xml
  
  I believe the servlet that's
mapped to /flashservices will have an init param in /WEB-INF/web.xml
that points you to the location of the configuration file that the
gateway is using.
  
  Anyway, in this file you'd set
the logger to debug:
  
  logger level="Debug"(whatever
gateway logger implementation CF uses would be listed here... I think
it was coldfusion.flash.ColdFusionLogger if I remember
correctly)/logger
  
  You should then be able to look
at the log to see a dump of the AMF traffic that went through the
gateway's serializer... this might give you a clue as to which
parameters are being sent to your CFC method.
  
  I think CFMX 7 redirects log
info to a flash.log. If you started JRun from the command line and
wanted to just see this info on the console you could always switch to
use the DefaultLogger:
  
  logger
level="Error"flashgateway.log.DefaultLogger/logger
  
  
  Also, I'd still like to look at
the cffunction and cfargument tag signatures for your
CFC method
  
  
  In any case, can you try this
instead:
  
  var otd_tech_after_db:String = "";
var otd_tech_before_db:String = "";
  
  If it's not that, can you try narrowing down
which attribute is causing it in the call (i.e. by sending null or
something you know is a primitive type or a structure that could not
possibly contain non-primitive types for the aforementioned Boolean,
String or Class types... i.e. don't necessarily trust an API to return
you a primitive until you've tracked down the cause)?
  
  
  
  
  
  From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Greg Johnson
  Sent: Thursday, September 29, 2005 11:22 AM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Calls to CFCs
  
  
I tried to set that once and started getting J-Run errors. We are
running MX7.
  
I am not exactly doing that. The related code that is run when that
message shows up is below where Person_List is a datagrid, and
otd_tech_after_db is empty at the time of the cfc call
  
  var
otd_tech_after_db:String = new String();
var otd_tech_before_db:String = new String();
  
function initFunction() {
 MainNavigation.visible=false;
 Selections.visible=false;
 otd_tech_before_db = getToday();
}
  
function getToday():String {
 var today_date:Date = new Date();
 var date_str:String =
((today_date.getMonth()+1)+"/"+today_date.getDate()+"/"+today_date.getFullYear());
 return date_str;
}
  
private function getTechSearch():Void { 
  mr_cfc.get_tech_search(otd_tech_before_db, otd_tech_after_db,
getPIDs());
}
  
  private function
getPIDs():Array {
 var SelectionPIDs:Array = new Array();
 for (var i=0; iPerson_List.length; i++) {
  SelectionPIDs[i] = Person_List.dataProvider[i].PERSON_ID;
 }
 return SelectionPIDs;
}
  
  private function
doResultGetTechSearch(result:Array):Void {
 var TempObject:Object = new Object();
 var GetTechSearchArray:Array = new Array();
 for(var i=0; i  result.length; i++){
 TempObject = result[i];
 GetTechSearchArray.push(TempObject);
 }
 OTD_TECH_RESULTS.dataProvider = GetTechSearchArray;
}
  
  
  
Peter Farland wrote:
  

Are you setting
remote-objects-debug in flex-config.xml? What
version of ColdFusion are you using? 

Re: the unsupported type in
stream message... are you doing anything like the following:

var s:String = new
String("foo");
var
b:Boolean = new Boolean(true);
var n:Number = new Number(4);

Unfortunately in AS1/AS2 the
Flash Player does not recognize the Object form of String, Boolean or
Number type for serialization purposes so it sends them (yes, oddly) as
an unsupported type when serialized as AMF which the remoting gateway
rejects. If you use the "primitive" forms of these types in
ActionScript:


var s:String = "foo";
var
b:Boolean = true;
var n:Number = 4;

It should
work fine.

Out of
curiosity, how are you generating the data that is sent to the CFC? Are
you loading a web service first by any chance and then tryin

RE: [flexcoders] Calls to CFCs

2005-09-29 Thread dfatta
Title: Message





I 
wrote a blurb on how to integrate Flex and CFCs. It might be of some 
help.

http://www.cflex.net/showfiledetails.cfm?ObjectID=303

Darius

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Greg JohnsonSent: Thursday, September 29, 2005 9:35 
  AMTo: flexcoders@yahoogroups.comSubject: Re: 
  [flexcoders] Calls to CFCsHere is the start of the CFC 
  function cffunction name="get_tech_search" 
  access="remote" returntype="array" 
   cfargument name="before" 
  type="string"  cfargument 
  name="after" type="string"  
  cfargument name="innovators" type="array"I tried the change on 
  the variables and nothing.I then replaced the variables I was sending 
  with '' and in the cfc made innovators a string vs array and still got the 
  error message.Peter Farland wrote: 
  

I could probably solve your JRun errors too if you 
posted them... but that aside, I can help you turn on server side tracing 
for the CFMX 7 version of the gateway what you need to do is look out 
for the gateway-config.xml file that is specific to the gateway that you're 
calling. It might be under:

/WEB-INF/coldfusion/gateway-config.xml

I believe the servlet that's mapped to /flashservices 
will have an init param in /WEB-INF/web.xml that points you to the location 
of the configuration file that the gateway is using.

Anyway, in this file you'd set the logger to 
debug:

logger level="Debug"(whatever gateway 
logger implementation CF uses would be listed here... I think it was 
coldfusion.flash.ColdFusionLogger if I remember 
correctly)/logger

You should then be able to look at the log to see a 
dump of the AMF traffic that went through the gateway's serializer... this 
might give you a clue as to which parameters are being sent to your CFC 
method.

I think CFMX 7 redirects log info to a flash.log. If 
you started JRun from the command line and wanted to just see this info on 
the console you could always switch to use the 
DefaultLogger:

logger 
level="Error"flashgateway.log.DefaultLogger/logger


Also, I'd still like to look at the cffunction 
and cfargument tag signatures for your CFC 
method


In any case, can you try this 
instead:

var otd_tech_after_db:String = "";var 
otd_tech_before_db:String = "";

If 
it's not that, can you try narrowing down which attribute is causing it in 
the call (i.e. by sending null or something you know is a primitive type or 
a structure that could not possibly contain non-primitive types for the 
aforementioned Boolean, String or Class types... i.e. don't necessarily 
trust an API to return you a primitive until you've tracked down the 
cause)?





From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of Greg JohnsonSent: Thursday, September 29, 
2005 11:22 AMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] Calls to CFCsI tried to set that once 
and started getting J-Run errors. We are running MX7.I am not 
exactly doing that. The related code that is run when that message 
shows up is below where Person_List is a datagrid, and otd_tech_after_db is 
empty at the time of the cfc callvar otd_tech_after_db:String = new 
String();var otd_tech_before_db:String = new String();function 
initFunction() { 
MainNavigation.visible=false; 
Selections.visible=false; otd_tech_before_db = 
getToday();}function getToday():String { 
var today_date:Date = new Date(); var date_str:String 
= 
((today_date.getMonth()+1)+"/"+today_date.getDate()+"/"+today_date.getFullYear()); 
return date_str;}private function getTechSearch():Void { 
  
mr_cfc.get_tech_search(otd_tech_before_db, otd_tech_after_db, 
getPIDs());}private function getPIDs():Array 
{ var SelectionPIDs:Array = new 
Array(); for (var i=0; iPerson_List.length; 
i++) {  SelectionPIDs[i] = 
Person_List.dataProvider[i].PERSON_ID; 
} return 
SelectionPIDs;}private function 
doResultGetTechSearch(result:Array):Void { var 
TempObject:Object = new Object(); var 
GetTechSearchArray:Array = new Array(); for(var i=0; i 
 result.length; i++){ TempObject = 
result[i]; 
GetTechSearchArray.push(TempObject); 
} OTD_TECH_RESULTS.dataProvider = 
GetTechSearchArray;}Peter Farland 
wrote: 

  
  Are you setting remote-objects-debug in 
  flex-config.xml? What version of ColdFusion are you using? 
  
  
  Re: the unsupported type in stream message... are you 
  doing anything like the following:
  
  var s:String = new String("foo");
  var 
  b:Boolean = new Boolean(true);
  var n:Number = new 
  Number(4);
  
  Unfortunately 

Re: [flexcoders] Calls to CFCs

2005-09-28 Thread David Harris
There are a couple of ways I have used to debug calls to CFCs...

Create a CFM template and call the methods on the CFC the same way you
want your Flex app to. This will let you know if it is the CFC having
a problem.

When you call the method, dump out and write the dump to file using
cfsavecontent
This way you can see what CF is getting from the Flex app.

May be usefull to see your calling Flex code to give us an idea of how
you are calling the cfc.

On 9/28/05, Greg Johnson [EMAIL PROTECTED] wrote:
  We are currently running the dev/demo copy of flex to see if it will do
  what we need.  Thing is we have ran into a strange bug.

  The code makes a call to a CFC and gets back data fine the first time,
  but the second time we make a call it just gets hung up.  Yet I don't
  run into the problem when I am on the server itself.  Any ideas? or
  questions? :)

  --
  Greg Johnson
  Owner  Lead Technician
  [EMAIL PROTECTED]

  Techno-Fix-It
  Filling the Gap Between the Store and the Repair Shop
  --
  www.technofixit.com
  Phone:(919)-371-1476
  Fax:(919)-882-9804
  P.O. Box 1094
  Morrisville, N.C. 27560



  --
  Flexcoders Mailing List
  FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com



  
  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.

  



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Calls to CFCs

2005-09-28 Thread Muzak
A wild guess: try adding a / at the end of the gateway url.

endpoint=http://cfxtest.research.unc.edu/flashservices/gateway/;

I've seen USERID and alike being added to the gateway url when making remote 
calls.
In that case, without the ending '/', the gateway url gets messed up.

Might not be the case here, but it's the first thing I'd check ;-)

regards,
Muzak

- Original Message - 
From: Greg Johnson [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 28, 2005 2:28 PM
Subject: Re: [flexcoders] Calls to CFCs


 Here is where the connection is setup in the main file:
 

 mx:RemoteObject id=mr_cfc
 endpoint=http://cfxtest.research.unc.edu/flashservices/gateway;
 source=mr.mr_cfc
 fault=mx.controls.Alert.show(event.fault.faultstring)
 showBusyCursor=true 




 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Calls to CFCs

2005-09-28 Thread Peter Farland
Actually, it's likely that you're getting an AppendToGatewayUrl AMF
Response Header from the server because it detected that while a session
was created during the request, the client didn't inform the server
whether it could accept cookies. 

This AMF Response Header is trying to tell the client NetConnection to
decorate its connection URL with some extra info, for example a
jsessionid for Java or a cfid/cftoken for ColdFusion.

You may then be using IIS... In which case it may be barfing on the
semi-colon in something like the jsessionid token, irrespective of
whether you have a ;.
 
http://cfxtest.research.unc.edu/flashservices/gateway/;jessionid=XYZ123A
BC

I believe CF released a hot fix for this issue, but the work around is
easy... Just add a ? To the gateway URL (or endpoint in flex speak) so
that the session information won't annoy IIS.

endpoint=http://cfxtest.research.unc.edu/flashservices/gateway?;


Pete


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: Wednesday, September 28, 2005 11:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Calls to CFCs

A wild guess: try adding a / at the end of the gateway url.

endpoint=http://cfxtest.research.unc.edu/flashservices/gateway/;

I've seen USERID and alike being added to the gateway url when making
remote calls.
In that case, without the ending '/', the gateway url gets messed up.

Might not be the case here, but it's the first thing I'd check ;-)

regards,
Muzak

- Original Message -
From: Greg Johnson [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 28, 2005 2:28 PM
Subject: Re: [flexcoders] Calls to CFCs


 Here is where the connection is setup in the main file:



 mx:RemoteObject id=mr_cfc
 endpoint=http://cfxtest.research.unc.edu/flashservices/gateway;
 source=mr.mr_cfc
 fault=mx.controls.Alert.show(event.fault.faultstring)
 showBusyCursor=true 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Calls to CFCs

2005-09-28 Thread David Harris
Did you test every thing from the CFC side of things to?
Making sure the CFC is getting the correct arguments?

I would put some code like this at the beginning of your function in the CFC...

{all cfarguments and vared variables here}

cfset var myArgs = 
cfsavecontent variable=myArgs
cfdump var=arguments
/cfsavecontent
cffile action=write file=c:\flexTest_#getTickCount#.html output=#myArgs#

{rest of function here}

This will let you know if the function is being called the same way
both times

Your code looks OK at first look BTW.
I am presuming the CFFunction is returning a Query?

A way to see what you get back is
in the doResultGetTechEvents function

for(var i in result){
trace(i =  + i);
for(var o in result[i]){
trace(o =  + o +  :: result[i][o] =  + result[i][o]);
}
}


About now I can hear the question I asked when I first started with
flex (about 4 months ago...) How do you see the trace statement
results?
You can down load a version of flashplayer that writes the traces to a
file called flashlog.txt
The MM site has instructions on this...
you can then see what the Flex app is getting back...

HTH

On 9/29/05, Muzak [EMAIL PROTECTED] wrote:
  A wild guess: try adding a / at the end of the gateway url.

 endpoint=http://cfxtest.research.unc.edu/flashservices/gateway/;

  I've seen USERID and alike being added to the gateway url when making
 remote calls.
  In that case, without the ending '/', the gateway url gets messed up.

  Might not be the case here, but it's the first thing I'd check ;-)

  regards,
  Muzak

  - Original Message -
  From: Greg Johnson [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Wednesday, September 28, 2005 2:28 PM
  Subject: Re: [flexcoders] Calls to CFCs


   Here is where the connection is setup in the main file:
  
 
  
   mx:RemoteObject id=mr_cfc
  
 endpoint=http://cfxtest.research.unc.edu/flashservices/gateway;
   source=mr.mr_cfc
   fault=mx.controls.Alert.show(event.fault.faultstring)
   showBusyCursor=true 




  --
  Flexcoders Mailing List
  FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com



  
  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.

  



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/