Boa tarde pessoal!
Estou iniciando com o graniteDS, apos apanhar um bucado com o BlazeDS e o lazyLoad do Hibernate, estou fazendo a migração para o GranideDS porém, não estou conseguindo fazer a chamada das classes java. Segui a documentação do GraniteDS e exemplos mais sem sucesso.
Meus xmls:
<!--################################ Web.xml ########################-->
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>GraniteDS Pojo</display-name>
<description>GraniteDS Pojo Application</description>
<!-- Granite config context listener -->
<listener>
<listener-class>org.granite.config.GraniteConfigListener</listener-class>
</listener>
<context-param>
<param-name>servicesConfigPath</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</context-param>
<context-param>
<param-name>graniteConfigPath</param-name>
<param-value>/WEB-INF/granite/granite-config.xml</param-value>
</context-param>
<filter>
<filter-name>AMFMessageFilter</filter-name>
<filter-class>org.granite.messaging.webapp.AMFMessageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AMFMessageFilter</filter-name>
<url-pattern>/graniteamf/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>AMFMessageServlet</servlet-name>
<servlet-class>org.granite.messaging.webapp.AMFMessageServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AMFMessageServlet</servlet-name>
<url-pattern>/graniteamf/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
<!--################################ services-config.xml ########################-->
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service
id="granite-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
<destination id="pojo">
<channels>
<channel ref="my-graniteamf"/>
</channels>
<properties>
<scope>session</scope>
<source>test.pojo.PojoService</source>
</properties>
</destination>
</service>
</services>
<channels>
<channel-definition id="my-graniteamf" class="mx.messaging.channels.AMFChannel">
<endpoint
uri="http://{server.name}:{server.port}/{context.root}/graniteamf/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
</channels>
</services-config>
<!--################################ Application xmxl - Flex ########################-->
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
layout="vertical"
backgroundGradientColors="[#0e2e7d, #6479ab]"
verticalAlign="middle"
creationComplete="srv.getCounter()">
<mx:RemoteObject id="srv" showBusyCursor="true" destination="pojo" />
<mx:Panel title="Just a Counter (Session Scope)" verticalAlign="middle"
horizontalAlign="center" paddingTop="8" paddingBottom="8" titleIcon="@Embed('network.png')">
<mx:Label text="{srv.getCounter.lastResult}" />
<mx:Button label="Go" click="srv.getCounter()"/>
<mx:Text htmlText="<i>(try to reload window)</i>"/>
</mx:Panel>
</mx:Application>
Ocorre o seguinte erro:
MessagingError = 'O destino 'pojo' não existe ou não tem canais definidos (e o aplicativo não define nenhum canal padrão).'
FailutDetail: Não foi possível estabelecer conexão com 'pojo'
Coloqueio o granite.jar na pasta lib também.
Alguém sabe o porque ele dá esse erro e o que fiz de errado?