External Components problem

Hi all,

I have tried the external component example of weather. When I execute the the ExternalWeatherComponent, I have the following errors


org.xmpp.component.ComponentException: bad-namespace-prefix

at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:191)

at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:174)

at org.jivesoftware.weather.ExternalWeatherComponent.main(ExternalWeatherComponent .java:37)

org.xmpp.component.ComponentException: bad-namespace-prefix

at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:191)

at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:174)

at org.jivesoftware.weather.ExternalWeatherComponent.main(ExternalWeatherComponent .java:37)


When I logged to the Wildfire admin console, It has the following error display:


2006.05.08 18:06:27 [org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:161)

] Connection closed before session established

Socket[addr=/192.168.1.189,port=1436,localport=5222]


I’'m using the Wildfire Version 2.6.2 and jdk1.5.0_04

Am I missing something?

Hey brianywh,

Are you trying to use port 5222 (default port for clients) to connect external components? External components need to connect to their own port. Log into the admin console and click on “External Components” to configure the port and shared secret to use. You will then need to configure ExternalComponentManager with the correct shared secret and use the correct port in ExternalComponent#connect.

Regards,

– Gato

Hi,

Thank you for your solution first.

The solution is OK for me to connect to the server, but as I want to send message to the External Component from Jive Server, how does it works?

Do you have any example and tutorial for newbie about the communication between Jive Server and External Component?

I’'m very appreciate for your answer.

Thx.

– Brian

Hey Brian,

External components have their own JID. That means that any other entity (including the server) may send packets to the external component just by setting the TO attribute with the JID of the external component. Moreover, external components that support service discovery will be listed in the disco#items result. That means that anyone that performs a service discovery (disco#items) on the server will be able to find the external component’'s JID and use that info to send packets to the external component.

Regards,

– Gato

Gato,

Thanks your helpful information

Brian