WCF : namespace of datamember different than parent

893 Views Asked by At

We have to implement a provided external API. This API cannot be changed. For this API, SOAP messages are exchanged, and one of them dealing with fault exception is like that :

<h:Parent xmlns:h="namespace1">
    <Member xmlns="namespace2">0</Member>
</h:Parent>

While we can implement this with other frameworks such as asmx, we do not succeed in doing it in WCF : data member seems to have the same namespace as the datacontract. Is there a way to add a namespace for datamember ?

Thanks a lot

1

There are 1 best solutions below

5
vc 74 On

You can change the namespace associated to the Member data contract using the Namespace property.