"Error #1006: getAttributeByQName is not a function." Flex 2.0.1 hotfix 2

Posted by Deveti Putnik on Stack Overflow See other posts from Stack Overflow or by Deveti Putnik
Published on 2010-06-09T07:47:10Z Indexed on 2010/06/09 7:52 UTC
Read the original article Hit count: 374

Filed under:
|
|
|
|

Hi, guys!

I am working on some old Flex project (Flex 2.0.1 hotfix 2) and I am rookie in Flex programming. So, I wrote code for accessing some ASP.NET web service:

<?xml version="1.0" encoding="utf-8"?>

    [Bindable]
    public var users:ArrayOfUser;

    private function buttonClicked():void
    {
        mx.controls.Alert.show(dataService.wsdl);
        dataService.UserGetAll.send();/
    }

    public function dataHandler(event:ResultEvent):void
    {
        Alert.show("alo");
        var response:ResponseUsers = event.result as ResponseUsers;
        if (response.responseCode != ResponseCodes.SUCCESS)
        {
            mx.controls.Alert.show("Error: " + response.responseCode.toString());
            return;
        }
        users = response.users;

    }

]]>

<mx:Button label="Click me!" click="buttonClicked()"/>

And this is what I get from debugger:

WSDL loaded
Invoking SOAP operation UserGetAll
Encoding SOAP request envelope
Encoding SOAP request body
'A97A2DC1-AEDA-C594-45D2-1BA2B0F3B223' producer sending message '10681130-43E7-3DA7-34DD-1BA2B85545E3'
'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:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <tns:UserGetAll xmlns:tns="http://tempuri.org/"/>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
  clientId = "DirectHTTPChannel0"
  contentType = "text/xml; charset=utf-8"
  destination = "DefaultHTTP"
  headers = (Object)#1
  httpHeaders = (Object)#2
    SOAPAction = ""http://tempuri.org/UserGetAll""
  messageId = "10681130-43E7-3DA7-34DD-1BA2B85545E3"
  method = "POST"
  recordHeaders = false
  timestamp = 0
  timeToLive = 0
  url = "http://192.168.0.201:8123/Service.asmx"
'A97A2DC1-AEDA-C594-45D2-1BA2B0F3B223' producer acknowledge of '10681130-43E7-3DA7-34DD-1BA2B85545E3'.
Decoding SOAP response
Encoded SOAP response <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><UserGetAllResponse xmlns="http://tempuri.org/"><UserGetAllResult><ResponseCode>Success</ResponseCode><Users><User><Id>1</Id><Name>test</Name><Key>testKey</Key><IsActive>true</IsActive><Name>Petar i Sofija</Name><Key>123789</Key><IsActive>true</IsActive></User></Users></UserGetAllResult></UserGetAllResponse></soap:Body></soap:Envelope>
Decoding SOAP response envelope
Decoding SOAP response body

And finally I get this error "Error #1006: getAttributeByQName is not a function.". As you can see, I get correct response from web service, but dataHandler function is never got called.

Can anyone please help me out?

Thanks, Deveti Putnik

© Stack Overflow or respective owner

Related posts about flex

Related posts about web-services