I apologize it has taken so long for me to post this, but as promised, here is the .cs file for the wsdl flattener.
FlatWSDL.cs (10.75 kb)
To use it, you need to modify your web config and add a reference to the library in the behavior extensions section:
(YOUR ACTUAL ENTRIES MAY VARY)
<add name="FlatWSDL" type="SteverB.Services.Extensions.FlattenWsdlBehavior, SteverB.Services.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=[something]" />
And then to turn it on, modify the service behavior by adding the <FlatWSDL /> tag:
I hope that helps someone!