Olá João.
1) Como posso ter a certeza que ele está connected ao Endpoint? Eu sei que o
Producer lá chega, e como o Consumer não dá nenhum erro, deduzi que ele se
consegue ligar.
2) Como posso verificar os clientes subscribed do lado do Java?

Sinceramente, eu defini a polling porque foi assim que encontrei em exemplos
na Net... Já os retirei! :)

Envio juntamente os ficheiros que criei para se quiseres dar um olhinho. É
tudo muito simples, pois ainda estava mesmo no princípio de tentar passar
mensagens do cliente para o servidor (já consigo) e do servidor para o
cliente (ainda não consigo).

Cumprimentos,
Joel Silva.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
João Fernandes
Sent: segunda-feira, 26 de Janeiro de 2009 18:33
To: [email protected]
Subject: [riapt] Re: Consumir webservice em Java e despoletar evento no Flex


1) tens a certeza que o consumer esta connected ao endpoint?
2) Verificaste do lado do lado do Java os clientes 'subscribed'?

Já agora, porque defines um polling para um streaming AMF? Visto ser 
'streaming' não existe qualquer tipo de polling neste canal, este é 
'bi-direccional' pelo facto de abrir na realidade duas ligações entre o 
cliente e servidor, uma para enviar e uma para receber.


-- 

João Fernandes

Adobe Certified Expert
Adobe Community Expert
http://www.onflexwithcf.org
http://www.riapt.org
Portugal Adobe User Group (http://aug.riapt.org)






--~--~---------~--~----~------------~-------~--~----~
Recebeu esta mensagem porque está inscrito em Grupo "Mailing List da Comunidade 
Portuguesa de Rich Internet Applications - www.riapt.org" do Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
[email protected]
 Para anular a inscrição neste grupo, envie um email para 
[email protected]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/riapt?hl=pt-PT
-~----------~----~----~----~------~----~------~--~---

Attachment: DataHandler.java
Description: Binary data

Attachment: IpTV.mxml
Description: Binary data

<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" 
    class="flex.messaging.services.MessageService">

    <adapters>
        <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true"/>
        <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
    	<adapter-definition id="DataHandlerPushAdapter" class="nb.iptv.DataHandler"/> 
    </adapters>

    <default-channels>
        <channel ref="my-polling-amf"/>
    </default-channels>
    <destination id="DataHandlerPush">
		<channels> 
			<channel ref="my-streaming-amf"/>
		</channels>
		<adapter ref="DataHandlerPushAdapter"/>
	</destination>
</service>
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
    <services>
        <service-include file-path="messaging-config.xml"/>        
    </services>
    <channels>
    	<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
    		<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf";
    			class="flex.messaging.endpoints.AMFEndpoint"/>
    	</channel-definition>
        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure"; class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>

        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling"; class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>4</polling-interval-seconds>
            </properties>
        </channel-definition>
        <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel"> 
        	<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf"; 
        		class="flex.messaging.endpoints.StreamingAMFEndpoint"/> 
        	<properties> 
        		<idle-timeout-minutes>0</idle-timeout-minutes> 
        		<max-streaming-clients>10</max-streaming-clients> 
        		<server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis> 
        		<user-agent-settings> 
        			<user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="3"/> 
        			<user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="3"/> 
        		</user-agent-settings> 
        	</properties>
		</channel-definition>

        <!--
        <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http"; class="flex.messaging.endpoints.HTTPEndpoint"/>
        </channel-definition>

        <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure"; class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
        -->
    </channels>

    <logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[BlazeDS] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>false</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

    <system>
        <redeploy>
            <enabled>false</enabled>
            <!-- 
            <watch-interval>20</watch-interval>
            <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
             -->
        </redeploy>
    </system>

</services-config>

Responder a