Hemalatha
Hemalatha

Reputation: 1

Proxy class generated from WSDL is having CLS compliant error

I have tried to generate a proxy class from WSDL file given using .net 2003. When i tried to add this class file to my project which is in .net 2003, Its giving error in proxy class like "Identifier is not in case CLS compliant code"

What might be causing this?

Identifier 'FinancialTransactionCard.lifecycleStatus' differing only in case is not CLS-compliant

[System.Xml.Serialization.XmlElementAttribute("lifecycleStatus")]
public FinancialTransactionCardLifecycleStatus[] lifecycleStatus;

Upvotes: 0

Views: 619

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062780

CLS compliance is, in truth, rarely needed. If having this warning/error is a show-stopper, then for now turn off CLS.

From what I can pick out of the error (presumably translated), it sounds like a conflict in case; the following is not CLS compliant, for example:

public int a() {...}
public int A() {...}

for the reason that case-insensitive languages (VB.NET etc) can't use it reliably. So check your WSDL and generated code for anything that differs only by case.

A better approach, though, is to move away from .NET 1.1; Visual Studio 2003 is by virtually any measure obsolete. Later frameworks and tool fix a wide range of bugs (including security issues).

Upvotes: 1

Related Questions