0

I am converting asmx web service to wcf while attempting to maintain backwards compatibility in the WSDL. One of the DataContract classes is generic. When the generic parameter is a built-in type, such as bool, the first letter is lowercased in WCF, whereas it was uppercased in asmx. E.g.

[Serializable]
public class MethodResult<T>
{
}

would generate

MethodResultOfBoolean

in asmx.

[DataContract(Name="MethodResultOf{0}")]
public class MethodResult<T>
{
}

generates

MethodResultOfboolean 

in WCF.

Is there a way to make it use an uppercase letter in WCF?

Scott Ure
  • 1
  • 1

1 Answers1

0

I found that adding [XmlSerializerFormatAttribute] to the ServiceContract interface fixed this.

GDP
  • 8,109
  • 6
  • 45
  • 82
Scott Ure
  • 1
  • 1