Hi,
We are using SmartGWT Version 5.0 Power Edition and I am testing using Chrome version 46.0.2490.86 m
I am trying to use the Real Time Messaging module to send messages from the server side to the client, but the client does not receive any message.
On the server side, everything looks good. I have included the isomorphic_js_parser.jar and isomorphic_realtime_messaging.jar into the server. Here is my code used to send the messages:
This works fine as I can see the following log: “ISCMessageDispatcher - sending message to channel: 59086B61-5326-491A-9D9E-0A73A04F9ABE”
On the client side, I have tried to include the RealTime Messaging module by adding this to my .gwt.xml project file:
When I then compile my project, I get the following error: Invoking Linker Cross-Site-Iframe [ERROR] The Cross-Site-Iframe linker does not support <script> tags in the gwt.xml files, but the gwt.xml file (or the gwt.xml files which it includes) contains the following script tags: sc/modules/ISC_RealtimeMessaging.js In order for your application to run correctly, you will need to include these tags in your host page directly. In order to avoid this error, you will need to remove the script tags from the gwt.xml file, or add this property to the gwt.xml file: <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
As mentioned in the output, I have included the ISC_RealtimeMessaging.js directly into my .html file.
I have also included the servlet-mapping into my web.xml as follow
The code on the client-side looks like:
I have also tested by setting a MessagingURL like this to match the URL pattern in the web.xml file.
The only log I can see is in the access_log of tomcat where I see that the ISC_RealtimeMessaging.js is loaded correctly, but I don’t see any logs regarding the URL /nfmportal/sc/messaging/.
Did I miss something?
Thank you
We are using SmartGWT Version 5.0 Power Edition and I am testing using Chrome version 46.0.2490.86 m
I am trying to use the Real Time Messaging module to send messages from the server side to the client, but the client does not receive any message.
On the server side, everything looks good. I have included the isomorphic_js_parser.jar and isomorphic_realtime_messaging.jar into the server. Here is my code used to send the messages:
Code:
try { ISCMessageDispatcher.instance().send(new ISCMessage("59086B61-5326-491A-9D9E-0A73A04F9ABE", "test")); } catch (Exception e) { e.printStackTrace(); }
On the client side, I have tried to include the RealTime Messaging module by adding this to my .gwt.xml project file:
Code:
<inherits name="com.smartgwt.RealtimeMessaging"/>
As mentioned in the output, I have included the ISC_RealtimeMessaging.js directly into my .html file.
Code:
<script src="nfmportal/sc/modules/ISC_RealtimeMessaging.js"></script>
Code:
<servlet> <servlet-name>MessagingServlet</servlet-name> <servlet-class>com.isomorphic.messaging.MessagingServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MessagingServlet</servlet-name> <url-pattern>/nfmportal/sc/messaging/*</url-pattern> </servlet-mapping>
Code:
Messaging.subscribe("59086B61-5326-491A-9D9E-0A73A04F9ABE", new MessagingCallback() { @Override public void execute(Object data) { console.setContents(console.getContents() + (String)data); } });
Code:
Messaging.setMessagingURL("/nfmportal/sc/messaging/*")
Did I miss something?
Thank you
Comment