[jboss-user] [JBoss Seam] - GWT example: WebRemote method always returns failure

kingcu do-not-reply at jboss.com
Tue Jul 31 00:36:45 EDT 2007


This is an issue regarding @WebRemote in the seam-gwt example, running on JBoss 4.2.0 with Seam 2.0.0 B1. The GWT compilation output files are shipped with seam 2.0 under examples/remoting/gwt/view and there are 16 files, when I just run "ant deploy" (which uses the shipped GWT files). It works fine: when clicking on the "Add" button, I get the following message from the server:
42. Its the real question that you seek now.

However, if I first run "ant gwt-compile" (using the source shipped with seam 2.0 distribution), it compiles the gwt code and generates 22 files under /view. Then, after I deploy it, when I click on the "Ask" button, I got the following message:
{OK}[1,["42. Its the real question that you seek now."],0,2]

Since, in the AsyncCallback object, both onFailure() and onSuccess() call Window.alert() to display a message, to distinguish, I changed the message text:
         public void onFailure(Throwable t)
  |          {
  |             Window.alert("Failure - " + t.getMessage());
  |          }
  | 
  |          public void onSuccess(Object data)
  |          {
  |             Window.alert("Success - " + (String) data);
  |          }
  | 

Then, I get the following message:
Failure - {OK}[1,["42. Its the real question that you seek now."],0,2]

which indicates that the @WebRemote method is always returning failure. I tried both GWT 1.3.3 and GWT 1.4.10 and got the same result.

It seems to me that the gwt example source and the shipped gwt-compilation output are out-of-sync: 22 files vs. 16 files and the obviously different behavior. Can someone please clarify? Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068987#4068987

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068987



More information about the jboss-user mailing list