Namespace prefix configuration

Hi,

In our application we are seeing some problems on failover in relation to the way we read XMPP messages from Ejabberd. Our application is written in Java and we unmarshall these messages using the Java Unmarshaller. It had been working until recently, it seems there was a bug in the Java Unmarshaller which meant it was possible to unmarshall XML where the parent namespace is QUALIFIED but the child element is UNQUALIFED. This “bug” has been fixed in the latest version of Java but this fix now breaks our application.

Below is a sample message:

<message xmlns="jabber:client" from='abc@conference.localhost' to='admin@localhost/3946725751441204183195000'>
    <fin xmlns='urn:xmpp:mam:0' queryid='f27' complete='true'>
        <set xmlns='http://jabber.org/protocol/rsm'>
            {"type":"agentMsg","sentTime":1474983843695,"message":"I haven't forgotten about you.","roomProfile":{"type":"agent","displayName":"Eddie","agentId":4,"logonId":"1002"},"messageType":"COMFORTMESSAGE"}
        </set>
    </fin>
</message>

My questions are
1) Why are namespace prefix different within XMPP messages sent by ejabberd? Can this be configured?
2) Can ejabberd be configured to have no namespace prefix?
3) What are the recommended method of unmarshalling messages sent by ejabberd? I’m currently looking at alternatives to using the basic java unmarshaller.

Thanks

1. Let's see if I understood

1. Let's see if I understood the question...
Well, the Message element follows https://xmpp.org/rfcs/rfc3921.html#stanzas which mentions jabber:client,

Then the Fin element uses the NS defined by https://xmpp.org/extensions/xep-0313.html

And the Set namespace follows the definition of https://xmpp.org/extensions/xep-0059.html

Why each namespace looks different to the others? Due to historial reasons, I guess.

2. I doubt it would be configurable

Syndicate content