Examples for external components?

Are there any examples for developing external components? Or a general description what is possible with external components?

Hey Michael,

Whack is our library for external components. You can get the source code from here. We include a weather external component as an example.

External components are transparent to people that want to use a service in an XMPP server. Lets say that a server’s domain is example.com and you connect the weather example, included in Whack, to the server. The weather external component will use the address weather.example.com. That means that any packet sent to weather.example.com will be redirected by the server to the external component. The external component will process the packet and send back a reply to the user.

Regards,

– Gato

Hi.

I am trying the weather external component with openfire 3.5.1. Running the example i get:

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

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

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

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

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

what’s happening?

Hey serxio,

External components use a different port than clients or servers. Make sure to connect to the external components port as shown in the admin console.

Regards,

– Gato

You are right!

My openfire have the External Components Service disabled and i was connecting to the client’s port

Thanks!