1
votes

We've configured our Flex client to have two channels for calling our services via BlazeDS.

One channel is configured to use AMFChannel and the other for HTTPChannel. Here's the services-config.xml

          <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/data/messagebroker/amf"
        class="flex.messaging.endpoints.AMFEndpoint" />
            <properties>
               <polling-enabled>false</polling-enabled>
            </properties>
         </channel-definition>
         <channel-definition id="my-amfx" class="mx.messaging.channels.HTTPChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/data/messagebroker/amfx"
        class="flex.messaging.endpoints.HTTPEndpoint" />
            <properties>
               <polling-enabled>false</polling-enabled>
            </properties>
         </channel-definition>

Our flex client is written to use either AMF or AMFX depending on how we configure it. The problem is that although the client can switch between channels it sends an AMF binary payload when attempting to call services via AMFX (expecting XML). The funny thing is that we can write services-config.xml to use either AMF or AMFX individually but Flex doesn't seem to want to let us use both. Is this a bug in Flex? If not how can we get it to use the correct protocol?

1
Can you share your flex code which is changing the channels/ sending data? - Cornel Creanga
Did you solve this problem? I am looking at the same configuration and am hoping to avoid this issue. - HDave
I never found a resolution to this issue. We really just wanted to enable both channels so that we could use the same build for both our performance and regression testing. The Flex client was to use AMF and JMeter would hit our services with AMFX. But in the end we didn't need to do this because we ended up extending JMeter (by using the java BlazeDS libraries) to be able to serialize and deserialize AMF data for out performance tests. - Fergal

1 Answers

1
votes

This seems to be a limitation of Flex

It has been my anecdotal experience that Flex clients can use one and only one channel on a server. It's not just an AMF/XML limitation but also applies to streaming versus polling channels.