I am using WCF OperationContract, which takes an array of integers as an argument. It uses basicHttpBinding.
I noticed that the SOAP generated from the client generated by Visual Studio "Add Web Link" includes xmlns like this:
<ids>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">100</string>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">101</string>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">102</string>
... etc
</ids>
This will increase the size of the serialized stream with large arrays. Is there any way to eliminate this xmlns attribute?
For the WCF client, the generated SOAP is more like what I expect:
<ids xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:string>100</a:string>
<a:string>101</a:string>
<a:string>102</a:string>
... etc..
</ids>
source
share