Some more detailed information on this  - the issue is that the IIS connector doesn't handle the ;jsessionid token in URLs unless it appears after the query string. The J2EE servlet spec does not specify that this token has to appear after the ? symbol and thus many other app servers handle it just fine. How this arises in the first place for remoting requests is that the CF bridge to the Flash Remoting gateway asks the servlet response to encode the URL and checks to see if it was decorated with a ;jsessionid token (it would do so if it thought the client couldn't handle cookies). e.g. http://www.yourserver.com/yourapp/flashservices/gateway;jsessionid=XXXX
 
If the encoded URL did include a ;jessionid then an AMF response header is sent back to the NetServices client to tell it to append the ;jsessionid token to the gateway URL on the next request. You can see this AppendToGatewayUrl response header in the NCD.


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Theodore E Patrick
Sent: Thursday, May 19, 2005 7:58 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Web Services and CF7

Dave,

 

Awesome, thanks for these! I completely forgot to check Ben’s blog. These are invaluable.

 

10 Points to Dave!

 

Thanks,

 

Ted ;)

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dave buhler
Sent: Thursday, May 19, 2005 2:20 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Web Services and CF7

 

from: http://forta.com/blog/index.cfm?mode=c&catid=11

 

Using Flash Remoting With CFMX7? Watch Out For This One
I mentioned this in a comment on a prior post , but it is important enough to warrant its own mention. If you are using Flash Remoting to access ColdFusion code, you may run into an issue in which ColdFusion could construct an invalid URL when appending a jsessionid. If this occurs the web server via which you are accessing your code could throw errors. The solution is simply, just add a ? To the end of the gateway URL, change /flashservices/gateway to /flashservices/gateway?, doing so ensures that the URL will be created correctly. This issue was discovered by our tech support folks, and I believe they'll be posting a TechNote on it shortly.





CFC Results Via AMF And Case Inconsistencies

I just spent a long time troubleshooting a Flex ColdFusion connectivity issue, and now that we've figured out what was going on I am sharing this in case it bites anyone else.

There are two basic ways for Flex to invoke back-end ColdFusion CFCs, SOAP (Web Services) or AMF (Flash Remoting). My app had been using SOAP, but I needed to convert to AMF (the performance difference is significant).

Last year Brandon Purcell wrote an excellent blog entry entitled Switching between webservices and Flash Remoting using Flex , and so I used his steps to make the switch. As he notes in that entry, ColdFusion variables returned via SOAP have their names converted to uppercase, whereas variables returned via AMF retain their original case, and so any binding code (or Flex code referencing returned data) needs to be converted from all caps to actual case.

The converted code worked perfectly for CFC methods returning queries, they ran exactly as they did before, just a whole lot quicker. But my CFC methods returning structures all failed, none of my bindings and client-side code worked.

The problem? Waldo Smeets figured this one out, unlike returned queries, returned structure members are all caps, even when using AMF. This is horribly inconsistent, and hopefully it'll be fixed in the future. For now, keep this in mind.



Yahoo! Groups Links

Reply via email to