Stripped off xmlns attributes after packet parsing

Hello everybody,

I have a question regarding the Smack library (now using 4.1.4). I am using it to exchange marshalled xml information. To do so I am using JAXB for the marshalling/unmarshalling and JAXB notations. The issue I have is for nullable fields. To mark null fields, JAXB uses a tag such as : . For the marshalling and sending I have no issue, the message is properly received, which I could confirm using the debugger. The issue seems to occur after the packet has been processed. There for the same tag I get: . The problem is that JAXB does not recognize this tag as a null element and thus goes on to create an instance of the field, which is undesired.

My question is thus if this stripping of xmlns attribute is normal? Or could it be something I am doing wrong? I have looked quite thoroughly in my own code and could not see where this stripping could have occurred, and thus assumed that it might come from Smack. For now I managed a workaround by re-inserting the xsi and xmlns attributes before the unmarshalling, but I was wondering if this was a bug or an expected behavior.

Thank you in advance for any help!

–Tibo

My question is thus if this stripping of xmlns attribute is normal?
Depends on how the parser (Provider) is implemented. Are you talking about data forms?

Thank you very much for pointing me the direction to look! I am using the HOXT library and it seems like the “AbstractHttpOverXmppProvider” ignores namespaces for now (at least the comment line 200 seems to indicate that).

I think I’ll live with my workaround for now but if I have some time is it worth fixing it?