Mendix deletes namespaces from SOAP, how to force them?

0
I've got the below necessary SOAP header code and Mendix itself is messing with it ‘automagically’. The external API I'm talking to requires to have the same namespace be declared in the <header>, as well as the <BerichtHeaderSE>. It seems Mendix is thinking something like “Hey, that namespace is already declared. Let's minify it by removing that unnecessary piece of namespace”.  However, as the API really requires it, I'm not able to succesfully communicate with the API. Is there a way to force my SOAP header as I write it, instead of how Mendix formats it? For the record, when changing the duplicate namespace in BerichtHeaderSE by adding a random character, it differentiates them and allows both. So it seems it's removed, because it's the same one,,   <Header xmlns="http://www.nvvk.nl"> <BerichtHeaderSE xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.nvvk.nl"> <Referentienummer>{1}</Referentienummer> <CrossReferentienummer>{2}</CrossReferentienummer> </BerichtHeaderSE> </Header>  
asked
1 answers
1

I feel your frustration. When you use a template to construct the XML contents, Mendix should not mess with it. Sadly it does. I consider this a bug in Mendix and it means that you simply cannot conform to the API-requirements without using your own Java action to make the call to the external system.

Having said that; this is definitely an issue on the receiving side here. You are sending valid XML and the receiving system is unable to parse it. This is usually because they are using some hacked-together code to parse the XML.

Your best course of action to insist that the external system is going to accept what is a valid SOAP message.

answered