1 Reply Latest reply on Mar 6, 2014 7:45 AM by AaronFlexer

    Completely different AMF request packets for same remote service call from Flex to PHP using ZendAMF

    AseemBehl

       

      I was trying to debug why one of the remote-services in our Flex application was failing randomly. What I found was interesting. Completely different AMF request packets were sent for same remote service call from Flex to PHP.

      When the service call succeeds the AMF request packet looks like the following:

       

      POST /video/flex/bin-debug/gateway.php HTTP/1.1
      Host: localhost
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 115
      Cookie: PHPSESSID=j6u30i8uu6c3cvp8f4kipcpf05
      Referer: http://localhost/video/flex/bin-debug/main.swf/[[DYNAMIC]]/5
      Content-type: application/x-amf
      C    ontent-length: 305

      Flex Message (flex.messaging.messages.RemotingMessage)     operation = getMemberFromEvent    clientId = 2F997CD0-7D08-8D09-1A9B-0000422676C8    destination = MembereventService    messageId = B46AB58D-2241-83F0-41E4-9FE745565492    timestamp = 0    timeToLive = 0    body =     [      280    ]    hdr(DSId) = nil

       

      And when the service fails the AMF request packet looks like this:

       

      ServiceRequest: getMemberFromEvent; RemoteService; getMemberFromEvent
      (mx.messaging.messages::RemotingMessage)#0
        body
      = (Array)#1
         
      [0] 250
        clientId
      = "1AA4FAAB-AEA5-8109-4B0D-000002B3A9A1"
        destination
      = "MembereventService"
        headers
      = (Object)#2
         
      DSEndpoint = (null)
         
      DSId = "nil"
        messageId
      = "2F92E6C0-FE92-A09B-B150-9FE2F28D9738"
        operation
      = "getMemberFromEvent"
        source
      = "MembereventService"
        timestamp
      = 0
        timeToLive
      = 0

       

      Also, following is the error message on Flex when the service fails:

       {Fault code=Channel.Call.Failed, Fault string=error, Fault detail=NetConnection.Call.Failed: HTTP: Failed, Destination=MembereventService}

       

      We are using Swiz as the micro-architecture for Flex development and Zend AMF for remoting between Flex and PHP.

      Any ideas what is wrong here, what is causing Flex to send different request packets for the same service & what I can do to fix it?