0 Replies Latest reply on Mar 17, 2007 4:56 PM by Ottawaien

    HTTPService problem : I can call only once my service running on Tomcat !!


      I am having a weird problem using HTTPService.
      I am hitting a service built using Spring (it is a Spring controller running in Tomcat).
      When I launch my flex application, and hit my button I see a trace on the server side. But the second time it does not work.
      I noticed later, that if I wait like 20 minutes, and hit the button again, the request get to my server and I can see the trace !
      Is there something I have to do on the client side to reset a configuration parameter that I might have missed ?

      I am putting my example that you can see what I am doing :

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initVars()" layout="absolute">
      //import mx.rpc.http.HTTPService;
      import mx.controls.Alert;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;

      public var myLoader:URLLoader;
      public var counter:Number = 1;

      public var selectedNode:XML;
      public var message:String;
      public var treeModel:XML=
      <node label="Mail Box">
      <node label="Inbox">
      <node label="Marketing"/>
      <node label="Product Management"/>
      <node label="Personal"/>
      <node label="Outbox">
      <node label="Professional"/>
      <node label="Personal"/>
      <node label="Spam"/>
      <node label="Sent"/>

      private function initVars():void {


      // Event handler for the Tree control change event.
      public function treeChanged(event:Event):void {
      selectedNode=Tree(event.target).selectedItem as XML;

      public function onClick2():void


      public function onClick():void

      public function httpResultHandler(event:ResultEvent):void
      Alert.show("Message", counter.toString());

      public function httpFaultHandler(event:FaultEvent):void
      Alert.show(event.fault.message, "Fault Message .....");


      url=" http://localhost:8080/eval/start.do"
      useProxy="false" />

      url=" http://localhost:8080/eval/start2.do"
      useProxy="false" />

      <mx:Panel title="Class Management" height="75%" width="775"
      paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
      <mx:MenuBar width="398" id="myMenuBar" labelField="@label">
      <menuitem label="New Course" >
      <menuitem label="New Class"/>


      <mx:HDividedBox width="100%" height="100%">
      <mx:Tree id="myTree" width="401" height="100%" labelField="@label"
      showRoot="false" dataProvider="{treeModel}" change="treeChanged(event)"/>
      <mx:ViewStack id="viewstack1" width="200" height="235">
      <mx:Canvas label="MainView" width="337" height="100%">
      <mx:Button x="98" y="30" label="Get Query String" click="onClick()"/>
      <mx:Label x="101.5" y="60" width="121" id="myLabel"/>
      <mx:Button x="115" y="175" label="Start 2" click="onClick2()"/>
      <mx:Canvas label="NewClassView" width="100%" height="100%">
      <mx:Canvas label="NewCourseView" width="100%" height="100%">



      Thanks a lot for your help,