Is there a way to automatically remove duplicate XML namespaces from messages generated by the WCF? It seems half of the message consists of duplicate namespaces.
Here is an example generated by WCF:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header />
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http:
//www.w3.org/2001/XMLSchema">
<ResourceCreated xmlns="http://schemas.xmlsoap.org/ws/2004/09/transfer">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.g
oogle.com/abcdef</wsa:Address>
<p32:ResourceURI xmlns:p32="http://www.energiened.nl/Content/Publications/
dsmr/P32">http://www.energiened.nl/Content/Publications/dsmr/P32/meterAccess</p3
2:ResourceURI>
<p32:SelectorSet xmlns:p32="http://www.energiened.nl/Content/Publications/
dsmr/P32">
<p32:Selector p32:Name="ResourceID">MeterAccess-1</p32:Selector>
</p32:SelectorSet>
</ResourceCreated>
</s:Body>
</s:Envelope>
What I would like it to be:
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns="http://schemas.xmlsoap.org/ws/2004/09/transfer"
xmlns:p32="http://www.energiened.nl/Content/Publications/dsmr/P32">
<s:Header />
<s:Body>
<ResourceCreated>
<wsa:Address>http://www.google.com/abcdef</wsa:Address>
<p32:ResourceURI>http://www.energiened.nl/Content/Publications/dsmr/P32/meterAccess</p32:ResourceURI>
<p32:SelectorSet>
<p32:Selector p32:Name="ResourceID">MeterAccess-1</p32:Selector>
</p32:SelectorSet>
</ResourceCreated>
</s:Body>
</s:Envelope>