The generator creates Account_Gen and makes it available as Javascript to
your client side. But it isn't available to the RPC Servlet, so it cant't
deserialize the incoming request.

You could pass the -gen parameter to GWTC, pick up the generated
Account_Gen.java file, compile it to .class and place it along with your
server code. Hopefully, that would get things working.

--Sri


2009/11/18 Dennis Z Jiang <[email protected]>

> I have a simple GWT generator module that generates a class that
> extends the requested class and overrides one method on the super
> class.
>
> For example, if the requested class is:
>    public class Account {...}
> The generated class will look like:
>    public class Account_Gen extends Account {...}
>
> On the client code, I can create an instance of the Account_Gen object
> with the following code.
>    Account account = GWT.create(Account.class);
> I can verify that the created object is indeed an instance of
> Account_Gen by watching the object through the debugger.
>
> Now, I try to pass the object to the server, as I have a service that
> takes an Account object as parameter:
>        String greetServer(Account name);
>
>
> I was expecting that, since the parameter defined on the service is
> the super class, an instance of a derived class could be used as the
> actually argument with no problem. However, I am getting an RPC error
> message that reads as if there was a network problem. "An error
> occurred while attempting to contact the server. Please check your
> network connection and try again."
>
> Neither the host mode server window nor the Eclipse console provides
> any additional information of the error.
>
> Any idea why this is happening? Thanks.
>
> Below is the client code:
>                                Account account = GWT.create(Account.class);
>
>                                account.setId(textToServer);
>
>                                greetingService.greetServer(account,
>
>                                                new AsyncCallback<String>()
> {...
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=.


Reply via email to