You mentioned you're contacting ColdFusion, did you forget to include <instantiate-types>false</instantiate-types> in your <channel-definition> properties?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darron J. Schall
Sent: Tuesday, October 24, 2006 3:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem sending AMF data to ColdFusion over SSL

Hi,

I'm running into an interesting situation that leaves me scratching my
head. I've tried a few things that I could think of, but can't seem to
come up with a solution, and there doesn't seem to be any help in the
archives or on google.

Here's the situation: I'm sending [RemoteClass]'d objects from Flex to
ColdFusion, mapping ActionScript classes to ColdFusion components. I'm
using the same Flex application to connect to both Flex Data Services
and ColdFusion, so I'm defining the channel for the ColdFusion
RemoteObject at runtime. The ActionScript code looks like this:

var channels:ChannelSet = new ChannelSet();
var customChannel:SecureAMFChannel = new SecureAMFChannel(
"cf-secure-amf",
"https://{server.name}{context.root}/flex2gateway/secureamf" );
channels.addChannel( customChannel );
theRemoteObject.channelSet = channels;

The error I get when sending a typed object over (one that is
[RemoteClass]'d) is:

[RPC Fault faultString="Cannot create class of type 'package.to.my.VO'."
faultCode="Client.Message.Encoding" faultDetail="Type 'package.to.my.VO'
not found."]
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractInvoker.as:193]
at
mx.rpc::Responder/fault()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:56]
at
mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest.as:107]
at
NetConnectionChannel.as$31::NetConnectionMessageResponder/NetConnectionChannel.as$31:NetConnectionMessageResponder::statusHandler()[C:\dev\enterprise_bali\frameworks\mx\messaging\channels\NetConnectionChannel.as:463]
at
mx.messaging::MessageResponder/status()[C:\dev\enterprise_bali\frameworks\mx\messaging\MessageResponder.as:225]

This is something that just broke when we switched over to SSL. When
we're using just a regular AMFChannel, everything works just fine.. the
error only happens over SSL when we changed customChannel to
SecureAMFChannel.

Interestingly, the exception that shows up in the console log has
flex.messaging.endpoints.AMFEndpoint in the stacktrace. I would've
expected this to be flex.messaging.endpoints.SecureAMFEndpoint instead..
so my thinking is that the problem lies therein. I've doubled checked
the services-config.xml in the cfusion.war and made sure that the
ColdFusion destination uses the cf-secure-amf channel. The
cf-secure-amf channel definition in the XML file is this (though, it
shouldn't really since the channel is being set in ActionScript):

<channel-definition id="cf-secure-amf"
class="mx.messaging.channels.SecureAMFChannel">
<endpoint
uri="https://{server.name}{context.root}/flex2gateway/secureamf"
class="flex.messaging.endpoints.SecureAMFEndpoint"/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition>

I can receive typed objects from ColdFusion just fine over SSL, I just
can't send them. Any ideas? Has anyone else run into this? Why would
AMFEndpoint be in the stacktrace and not SecureAMFEndpoint? .. bug?

Thanks,

-d

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to