transfer Objects between GWT and EJB

137 views
Skip to first unread message

ph09

unread,
Dec 1, 2011, 5:01:43 PM12/1/11
to Google Web Toolkit
Hello,

I have got a question because of the architectur of my project.
At the one side there is a GWT Package with the Client Side and also a
Servlet to communicate with an EJB Project.
On the other Side there is a EJB Project with Session Beans and
Entities which schould be stored in a database and send between GWT
Client and the database. But I don't know how I can realize that. how
can I send an Object from my Session Bean to the GWT Servlet, because
the GWT Servlet don't know about the Entitities Classes.

Thats my Project Structur:

Entities + Session Bean:
http://pastebin.com/anAbCqgd

GWT Servlet:
http://pastebin.com/Ujjka9vT

I hope that it is clear where my problem is ;)

Mark

unread,
Dec 1, 2011, 8:53:03 PM12/1/11
to Google Web Toolkit
I dont know that you can do that directly. The best way I know of is
to create a pojo to represent the entity on the gwt side and then
translate back and forth between them.

German Castellar

unread,
Dec 1, 2011, 5:18:51 PM12/1/11
to google-we...@googlegroups.com
Hello, 

I found for me a very good webpage  that help me a lot with please refer to the following
link: 

Please if this help you let me know.

Remember you have to create a proxy like the one specified in the following page:


Greets,


--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


ph09

unread,
Dec 2, 2011, 5:36:27 AM12/2/11
to Google Web Toolkit
Hi,

but how should I represent the entities on my gwt Side?
When I create a Company Pojo there on the gwt side I would't anyway
not be able to transfer it.
Or you mean I should use Wrapper on the Servlet to transfer the
Entites from my EJB Project to Pojo's from the gwt side?

ph09

unread,
Dec 2, 2011, 5:41:50 AM12/2/11
to google-we...@googlegroups.com
Hi,

thank you for your answer, but this isn't my problem. I already know the links you have posted.
It wasn't a problem fpr me to send Strings between GWt client and a Session Bean and to store an entity in a database.
My problem is that I want to send Objects between GWT and EJB Project like the Example Company object above.
The communication between GWT servlet and Ejb project works fine. I can call methods and so on.

Shalin Lazar

unread,
Dec 7, 2011, 3:33:30 AM12/7/11
to google-we...@googlegroups.com
Have you tried using Web Sevices? Call web methods receiving the objects via xml?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
Reply all
Reply to author
Forward
0 new messages