2 Replies Latest reply on Aug 20, 2010 5:46 PM by miguel8312

    chat application with .net webservice help please.

    miguel8312 Level 3

      Hope someone else has done this in the past. i have been added for a few days but just cant seem to bring it home.

      i have flex app that calls a webservice for a chat app everything worlks fine. until like 64 and greater messages then i get this nasty error

       

      [FaultEvent fault=[RPC Fault faultString="SOAP Response cannot be decoded. Raw response: " faultCode="DecodingError" faultDetail="null"] messageId="DB7E4D18-C7CA-5C67-DE86-8E1A9229654C" type="fault" bubbles=false cancelable=true eventPhase=2]

       

      I dont know what its going on???  the flex app continues to look for updates every minute but it appears to me that this is just happening after 64 messages. Is there something extra I should be looking at?

       

      here is my flex code

      <?xml version="1.0" encoding="utf-8"?>
      
      <mx:Application
      
       xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"
      
      >
      
      
      
      
      <mx:Script>
      
                <![CDATA[
      
      import mx.collections.ArrayCollection;
      
      import mx.controls.Alert;
      
      import mx.rpc.Fault;
      
      import mx.rpc.events.FaultEvent;
      
      import mx.rpc.events.ResultEvent;
                     [
      
      Bindable]
      
      
      public var dispArray: ArrayCollection = new ArrayCollection();
      
      
      
      public function sendmessage():void
                     {
      
      
                     ws.chatmessage(mess.text,user.text);
      
      
      
                     }
      
      
      
      private function requestMessages( event:Event = null ) : void {                    ws.todatemessages();
                          ws.addEventListener(ResultEvent.RESULT,getresults);
      
                     }
      
      
      
      
      public function getresults(event:ResultEvent):void
                     {
      
      
                     dispArray = event.result 
      as ArrayCollection;
      
      
      
      
      var t:Timer = new Timer( 1000, 1 );               t.addEventListener(TimerEvent.TIMER, requestMessages );
                     t.start();     
      
      
      
      var storeItemForUpdate:Object = dispgrid.selectedItem;;
      
      var vScroll:int = dispgrid.verticalScrollPosition;               dispgrid.dataProvider = dispArray;
                     dispgrid.validateNow();
                     dispgrid.verticalScrollPosition = vScroll;
                     dispgrid.selectedItem = storeItemForUpdate;
      
      
      
                     }
      
      
      
      private function messageKeyUp(event:KeyboardEvent ) : void
                     {
      
      if ( event.keyCode == Keyboard.ENTER )
                               sendmessage();
      
                     }
      
      
      
      
      private function getfault(event:FaultEvent):void
                     {
      
                          Alert.show(event.toString());
      
                     }
      
      
      
      
                ]]>
      
      </mx:Script>
      
      
      
      <mx:WebService id="ws" wsdl="http://localhost/WebSite/chatapp/Service.asmx?WSDL" fault="getfault(event)">
      
      
      <mx:operation result="getresults(event)"                       name="
      
      chatmessage" 
                            resultFormat="
      
      object"/> 
      
      <mx:operation result="getresults(event)"     
                            name="
      
      todatemessages"                      resultFormat="
      
      object"/>
      
      
      
      
      
      </mx:WebService>
      
      
      <mx:DataGrid id="dispgrid" x="433" y="39" width="260" height="400" resizableColumns="true" >
      
      
      <mx:columns>
      
      
      <mx:DataGridColumn headerText="message" dataField="fwchat_message"/>
      
      
      <mx:DataGridColumn headerText="user" dataField="fwchat_user"/>
      
      
      </mx:columns>
      
      
      </mx:DataGrid>
      
      
      <mx:TextInput id="user"   x="208" y="253" width="180"/>
      
      
      <mx:Label x="137" y="255" text="User-name"/>
      
      
      <mx:TextInput  id="mess" keyUp="messageKeyUp(event)" x="208" y="283" height="44" width="198"/>
      
      
      <mx:Label x="137" y="285" text="Message"/>
      
      
      <mx:Button label="send Message" click="sendmessage()"  x="208" y="348"/>
      
      
      </mx:Application>
      
      
      
      
      


      its pretty straight forward i cant figuered out for the life of me if there is something in addition that i should be looking at? any help would be greatly appreciated.