0 Replies Latest reply on Sep 3, 2008 8:10 AM by alewin77

    HTTPService Struts Data Loading Issue

    alewin77
      Hello,

      I am currently refactoring a Struts Java Application to use a Flex front end. I am using the betwixt API to pass Java Beans into an XML data stream. This part is working fine.I am calling the struts action using the HTTPService object. The problem occurs when I send only 1..8 beans in the XML document, the data does not load. If I send 9..n beans in the XML document all of the data Loads. Has anyone faced this problem when interfacing with Java.

      HTTPService:

      <mx:HTTPService id="sitesService" fault="faultHandler(event)" result="setDataSet(event)" showBusyCursor="true" url="/taskscheduling/menu/doMenuLinks.do" resultFormat="e4x" >
      <mx:request>
      <returnXML>true</returnXML>
      <operation>sites</operation>
      </mx:request>
      </mx:HTTPService>

      DataBinding:

      <mx:DataGrid id="sitesTable" dataProvider="{_sitesData}" rowCount="{_sitesData.length + 1}" top="46" right="10" bottom="10" left="10" variableRowHeight="true">
      <mx:columns>
      <mx:DataGridColumn dataField="id" visible="false"/>
      <mx:DataGridColumn headerText="Site Name" dataField="name"/>
      <mx:DataGridColumn headerText="Site Reference" dataField="siteReference"/>
      <mx:DataGridColumn headerText="Post Code" dataField="addressPostCode"/>
      </mx:columns>
      </mx:DataGrid>

      Data processing:

      private function setDataSet(result:ResultEvent):void
      {
      if (sitesDataXMLList!=null && sitesDataXMLList.length>0){
      sitesData = sitesDataXMLList;
      beanType = "VieUsersSites";
      } else if (sitesDataTaXMLList!=null && sitesDataTaXMLList.length>0){
      sitesData = sitesDataTaXMLList;
      beanType = "VieTaUsersSites";
      }
      _sitesData = sitesData;
      }