Erro com WebService quando chamado na função creationComplete
Olá pessoal, estou com uma dúvida com WebServices em relação a função
creationComplete.
Se eu chamo o WebService de outra forma, seja por um click em um botão
ou em um menu, o WebService é chamado normalmente e nenhum problema
ocorre. Tanto que tenho uma tela de login e senha que esta funcionando
normalmente com WebService e beck end em Java.
Mas, quando tento chamar a mesma função pelo método creationComplete
da tag Application, o erro abaixo é retornado:
[http://servicos.empresa.com.br/:getMenuDeUsuario not resolvable"
faultCode="WSDL.BadElement" faultDetail="null]
at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::parseMessage\
()
at mx.rpc.soap::WSDLOperation/parseMessages()
at
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePending\
Call()
at
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokeAllPend\
ing()
at mx.rpc.soap::WebService/::unEnqueueCalls()
at
mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlHandler(\
)
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio\
n()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc.soap::WSDLParser/dispatchEvent()
at mx.rpc.soap::WSDLParser/::parseCompleted()
at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpResultHa\
ndler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio\
n()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcE\
vent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandle\
r()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::DirectHTTPMessageResponder/completeHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio\
n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
A tag Application esta assim:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" fontFamily="Verdana" creationComplete="initApp()">
A função initApp esta assim:
private function initApp():void {
ws.getMenuDeUsuario.send();
}
Alguém sabe fazer se é possível chamar o WebService diretamente na
criação da aplicação como estou querendo?
Só lembrando que seu eu chamar em qualquer outro evento, funciona.
Att,
Fred
Discussão (6)
Carregando comentários...