Question
CF8 - Flex-3 remoteObject configuration
I am sure I have done this right but nothing I do seems to
work...
I get an error asking for a <gatewayid>. Not sure where I need to apply that and I have never seen any reference to it in any example code. If I pull the <gatewayid> out of the config file then LCDS won't start because "COLDFUSION... Don't know where to send messages"
The error is;
faultCode:Server.Processing
faultString:'Message header 'gatewayid' required in message when sending to destination 'ColdFusion''
faultDetail:'null'
I am running this on a LINUX system (blackmagic), CF-8 is located @/opt/coldfusion8/
My CFC is the standard Hello World cfc and I have it @ /opt/coldfusion8/wwwroot/CFC/hw.cfc
Any ideas will be greatly appreciated.
The FLEX script looks like;
<mx:RemoteObject id="helloWorld"
destination="ColdFusion"
source="CFC.hw"
fault="faultHandler(event)"
endpoint=" http://blackmagic/flex2gateway/"
>
<mx:method name="GetHello" result="GetHello_handler(event)" fault="faultHandler(event)" />
</mx:RemoteObject>
services-config.xml (abbreviated) looks like;
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="messaging-config.xml" />
</services>
<security>
<login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
</security>
<channels>
<channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
<endpoint uri=" http://{server.name}:{server.port}{context.root}/flex2gateway"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
</channels>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Error">
<properties>
<prefix>[Flex] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
<pattern>Message.*</pattern>
</filters>
</target>
</logging>
<system>
<manageable>false</manageable>
<!--
<redeploy>
<enabled>true</enabled>
<watch-interval>20</watch-interval>
<watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
<touch-file>{context.root}/WEB-INF/web.xml</touch-file>
</redeploy>
-->
</system>
</services-config>
Messaging-config.xml looks like::
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
<adapter-definition id="cfgateway" class="coldfusion.flex.CFEventGatewayAdapter" />
</adapters>
<destination id="ColdFusion">
<adapter ref="cfgateway" />
<properties>
<gatewayid>*</gatewayid>
</properties>
<channels>
<!-- <channel ref="cf-rtmp" /> -->
<channel ref="my-cfamf" />
</channels>
</destination>
</service>
I get an error asking for a <gatewayid>. Not sure where I need to apply that and I have never seen any reference to it in any example code. If I pull the <gatewayid> out of the config file then LCDS won't start because "COLDFUSION... Don't know where to send messages"
The error is;
faultCode:Server.Processing
faultString:'Message header 'gatewayid' required in message when sending to destination 'ColdFusion''
faultDetail:'null'
I am running this on a LINUX system (blackmagic), CF-8 is located @/opt/coldfusion8/
My CFC is the standard Hello World cfc and I have it @ /opt/coldfusion8/wwwroot/CFC/hw.cfc
Any ideas will be greatly appreciated.
The FLEX script looks like;
<mx:RemoteObject id="helloWorld"
destination="ColdFusion"
source="CFC.hw"
fault="faultHandler(event)"
endpoint=" http://blackmagic/flex2gateway/"
>
<mx:method name="GetHello" result="GetHello_handler(event)" fault="faultHandler(event)" />
</mx:RemoteObject>
services-config.xml (abbreviated) looks like;
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="messaging-config.xml" />
</services>
<security>
<login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
</security>
<channels>
<channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
<endpoint uri=" http://{server.name}:{server.port}{context.root}/flex2gateway"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
</channels>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Error">
<properties>
<prefix>[Flex] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
<pattern>Message.*</pattern>
</filters>
</target>
</logging>
<system>
<manageable>false</manageable>
<!--
<redeploy>
<enabled>true</enabled>
<watch-interval>20</watch-interval>
<watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
<touch-file>{context.root}/WEB-INF/web.xml</touch-file>
</redeploy>
-->
</system>
</services-config>
Messaging-config.xml looks like::
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
<adapter-definition id="cfgateway" class="coldfusion.flex.CFEventGatewayAdapter" />
</adapters>
<destination id="ColdFusion">
<adapter ref="cfgateway" />
<properties>
<gatewayid>*</gatewayid>
</properties>
<channels>
<!-- <channel ref="cf-rtmp" /> -->
<channel ref="my-cfamf" />
</channels>
</destination>
</service>