Thanks guys. We managed to get what we needed easily with AMFPHP .

Never the less, in the Future I hope to try it again and by then, expect to hear from me.

Thank you all. :-)

Telmo


Telmo Dias wrote:
Hi all,

First of all , I'm new to flex. Already bought a few books but none 
describes this issue in detail.

I'm having huge trouble accessing object arrays from SOAP.  I'm using 
Flex Builder 3, Version: 3.0.190133, the last beta version.
I used the Import Web Services wizard to import 
http://ws.marcocova.com/SOAP/af4.php?wsdl . My partner who writes the 
SOAP code, has tried several approaches. In the approaches before the 
current one, I couldn't even get a simple var, it would always come in 
as null. Now I can get simple vars like strings or numbers, but I'm 
unable to get Arrays.

Below is the code I'm using. At this moment when I debug I'm getting the 
error:

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
    at WSDL8_AF4/processResults()[F:\Para_Novo_CD\BACKUPS\My 
Documents\Flex Builder 3\WSDL8_AF4\src\WSDL8_AF4.mxml:32]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at 
com.marcocova::ExampleService/_getPeopleByFirstLastName_populate_results()[F:\Para_Novo_CD\BACKUPS\My 
Documents\Flex Builder 3\WSDL8_AF4\src\com\marcocova\ExampleService.as:147]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at 
com.marcocova::BaseExampleService/processResult()[F:\Para_Novo_CD\BACKUPS\My 
Documents\Flex Builder 
3\WSDL8_AF4\src\com\marcocova\BaseExampleService.as:207]
    at 
mx.rpc::AsyncResponder/result()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncResponder.as:73]
    at 
mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:81]
    at 
DirectHTTPMessageResponder/completeHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:387]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()


Can someone who understands this, please help me? I've been around this 
issue for one week without results... Already checked the posts on the 
list, since 14/11/2007.

Thanks in advance.

Telmo Dias



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" initialize="getResults()">
    <mx:Script>
        <![CDATA[
            import com.marcocova.*; //classes resultant from the wizard
            import mx.collections.ArrayCollection;
            import mx.utils.ArrayUtil;
           
            public function getResults():void{
                var myService:ExampleService = new ExampleService();
                  //* Step 2: for the desired operation add a result 
handler (a function that you have already defined previously) 
                  
myService.addgetPeopleByFirstLastNameEventListener(processResults);
                  //* Step 3: Call the operation as a method on the 
service. Pass the right values as arguments:
                  myService.getPeopleByFirstLastName('*','*');
                 
            }
           
            public function 
processResults(res:GetPeopleByFirstLastNameResultEvent):void{
                trace(typeof res.result); //this outputs object
                for (var x in res.result){
                    trace(typeof x);//doesn't even trace once
                }
                var arrRes:ArrayCollection = res.result;
                var arrPerson:Array = arrRes.toArray();
                var pers:Person = Person(arrPerson[0]);
                trace(pers.firstName); //nothing either
            }
        ]]>
    </mx:Script>
</mx:Application>

  


--
XYLE
........................................................................

XYLE [XyleDot Unipessoal Lda.]
Telmo Dias | Senior Developer  
 
Rua Dr. José Martinho Simões, N.º 81
3260-421 Figueiró dos Vinhos, Leiria
Portugal
 
+351 236 551 671 telefone / phone
+351 91 804 74 64 telemóvel / cell
 
........................................................................
XYLE | full service network
XYLE.PT Creative Studio | Advanced Technology and Design
XYLE.ORG | Professional Web Hosting
........................................................................
 
 
Aviso de Confidencialidade
Esta mensagem pode conter informação confidencial e material privilegiado, e é destinada apenas ao(s) individuo(s) indicados.
Se não se encontra mencionado(a) nos endereços indicados, não deverá disseminar, distribuir ou copiar este e-mail.
Por favor notifique o remetente imediatamente, por e-mail, se recebeu este e-mail por engano e apague este e-mail do seu sistema.
A transmissão de mensagens de e-mail não pode ser garantida como segura ou livre de erros, dado que a informação pode ser interceptada,
corrompida, perdida, destruída, chegar tarde ou incompleta, ou conter vírus.
Assim, o remetente rejeita qualquer responsabilidade por quaisquer erros ou omissões nos conteúdos desta mensagem,
que sejam resultantes da transmissão deste e-mail.
Caso necessite de verificação, por favor requisite uma versão em papel desta mensagem.
 
Confidentiality Notice
This message may contain confidential information or privileged material, and is intended only for the individual(s) named. If you are not in
the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this
message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
 
XYLEDOT Unipessoal Lda.

begin:vcard
fn:Telmo Dias
n:Dias;Telmo
org:XYLE   [ Xyledot Unipessoal Lda. ]
adr:;;R. Dr. Jose Martinho Simoes, 81;Figueiro dos Vinhos;Leiria;3260-421;Portugal
email;internet:[EMAIL PROTECTED]
tel;work:+351236551671
tel;cell:+351918047464
x-mozilla-html:TRUE
url:http://www.xyle.pt
version:2.1
end:vcard

Reply via email to