Flex e amfphp da erro 'Send Failed'

1 resposta
chamuska

Pessoal, tenho um sistema em FLex que usa o amfphp pra faze consulta no banco de dados pelo php, na tela de login, quando mando validar usuario e senha, da o erro ‘Send Failed’, testei com o ‘amfphp/browser/’ a função que valida login e deu certo.
O sistema estava rodando no Windows e agora que coloquei no Linux Debian deu esse problema.

Segue o codigo da pagina de login do Flex:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   xmlns:mx="library://ns.adobe.com/flex/mx"
			   xmlns:ns1="*"
			   minWidth="955" minHeight="600" backgroundColor="#FFFFFF" >
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
		
		<s:RemoteObject
			id="arquivo_amfphp"
			source="sessionUsuarios"
			destination="amfphp"
			showBusyCursor="true"
			>
		</s:RemoteObject>
		
		<s:RemoteObject
			id="consulta_amf"
			source="consultasSql"
			destination="amfphp"
			showBusyCursor="true"
			>
			<s:method name="validaUsuario" result="resultValidaUsuario(event)" fault="mx.controls.Alert.show(event.fault.faultString)" />
			
		</s:RemoteObject>	
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
			import flashx.textLayout.operations.PasteOperation;
			
			import mx.collections.ArrayCollection;
			import mx.containers.Canvas;
			import mx.controls.Alert;
			import mx.controls.ComboBox;
			import mx.rpc.events.ResultEvent;
			
			public var usuario:int;
			
			public var painelSalas:Panel;
			public var comboSalas:ComboBox;
			public var salas:Salas;
			
			public function resultValidaUsuario(usuario:Object):void
			{
				this.usuario = usuario.result;
				
				
				if(this.usuario > 0)
				{
					this.salas = new Salas();
					
					this.salas.horizontalCenter = -25;
					this.salas.verticalCenter = -48;
					
					addElement(this.salas);
					this.salas.init(this.usuario, login.text, senha.text);
				}
				
			}
			
			public function validaLogin():void
			{
				consulta_amf.validaUsuario.send(login.text, senha.text);
			}
			
		]]>
	</fx:Script>
	
	<mx:Panel id="camposLogin" width="382" height="246" backgroundAlpha="0.71"
			  backgroundColor="#FFFFFF" horizontalCenter="-25" layout="absolute"
			  title="Login do sistema!" verticalCenter="-48">
		<mx:Label x="10" text="E-mail" width="73" verticalCenter="-64" fontWeight="bold" fontSize="15"/>
		<mx:TextInput id="login" x="91" y="31" width="261" contentBackgroundColor="#FFFFFF"/>
		<mx:Label x="10" text="Senha" width="73" verticalCenter="-13" fontWeight="bold" fontSize="15"/>
		<mx:TextInput id="senha" x="91" y="82" width="261" displayAsPassword="true"/>
		<mx:Button x="141.5" y="151" label="Enviar" width="99" click="validaLogin();"/>
		
	</mx:Panel> 
	
	
</s:Application>

E o services-config.xml:

<?xml version="1.0" encoding="UTF-8" ?> 
 <services-config>
	 <services>
 		<service id="sabreamf-flashremoting-service" class="flex.messaging.services.RemotingService" messageTypes="flex.messaging.messages.RemotingMessage">
 			<destination id="amfphp">
 				<channels>
  					<channel ref="my-amfphp" /> 
  				</channels>
 				<properties>
  					<source>*</source> 
  				</properties>
  			</destination>
  		</service>
  	</services>
 	<channels>
 		<channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
  			<endpoint uri="http://{server.name}/MultiConferencia/bin-debug/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint" /> 
  		</channel-definition>
  	</channels>
  </services-config>

O que pode ta causando o problema ?!

Valeu!

1 Resposta

chamuska

Limpei o cache do navegador e msm assim ele não funcionava, resolvi acessar o fonte de uma pagina mxml, dar um enter em um lugar qualquer da pagina e salvar o arquivo, feito isso limpei o cache do navegador novamente e funciono :slight_smile:

Acho que precisava fazer com o que sistema compilasse novamente pra funciona!

Flw!

Criado 14 de julho de 2012
Ultima resposta 18 de jul. de 2012
Respostas 1
Participantes 1