I'm using a third party framework which generates WCF services from a custom language. However, when using collection classes, this is the generated output:
namespace MyNameSpace
{
using System;
using System.ServiceModel;
[MessageContract]
public class FindSomethingResponse
{
[MessageBodyMember(Order=1)]
public System.Collections.Generic.List<SomethingDC> response;
}
}
This is fine, but causes some undesired results when consuming the service. This is the XSD which the above generates:
<FindSomethingResponse>
<ArrayOfSomethingDC>
<SomethingDC/>
<SomethingDC/>
<SomethingDC/>
...
</ArrayOfSomethingDC>
</FindSomethingResponse
The "group node" is called ArrayOfSomethingDC, but I would rather have it called something more meaningful (eg. "Somethings").
As far as I've found is that I have to use the CollectionDataContract attribute to name the node. However, I'm in the position I can't really change the structure of the generated class (since it's done in the third party framework), but I can only edit the above method.
Is it possible in any way?