5 Replies Latest reply on Jul 11, 2008 8:05 AM by Culme

    HttpService problem

    RBKB
      Hi,

      I am trying to call a url by using HTTPService. Hitting this url & passing two parameters, starts/stops a service.

      This is working fine when I try to do it locally. But when I put it on the server it does not work at all. It worked yesterday 1-2 times but after that it does not work. I have to embed the .swf file in a <object> tag and provide the name of .swf file in <param name> tag.

      Would this be a proxy caching problem?

      I have used "POST" method and also set some dummyparameter in the url to be "dummyPara="+new Date().time, but still does not work. Also as shown below the header has Cache-Control:no-cache set. But still does not work.

      Can somebody suggest me how to solve this?

      The header returned by the url is :

      HTTP/1.1 200 OK
      Date: Fri, 11 Jul 2008 10:32:59 GMT
      Server: Microsoft-IIS/6.0
      X-Powered-By: ASP.NET
      X-AspNet-Version: 2.0.50727
      Cache-Control: no-cache
      Pragma: no-cache
      Expires: -1
      Content-Type: text/html; charset=utf-8
      Content-Length: 261
        • 1. Re: HttpService problem
          Culme Level 1
          You're using an HTTPService to call a web service, passing a few parameters - right?

          What is the content of the result you're getting back? I mean, apart from the headers?
          I guess you have a handler for when the service returns it's results?
          What do you get if you try something like:

          myResultHandler(e:ResultEvent):void{
          trace(e.result);
          }

          The "result" could contain hints on what went wrong, couldn't it..?

          hth / Culme
          • 2. Re: HttpService problem
            RBKB Level 1
            Thanks Culme for mentioning this.
            The result is in the form of html & has a head with string saying "service called" & an empty body part.

            I am also using TCP tunnel monitor to see the messages being sent and received. In this monitor I am able to see the header described in my previous message and the head & body elements.

            But when I debug and see in the resulthandler the event.headers are empty & has head & body as described above.Why are the headers empty? eventhough I am able to see it in the tcp tunnel?
            • 3. Re: HttpService problem
              Culme Level 1
              RBKB,
              Perhaps I'm just messing this up for you since I'm not sure I really get what the problem is. ;-/
              Am I right in assuming that the problem isn't so much what is being returned by the web service, but rather the fact that the service itself doesn't perform the job that it is supposed to?
              Or were you expecting something particular in return by the web service?
              • 4. Re: HttpService problem
                RBKB Level 1
                Culme,

                The problem is the HttpService call is not being made. On my local machine, whenever I click a button the httpService makes a call to the url and webservice works fine. But when I deploy it on server the HttpService call is not being made. Rarely it makes one call and then does not make any calls. eg. On server when I click the button 1st time, the httpService call to url is made and webservice works fine. But when I click the button again the httpService call is never made.

                Found below post and will try the suggested solutions and will see:
                http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1373904&highlight_key=y&keyword1=header

                Let me know if you have any suggestions.

                • 5. Re: HttpService problem
                  Culme Level 1
                  Oh, well then I was indeed not seeing the real problem. ;-)

                  It does sound like it could be a caching issue of some sort - since it occasionally works once but then no more. But now I'm obviously just guessing.

                  Will emptying the browser cache have anny effect?
                  Or accessing the app with another web browser?
                  Or accessing the app from another computer?