PDA

View Full Version : Including Non-GWT Libraries



LINEMAN78
22 Jan 2009, 12:43 PM
Ok, I know this is not a GXT specific question, but I have run into this problem several times. I have created a library that is our Bean library generated by JAX-WS from an XSD. I am writing a servlet that will do all of the Session Bean handling. I want to use the JAX-WS generated objects instead of having to create my own objects that are esentially clones of the generated objects. The objects are all Serializable POJOs and I have built the jar to include the source files. The compiler keeps yelling at me to include a module in the *.gwt.xml and says it cannot find the source code. Is there some sort of notation that can be added to the gwt.xml to tell it where to find POJO source?

gslender
22 Jan 2009, 1:13 PM
yep,

<source="/path"/>

you'll need to include the default client.package

LINEMAN78
22 Jan 2009, 1:30 PM
yep,

<source="/path"/>

you'll need to include the default client.package


I saw that, but how do you do it if their packages are not the same?


For example:

com.foo.testapp.MyApp.MyApp.gwt.xml

referencing

com.bar.pojos.MyPojo.java
My understanding of the source tag is that it requires the same base package as the gwt.xml file.

gslender
22 Jan 2009, 2:06 PM
create another gwt module at com.bar.pojos and include/inherit that in your com.foo.testapp.MyApp.MyApp.gwt.xml

LINEMAN78
22 Jan 2009, 2:26 PM
I did something similar... I a file MyPojos.gwt.xml that included <source path="pojos"/> and added a target in my build.xml that updated the jar and inserted the file under com.bar

Unfortunately, the library was useless for me because it included objects not available under GWT like BigInteger, but it is nice to know how to do it, although it would be nice if there was an easier way to do this in the future.

Thanks for your help.