incorrect soap message format

When mendix uses the Domian to xml mapping to create a soap message the format of the message is not exactly as it should be the message that mendix generates looks as the following <soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""> <soapenv:Header> <ns1:Security xmlns:ns1=""> <ns1:UsernameToken"UsernameToken-0000"> <ns1:Username>username</ns1:Username> <ns1:Password Type="">password</ns1:Password> <ns1:Nonce EncodingType="">PKpZ50jd</ns1:Nonce> <ns2:Created xmlns:ns2="">2016-03-6603:43:33+0000</ns2:Created> </ns1:UsernameToken> </ns1:Security> </soapenv:Header> while in reality it should look like the following <soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""> <soapenv:Header> <wsse:Security xmlns:wsse="" xmlns:wsu=""> <wsse:UsernameToken wsu:Id="UsernameToken-0000"> <wsse:Username>username</wsse:Username> <wsse:Password Type="">password</wsse:Password> <wsse:Nonce EncodingType="">PKpZ50jd</wsse:Nonce> <wsu:Created>2016-03-03T08:50:37Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> the domain to xml mapping is based from a consumed webservice that is imported trough a wsdl file how can I make mendix generate namespaces prefixes that match wsse and wsu instead of ns1 and ns2 how can I include the wsu namespace definition in security tag?
1 answers

In the webservice call action select the custom option on the request header tab. Then select the insert template option WS Security User Name Token and your header will look like:

<wsse:Security xmlns:wsse="">

Almost what you need add the additional tag and the namespace declaration in the template and map the variables in the parameters section and you should get the required structure in your webservice header when calling the webservice.

If the template isn't completely what you need then just write the header manually and add the needed parameters and you have the same results.