Hi Christiano,
I believe the easiest thing to do would be to use
c4bizconsulting@xxxxxxxxx instead of c4bizconsulting@xxxxxxxxxxxxxx
as the sender account/connectID.
The provider connection logic (see ECFConnection.connect code here
[1]) does support having overriding hosts...but the connect ID
syntax has to include the other overriding host...e.g.
// Check for the URI form of "joe@xxxxxxxxxx;talk.google.com", which
// would at this point would have
// - username = "joe"
// - hostname = "blogs.org;talk.google.com"
// - hostnameOverride = null
//
// We need to turn this into:
// - username = "joe"
// - hostname = "bloggs.org"
// - hostnameOverride = "talk.google.com"
So I believe you could use params of
ChatRobotApplication c4bizconsulting@xxxxxxxxxxxxxx;talk.google.com
xxxxxxxx cvgaviao@xxxxxxxxx
to explicitly set things to use the talk.google.com service...as you
do in your Smack code below. Although if I understand the
relationship between googlemail and gmail correctly I believe just
using c4bizconsulting@xxxxxxxxx should work.
If things still don't work for googlmail/gmail, then you can see
what's happening with ECFConnection.connect [1]...and if it's not
supporting your use case then please open an enhancement
request...and ideally contribute a patch/fix to the
ECFConnection.connect logic.
Thanks,
Scott
[1]
http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/smack/ECFConnection.java
On 7/27/2011 6:09 AM, Cristiano Gavião wrote:
Hi ECF
people,
I'm learning ECF and now I'm trying to use ChatRobotApplication.
I've change the the launcher args to this:
c4bizconsulting@xxxxxxxxxxxxxx xxxxxxxx cvgaviao@xxxxxxxxx Hi, ECF
Robot is sending you a message
But I'm getting this error :
!ENTRY org.eclipse.osgi 4 0 2011-07-27 08:34:52.235
!MESSAGE Application error
!STACK 1
org.eclipse.ecf.core.ContainerConnectException: Login attempt
failed
at
org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.connect(ECFConnection.java:249)
at
org.eclipse.ecf.provider.generic.ClientSOContainer.connect(ClientSOContainer.java:145)
at
org.eclipse.ecf.provider.xmpp.XMPPContainer.connect(XMPPContainer.java:218)
at
org.eclipse.ecf.example.clients.XMPPChatClient.doConnect(XMPPChatClient.java:102)
at
org.eclipse.ecf.example.clients.XMPPChatClient.connect(XMPPChatClient.java:95)
at
org.eclipse.ecf.example.clients.applications.ChatRobotApplication.start(ChatRobotApplication.java:53)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: SASL authentication failed using mechanism PLAIN:
at
org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:325)
at
org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
at
org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.connect(ECFConnection.java:244)
... 18 more
I've created a little plugin to test the connection using the
bundle org.jivesoftware.smack from ECF source and I'm connecting
successfully with this code:
public void start(BundleContext context) throws Exception {
System.out.println("Hello World!!");
ConnectionConfiguration cc = new
ConnectionConfiguration("talk.google.com", 5222, "gmail.com");
XMPPConnection connection = new XMPPConnection(cc);
try {
connection.connect();
// You have to put this code before you login
SASLAuthentication.supportSASLMechanism("PLAIN", 0);
// You have to specify your gmail addres WITH
@gmail.com at the end
connection.login("c4bizconsulting@xxxxxxxxx",
"xxxxxxxx", "resource");
// See if you are authenticated
System.out.println(connection.isAuthenticated());
} catch (XMPPException e1) {
e1.printStackTrace();
}
}
Am I missing something?
thanks for any tip
cheers
Cristiano
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev
|