I don't know much about smack or XMPP, but here is what I can tell you -

Your GWT application has two distinct parts - client side code and server
side code.

Client side code ultimately gets converted to javascript, and hence there
are restrictions on what jars you can use. Jars that can be used in GWT have
the following characterstics -

   - They have the source files (*.java) alongwith the *.class files. GWT
   only understands java files and ignores the *.class files
   - They have a *.gwt.xml file
   - The java files in the jar use a subset of the java language that is
   emulated by GWT

Smack certainly doesn't meet the above conditions, because it opens network
sockets which isn't supported by GWT.

On the server side, GWT doesn't place any restrictions. You can use any jar
file - including smack if you want.

Now, if I understand your requirements, you want to initiate a XMPP
connection from the browser to the server. That is simply not possible in
plain javascript, and hence GWT cannot support it. To open arbitrary socket
connections from the browser, the user would have to install some plugin and
explicitly grant it permission to open a socket. That is definitely beyond
the scope of GWT.


--Sri


2009/10/27 Pondmouse <[email protected]>

>
> I've been trying to figure this out for days. I don't think it's
> possible. The only JARs I've seen integrated into GWT come with a pre-
> configured .gwt.xml files
>
> But saying that I haven't really found anything that says you can't
> use any external API, except for a post on
> http://forums.smartclient.com/showthread.php?t=3315,
> which says:
>
> "You cannot use any arbitrary jar in your GWT project, only those that
> are meant to be used by GWT. I'd suggest you go though the GWT docs to
> better understand how GWT works."
>
>
> On Oct 20, 11:22 am, ledzgio <[email protected]> wrote:
> > Hi to all,
> >
> > i have to integrate the smack API (xmpp messaging) within GWT but this
> > jar does not contains any .gwt.xml file..
> >
> > How can i integrate it withn GWT??
> >
> > thanks
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to