Hello, I'm using a gwt application and I have a problem when I send pojo from core module (not client package) to server side. Indeed, when I send any pojo with properties, in server side, all properties become null... Here is the configuration and the package I use :
core.lib -> librairies core.src.java.core.datamodel -> all Pojos core.src.java.core.dao -> all dao web.lib -> librairies used for gxt, gilead... web.src.java.web.client -> some classes of gxt web.src.java.web.server -> server classes web.src.resources.web -> gwt.xml file : Here is the gwt.xml file [code] <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0// EN" "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro- source/core/src/gwt-module.dtd"> <module rename-to="argf"> <!-- Inherit the core Web Toolkit stuff. --> <inherits name[code] <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0// EN" "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro- source/core/src/gwt-module.dtd"> <module rename-to="argf"> <!-- Inherit the core Web Toolkit stuff. --> <inherits name='com.google.gwt.user.User'/> <inherits name="com.google.gwt.i18n.I18N"/> <inherits name="com.google.gwt.http.HTTP"/> <inherits name="core"/> <!-- Definition following --> <!-- Inherit GXT --> <inherits name='com.extjs.gxt.ui.GXT'/> <!-- Specify the app entry point class. --> <entry-point class='web.client.ARGF'/> <!-- packages to convert into JavaScript --> <source path='client'/> <!-- specify user-agent --> <set-property name="user.agent" value="gecko1_8"/> </module> [/code] In web.src.resources, we can find core.gwt.xml, defining bind with pojo : [code] <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0// EN" "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro- source/core/src/gwt-module.dtd"> <module> <-source path='core/datamodel'/> <set-property name="user.agent" value="gecko1_8"/> </module> [/code] web.web.WEB-INF -> web.xml, applicationContext.xml, handler- servlet.xml Here is my web.xml [code] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http:// java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="ht[code] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <!-- Spring context --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:/spring-config-web.xml classpath:dao-config-test.xml /WEB-INF/handler-servlet.xml /WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</ listener-class> </listener> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</ listener-class> </listener> <servlet> <servlet-name>handler</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</ servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>handler</servlet-name> <url-pattern>/argf/service/*</url-pattern> </servlet-mapping> </web-app> [/code] And here is my handler-servlet [code] <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http:// www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/ schema/p" xmlns:context="http://www.springframework.org/schema/ context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <bean id="urlMapping[code] <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <map> <entry key="/iprw" value-ref="iprwServiceExporter"/> </map> </property> </bean> <bean id="iprwServiceExporter" class="org.gwtwidgets.server.spring.GWTRPCServiceExporter"> <property name="service" ref="iPrwService"/> <property name="serviceInterfaces" value="web.client.ARGFService"/> </bean> </beans> [/code] I don't put exactly the complete path of package. The fact is that, if I put my datamodel in web.client, everything works and my pojos are correctly transfered. But I want to have no dependencies between datamodel and gwt, so I prefere use a core package independant... Regards, Emeric -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.