如何自定义ChatMessageListeningEndpoint&使用spring集成的GCM ChatMessageSendingMessageHandler?

时间:2015-06-28 15:45:49

标签: google-cloud-messaging spring-integration

致力于自定义ChatMessageListeningEndpoint& ChatMessageSendingMessageHandler但面临像

这样的问题
  

SEVERE:异常将上下文初始化事件发送到类的监听器实例org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException:创建名称为' myNotificationListeningEndpoint'在ServletContext资源[/WEB-INF/applicationContext.xml]中定义:init方法的调用失败;嵌套异常是java.lang.IllegalArgumentException:outputChannel是必需的

<int:channel id="gcmInboundNotificationChannel"/>
<int:channel id="gcmOutboundNotificationChannel"/>
<bean id="toGcmTransformer" class="com.test.cardhash.service.AndroidMessageTransformer"/>

<int:chain input-channel="gcmOutboundNotificationChannel">
            <bean class="com.test.cardhash.service.MyMessageSendingMessageHandler">
        <constructor-arg ref="gcmConnection" />
    </bean>
</int:chain>
<int:transformer id="testTransformer" ref="toGcmTransformer" input-channel="gcmInboundNotificationChannel"
         method="doTransform" output-channel="gcmOutboundNotificationChannel"/>
<int-xmpp:outbound-channel-adapter
    id="gcmOutboundAdapter" channel="gcmOutboundNotificationChannel"
    xmpp-connection="gcmConnection" auto-startup="true"/>

<int:chain input-channel="gcmInboundNotificationChannel">
    <bean class="com.test.cardhash.service.MyNotificationListeningEndpoint">
        <constructor-arg ref="gcmConnection" />
        <property name="outputChannel" ref="gcmOutboundNotificationChannel" />
    </bean>
</int:chain>

<int-xmpp:inbound-channel-adapter 
    id="gcmInboundAdapter"  channel="gcmInboundNotificationChannel" 
    xmpp-connection="gcmConnection" extract-payload="true" auto-startup="true" />

0 个答案:

没有答案