1 Reply Latest reply on Sep 2, 2009 8:10 PM by wissky

    consumer subscribe failure. reason:type is text/html?


      In the data push sample "feed", every thing is ok. I copy the source to my own project, but I couldn't work.


      In the sample project, when I click the <Subscribe to 'feed' destionation> button, I catch the Http content, and the type is like this:



      But to my own projectm, when I click the <Subscribe to 'feed' destionation> button,the Http type is like this:



      I think the difference is the reason of this problem.


      Source is very simple. Like this:

      ------------------------------------------------------------------------------------------ -----------------------------------------------------------------

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
                  import mx.messaging.messages.IMessage;
                  private function messageHandler(message:IMessage):void
                      pushedValue.text = ""+ message.body;   
          <mx:Consumer id="consumer" destination="feed" message="messageHandler(event.message)"/>
          <mx:Button label="Subscribe to 'feed' destination" click="consumer.subscribe()" enabled="{!consumer.subscribed}"/>
          <mx:Button label="Unsubscribe from 'feed' destination" click="consumer.unsubscribe()" enabled="{consumer.subscribed}"/>
          <mx:TextInput id="pushedValue"/>

      ----------------------------------------------------------------------------------------- ------------------------------------------------------------------