Custom Namespace messages not working

We have some custom namespace messages that don’'t seem to be coming through.

First, should this work?

Secondly, If it should, what debugging flags can I turn on so that I can figure out what is happening?

thanks,

jon

Sorry, should have added the environment.

Wildfire 3.2.0 running on RHE 4

jons,

It’'s hard to imagine what might be going wrong – routing custom namespace message is a very basic server function!

One thing you could try is the debug plugin (attached to this thread) – it prints all XMPP traffic to stdout. That will show you what’'s going on at the very least.

Regards,

Matt

After looking about for awhile, it occurred to me that the message is a custom IQ namespace message. Does this mean I need to write a custom plugin to handle it?

Are you querying the server or another user? If the server, then yes, you’‘d need to write a handler. If you’'re querying a user, then the other user will need to know how to handle it.

The exact exchange looks like

<service-unavailable xmlns=’‘urn:ietf:params:xml:ns:xmpp-stanzas’’/>

It appears that Wildfire is unhappy with the “myown” child element, and bouncing the message… Does wildfire attempt to pull in the schema? and is therefore bouncing the message? otherwise it should be passing it through to the addressed entity

from the RFC

  • If an entity receives an IQ stanza of type “get” or “set”

containing a child element qualified by a namespace it does not

understand, the entity SHOULD return an IQ stanza of type

“error” with an error condition of .

Router: If a routing entity (usually a server) handles a stanza that

contains a child element it does not understand, it SHOULD ignore

the associated XML data by passing it on untouched to the

recipient.

With some additional debugging , I have come across the following…

in IQRouter:handle, the following routine says it will bounce IQ packets with custom namespace if there is no resource in the “to”…

else

{

// JID is of the form and there exists at least one connected resource for the node, the recipient’'s server SHOULD deliver the stanza to at least one of the connected resources, according to application-specific rules (a set of delivery rules for instant messaging and presence applications is defined in (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence,” October 2004.)).

It would seem like the code should determine if there is only 1 resource and then try to deliver to that resource.

Hey Jon,

In the section 11.1.4.3 you will find the specification for IQ handling when JID is just a bare JID (i.e. with no resource).

“For IQ stanzas, the server itself MUST reply on behalf of the user with either an IQ result or an IQ error, and MUST NOT deliver the IQ stanza to any of the available resources.”

In summary, if you want your IQ packet to be delivered to a client then you should use a full JID (i.e. include a resource) in the TO attribute of the IQ. Otherwise the server will handle it. However, if you want a component to handle the IQ then you can send it to something like mycomponent.[myserver.com].

Regards,

– Gato