In the server I have this code:
public enum EnumFilter
{
True = 0,
False = 1,
All = 2
}
public class FiltroSeguroRequest
{
public EnumFilter Vigentes { get; set; }
}
In the client I make an object literal to send as parameter in an ajax call with a POST to an ASMX Web Service:
this.request = { Vigentes: 2 };
As you can see i’m passing and integer to the Enum so at the server is transformed to an enum… but it doesn’t work, cause is converted to a Boolean instead.
WSDL declaration for your enum should look like this:
So, if you want to call it from javascript, your request should be: