Re: [flexcoders] Re: Webservice Random Faults

2010-02-24 Thread ArunKumar Madas
I am afraid having to do that will defeat the purpose of having webservices
in place!
To me it alternately looks like having HTTPService with required params to a
CF page that queries the db and returns the data back (in your case its via
AMF using remoteObj).
In-case someone is looking for an answer -

  I spent a lot of time trying to dig through the framework api with debug
points everywhere. Its unfortunate, i was in a place where finding the cause
of the problem was a pain as the faults were not consistent and any code
changes cannot be tested without it being reproducible. I read in the
comments of this url - http://www.judahfrangipane.com/blog/?p=87 that
getting rid of fiddler sometimes avoids these errors. In my case these were
not the IO errors (#2032) as i receive the HTTP status codes fine 200 in the
response in fiddler. I just couldn't give a straight solution to get rid of
fiddler without the issue being reproducible.

 While i debugged through the framework, i figured out that error was
getting generated from mx.rpc.AsyncRequest.as (Line 62) and the
acknowledgement forwarded by fiddler has DSErrorHint set to true. This is
the catch to isolate why fiddler receives the HTTP status 200 fine (acting
as proxy) just that it doesn't reach through till flash player fine. One of
the QA Engineers reproduced the problem in-house and I have witnessed having
fiddler on (acting as proxy) causes the problem and turning it off gets rid
of it [I was really lucky to reproduce it, it was like one out of 30-40
operations faults]. Hard to even convince any one even now, but hope this
saves someones time.

Use network sniffers instead of http proxies for debugging.

~ Arun

On Mon, Feb 22, 2010 at 12:12 PM, valdhor valdhorli...@embarqmail.comwrote:



 I came across multiple problems using Flex's built-in SOAP decoder. Instead
 I created a SOAP client on my server that makes all the calls and then
 returns the data to Flex using AMF. This also gets around any cross domain
 issues. It works for me 100% of the time ;-}


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 ArunKumar Madas arun.fle...@... wrote:
 
  We have been encountering random SOAP Faults in our application.
 Definitely
  something is going wrong.
  We have a CF implementation for webservices (using coldspring) consumed
 by
  the flex application.
  The end users are randomly encountering Fault events. We are using FLEX
 SDK
  3.5
 
  Here are the details -
 
  faultCode = DecodingError
  faultString = SOAP Response cannot be decoded. Raw response: null
  faultDetail = null
 
  The same webservice call works 99% of the time. Randomly we encounter
 some
  faults.
  I have gone through this URL http://www.judahfrangipane.com/blog/?p=87and
  some others with no resolution.
 
  Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
  response without any error.
  We enabled Flash Debug logging with all events to be logegd
  into flashLog.txt and we found that the fault is generated internal to
 the
  framework -
 
  Here are the details -
 
  2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP
 Operation
  for getCacheUpdates
  2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP
 operation
  getCacheUpdates
  2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP
 request
  envelope
  2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP
 request
  body
  2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
  'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
  'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
  2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
  channel sending message:
  (mx.messaging.messages::SOAPMessage)#0
  body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
  http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
  http://www.w3.org/2001/XMLSchema; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance;
  SOAP-ENV:Body SOAP-ENV:encodingStyle=
  http://schemas.xmlsoap.org/soap/encoding/;
  intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
  adex xsi:type=xsd:stringlt;adexgt;
  lt;headergt;
  lt;statusgt;truelt;/statusgt;
  lt;operatorToken/gt;
  lt;terminalToken/gt;
  lt;/headergt;
  lt;bodygt;
  lt;data name=cacheStatus
  dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
  PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
  PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
  PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
  PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
  PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
  AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
  PM}]]gt;lt;/datagt;
  lt;data name=parkId
  dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
  lt;data name=locationId
  dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
  lt;/bodygt;
  lt;/adexgt;/adex
  /intf:getCacheUpdates
  /SOAP-ENV:Body
  

[flexcoders] Re: Webservice Random Faults

2010-02-22 Thread valdhor
I came across multiple problems using Flex's built-in SOAP decoder. Instead I 
created a SOAP client on my server that makes all the calls and then returns 
the data to Flex using AMF. This also gets around any cross domain issues. It 
works for me 100% of the time ;-}

--- In flexcoders@yahoogroups.com, ArunKumar Madas arun.fle...@... wrote:

 We have been encountering random SOAP Faults in our application. Definitely
 something is going wrong.
 We have a CF implementation for webservices (using coldspring) consumed by
 the flex application.
 The end users are randomly encountering Fault events. We are using FLEX SDK
 3.5
 
 Here are the details -
 
  faultCode = DecodingError
  faultString = SOAP Response cannot be decoded. Raw response: null
  faultDetail = null
 
 The same webservice call works 99% of the time. Randomly we encounter some
 faults.
 I have gone through this URL http://www.judahfrangipane.com/blog/?p=87 and
 some others with no resolution.
 
 Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
 response without any error.
 We enabled Flash Debug logging with all events to be logegd
 into flashLog.txt and we found that the fault is generated internal to the
 framework -
 
 Here are the details -
 
 2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP Operation
 for getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP operation
 getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 envelope
 2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 body
 2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
 2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
 channel sending message:
 (mx.messaging.messages::SOAPMessage)#0
   body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
   SOAP-ENV:Body SOAP-ENV:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/;
 intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
   adex xsi:type=xsd:stringlt;adexgt;
   lt;headergt;
 lt;statusgt;truelt;/statusgt;
 lt;operatorToken/gt;
 lt;terminalToken/gt;
   lt;/headergt;
   lt;bodygt;
 lt;data name=cacheStatus
 dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
 PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
 PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
 PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
 PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
 PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
 AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
 PM}]]gt;lt;/datagt;
 lt;data name=parkId
 dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
 lt;data name=locationId
 dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
   lt;/bodygt;
 lt;/adexgt;/adex
 /intf:getCacheUpdates
   /SOAP-ENV:Body
 /SOAP-ENV:Envelope
   clientId = DirectHTTPChannel0
   contentType = text/xml; charset=utf-8
   destination = DefaultHTTP
   headers = (Object)#1
   httpHeaders = (Object)#2
 SOAPAction = 
   messageId = FACB3D46-5745-E0B7-4F3C-DC8B26A9872C
   method = POST
   recordHeaders = false
   timestamp = 0
   timeToLive = 0
   url = http://xyz/webservices/com/webservices/CachingWebServices.cfc;
 2/17/2010 09:28:12.505 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer acknowledge of
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.
 *2/17/2010 09:28:12.505 [ERROR] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer fault for
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.*
 **
 *Its actually getting generated from Line 710 of
 mx.messaging.MessageAgent.as*
 **
 **
 *Here is the RAW Response in the fiddler (HTTP 200 OK)*
 
 HTTP/1.1 200 OK
 Connection: close
 Date: Wed, 17 Feb 2010 15:22:46 GMT
 Content-Type: text/xml; charset=utf-8
 Server: Microsoft-IIS/6.0
 PICS-Label: (PICS-1.0 http://www.rsac.org/ratingsv01.html; l on
 2009.11.13T12:51-0600 exp 2015.11.13T12:00-0600 r (v 0 s 0 n 0 l 0))
 X-Powered-By: ASP.NET
 Vary: Accept-Encoding
 Set-Cookie: Coyote-2-a0305b5=a030548:0; path=/
 Content-Length: 1345
 
 ?xml version=1.0 encoding=utf-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
   ns1:getCacheUpdatesResponse soapenv:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=
 http://webservices.com.webservices;
getCacheUpdatesReturn xsi:type=soapenc:string xmlns:soapenc=
 http://schemas.xmlsoap.org/soap/encoding/;lt;?xmlhttp://schemas.xmlsoap.org/soap/encoding/%22%3Elt;?xmlversion=quot;1.0quot;