Friday, April 22, 2011

Re: GWT RPC - WebServiceClient

We have exact same situation and it all works. 

We use apache cxf as the communication between the GWT servlets and the API layer on another server.
When the WSDLs are created for the apache cxf, we generate a client side jar and include it in the GWT project. This allows us access to the java objects which are created on API layer side, then transmitted as XML and finally reconstructed on GWT (UI) server side.

Basically the idea is similar to generating a Java client for using your web service and then use it in your GWT servlet.

I would have shared code with you but cannot as its company code and company policy, etc.

Thank you,
Sunit Katkar




On Wed, Apr 20, 2011 at 12:17 AM, Stijn Bienkens <stijn.bienkens@k2-solutions.eu> wrote:
Hello

We are currently looking to optimize some of our GWT projects but we
ran into a few issues.

Most if not all of our data is coming from an OSGI backend.
Communication between the GWT client - GWT RPC - OSGI backend is far
from optimal as we have to write a lot of boiler plate code. To
optimize this we were thinking of including one ( or multiple)
webservices in our OSGI backend using Apache CXF.

On the GWT RPC side we implemented a webservice client using Apache
CXF 2 as well. However the real challenge we are facing is how to use
the CXF generated objects for communication between GWT client and GWT
RPC.

I've came across several posts claiming this was perfectly possible
but so far we haven't been successful.

The Apache CXF generated classes have references to JAXBElement, when
compiling this results in: "No source code is available for type
javax.xml.bind.JAXBElement<T>;"
Using the <super-source> tag we provided the source for JAXBElement,
however this results in more of the same issues for:
javax.xml.namespace.Qname, java.io.ObjectInputStream,
java.lang.ClassNotFoundException, ...

Is there anyway to accomplish this or another path we can follow?

Thank you in advance
Stijn

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


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

No comments:

Post a Comment