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:string">&lt;adex&gt;
>   &lt;header&gt;
>     &lt;status&gt;true&lt;/status&gt;
>     &lt;operatorToken/&gt;
>     &lt;terminalToken/&gt;
>   &lt;/header&gt;
>   &lt;body&gt;
>     &lt;data name="cacheStatus"
> dataType="object"&gt;&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;/data&gt;
>     &lt;data name="parkId"
> dataType="numeric"&gt;&lt;![CDATA[511]]&gt;&lt;/data&gt;
>     &lt;data name="locationId"
> dataType="numeric"&gt;&lt;![CDATA[6558]]&gt;&lt;/data&gt;
>   &lt;/body&gt;
> &lt;/adex&gt;</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;?xml<http://schemas.xmlsoap.org/soap/encoding/%22%3E&lt;?xml>version=&quot;1.0&quot;
> encoding=&quot;UTF-8&quot;?&gt;
> &lt;adex&gt;&lt;header&gt;&lt;status&gt;true&lt;/status&gt;&lt;operatorToken&gt;&lt;/operatorToken&gt;&lt;terminalToken&gt;&lt;/terminalToken&gt;&lt;/header&gt;&lt;body&gt;&lt;data
> datatype=&quot;query&quot;
> name=&quot;cacheUpdates&quot;&gt;&lt;![CDATA[{&quot;COLUMNS&quot;:[&quot;CACHENAME&quot;,&quot;GETUPDATE&quot;],&quot;DATA&quot;:[[&quot;park&quot;,0],[&quot;location&quot;,0],[&quot;campground&quot;,0],[&quot;loop&quot;,0],[&quot;state&quot;,0],[&quot;asset&quot;,0],[&quot;country&quot;,0],[&quot;site&quot;,0],[&quot;ticketType&quot;,194],[&quot;parkPass&quot;,18631],[&quot;equipment&quot;,0],[&quot;discount&quot;,0],[&quot;retail&quot;,1.0]]}]]&gt;&lt;/data&gt;&lt;/body&gt;&lt;/adex&gt;</getCacheUpdatesReturn>
>   </ns1:getCacheUpdatesResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> *Ideally this is how the packets should go through (for another operation
> which goes through fine )-*
> 
> 
> 2/17/2010 09:28:10.523 [INFO] mx.rpc.soap.Operation Creating SOAP Operation
> for getSystemDateTime
> 2/17/2010 09:28:10.523 [DEBUG] mx.rpc.soap.Operation Invoking SOAP operation
> getSystemDateTime
> 2/17/2010 09:28:10.523 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
> envelope
> 2/17/2010 09:28:10.523 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
> body
> 2/17/2010 09:28:10.523 [INFO] mx.messaging.Producer
> 'A9887317-57D3-3B38-74A0-DC8AA2A2D59C' producer sending message
> '55C1476D-A54B-11F2-512C-DC8B211B8D6E'
> 2/17/2010 09:28:10.533 [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:getSystemDateTime
> xmlns:intf="http://webservices.com.webservices"/<http://webservices.com.webservices%22/>
> >
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>"
>   clientId = "DirectHTTPChannel0"
>   contentType = "text/xml; charset=utf-8"
>   destination = "DefaultHTTP"
>   headers = (Object)#1
>   httpHeaders = (Object)#2
>     SOAPAction = """"
>   messageId = "55C1476D-A54B-11F2-512C-DC8B211B8D6E"
>   method = "POST"
>   recordHeaders = false
>   timestamp = 0
>   timeToLive = 0
>   url = "http://xyz/webservices/com/webservices/SecurityWebServices.cfc";
> 2/17/2010 09:28:11.534 [INFO] mx.messaging.Producer
> 'A9887317-57D3-3B38-74A0-DC8AA2A2D59C' producer acknowledge of
> '55C1476D-A54B-11F2-512C-DC8B211B8D6E'.
> 2/17/2010 09:28:11.534 [INFO] mx.rpc.soap.SOAPDecoder Decoding SOAP response
> 2/17/2010 09:28:11.544 [DEBUG] mx.rpc.soap.SOAPDecoder Encoded SOAP response
> <?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:getSystemDateTimeResponse soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="
> http://webservices.com.webservices";>
>    <getSystemDateTimeReturn xsi:type="soapenc:string" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/";>&lt;?xml<http://schemas.xmlsoap.org/soap/encoding/%22%3E&lt;?xml>version=&quot;1.0&quot;
> encoding=&quot;UTF-8&quot;?&gt;
> &lt;adex&gt;&lt;header&gt;&lt;status&gt;true&lt;/status&gt;&lt;operatorToken&gt;&lt;/operatorToken&gt;&lt;terminalToken&gt;&lt;/terminalToken&gt;&lt;/header&gt;&lt;body&gt;&lt;data
> datatype=&quot;date&quot;
> name=&quot;CurrentDateTime&quot;&gt;&lt;![CDATA[February 17, 2010
> 09:02:16]]&gt;&lt;/data&gt;&lt;/body&gt;&lt;/adex&gt;</getSystemDateTimeReturn>
>   </ns1:getSystemDateTimeResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> 2/17/2010 09:28:11.554 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP
> response envelope
> 2/17/2010 09:28:11.554 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP
> response body
> 2/17/2010 09:28:11.554 [INFO] mx.rpc.soap.SOAPDecoder Decoded SOAP response
> into result [20 millis]
> 
> 
> *Before i dig into checking out Flex SDK framework to build / compile / put
> breakpoints and debug, I just wanted to know if anyone has an outright
> solution for a similar problem encountered before.*
> 
> Thanks
> Arun
>


Reply via email to