2 Replies Latest reply on Sep 15, 2006 12:29 AM by this.sonix

    Webservice Problem

    this.sonix
      Hi
      I have a very confusing problem:

      I have 2 Servers running with the same configuration:
      Server A and Server B,
      both have ColdFusion 7.0.0.91690 installed, running, configured and crossdomain.xml set.
      Server A is reachable from the Internet.
      Server B is "only" an Intranet Server

      To explain my Problem simple:
      My Flex-Application with my CFC-Webservice works fully on Server B, but only partly on Server A
      The Webservices are running local on every server and are both reachable if I call them like:
      http://.../Messe06/service/backendservice.cfc?wsdl


      Fault Message (Server A):
      faultCode:Server.Error.Request faultString:'HTTP request error'
      faultDetail:'Error [IOErrorEvent type="ioError" bubbles=false cancable=false eventPhase=2
      text="Error #2032 Stream-Error, URL: http://...../Messe06/service/BackendService.cfc" ...

      Now complex:
      The Server A has a Webservice running (BackendService.cfc).
      If the Flex application requests the "getLaufendeTimerData"-Method the error (shown above) occurs.
      If the Flex-app requests another Method called "verfiyUser" it works fine.
      (The Code of both methods are attached at the end of this post)

      Which means the Webservice is reachable from the application and an error occurs in the Method "getLaufendeTimerData"
      but:
      the same service with the same code etc. works on Server B which means there is no fault.

      The strange thing is:
      If i edit my code Webservice-Method-Code to the following:
      <cffunction name="getLaufendeTimerData" output="false" access="remote" returntype="any">
      <cfset ret = "This is a Test">
      <cfreturn ret>
      </cffunction>
      it works on both Servers.
      If I edit it this way and add a Array:
      <cffunction name="getLaufendeTimerData" output="false" access="remote" returntype="any">
      <cfset ret = ArrayNew(1)>
      <cfset ret[1] = "This is a test">
      <cfreturn ret>
      </cffunction>
      The error like above "HTTP request error" .. occurs again, but only on Server A.
      Server B works fine... again.


      The Flex 2 side:
      <mx:WebService wsdl="../service/BackendService.cfc?wsdl" id="WSBackend" showBusyCursor="true" fault="Alert.show(event.fault.message)">
      <mx:operation name="verifyUser" result="LoginHandler(event.result)"/>
      <mx:operation name="getLaufendeTimerData" result="getLaufendeTimer(event.result)" />
      I guess there is no fault on the Flex-Side which could cause the fault.



      Now I have been testing, debugging and searching a solution for 2 days, but I have not found one, yet
      And I am very pleased of every hint or solution.
      My last hope is that anyone in this Forum can help me.

      Thanks a lot !




      Code:
      <cffunction name="getLaufendeTimerData" output="false" access="remote" returntype="any">
      <cfquery datasource="helpdesk" name="gewinnzeiten">
      Select *
      from ep06_gewinnzeiten
      where Counter < Gewinnzahl
      order by Timestamps
      </cfquery>

      <cfset ret = ArrayNew(1)>
      <cfset i = 0>
      <cfoutput query="gewinnzeiten">
      <cfset i = #i# +1>
      <cfset Gewinnzeit = StructNew()>
      <cfset Gewinnzeit.ID = #id#>
      <cfset Gewinnzeit.Timestamp = #Timestamps#>
      <cfset Gewinnzeit.Gewinnzahl = #Gewinnzahl#>
      <cfset Gewinnzeit.Counter = #Counter#>
      <cfset Gewinnzeit.Gewinner = #Gewinner#>
      <cfset Gewinnzeit.GewinnerID = #GewinnerID#>
      <cfset ret[#i#] = Gewinnzeit>
      </cfoutput>
      <cfreturn ret>
      </cffunction>

      <cffunction name="verifyUser" output="false" access="remote" returntype="Boolean">
      <cfargument required="yes" name="user" type="String">
      <cfargument required="yes" name="password" type="String">
      <cfset ret = false>
      <cfquery datasource="helpdesk" name="verify">
      select distinct user.username, passwd, user.name, department
      from rechte, userrechte, user
      where rechte.rechtename = userrechte.rechtename
      and userrechte.username = user.username
      and Upper(user.username) = "#UCase(user)#"
      and Upper(user.passwd) = "#Ucase(password)#"
      </cfquery>
      <cfif verify.recordCount NEQ 0>
      <cfset ret = true>
      </cfif>
      <cfreturn ret>
      </cffunction>
        • 1. Re: Webservice Problem
          davidmedifit Level 1
          Quick question - may be obvious - have you turned off component caching for both server admins? If not, and you fix errors, the old error will still show up.

          Does server A have trouble calling ANY function from the service, or just the one function? The CFC's are the same for both server? Can you post the entire error message?

          Cheers,

          David
          • 2. Re: Webservice Problem
            this.sonix Level 1
            Hi,
            Component caching is deactivated.

            The error does not occur at all functions, only at a few.

            I've now testet another server which is the backup-server for the Not-Working-One.
            If I copy my files to that server it works.
            The confusing thing is: both servers have 100% (except path and serial) the same configuration.
            The CFCs are of course the same on every Server.

            Ratio: 4 Servers testet with same config and same files: 3 working; 1 not working

            Error Message (event.fault.message):
            faultCode:Server.Error.Request faultString:'HTTP request error'
            faultDetail:'Error [IOErrorEvent type="ioError" bubbles=false cancable=false eventPhase=2
            text="Error #2032 Stream-Error, URL: http://...../Messe06/service/BackendService.cfc"
            URL: http://...../Messe06/service/BackendService.cfc'.

            Thanks a lot