WillyWonka404
Programmer
I am using a web service coded in C#. There are classes and an enum type in the interface. I want to define a constant that the client can set as one of the properties of a class on the interface. It's a magic number and I want to provide it as a contant on the interface.
I added the contstant declaration to one of the classes. All the non-const properties of the class appear as class properties in the WSDL. The client can get/set them. But the constant I declare right along side the properties does not appear in the WSDL and is not accessible to the client.
Here's what the class looks like. Everything works except the constant is not available to the client.
public class MyClass
{
public int ID; //Required
public string ShippingAttentionLine;
public string ShippingAddressLine1;
public string ShippingCity;
public string ShippingState;
public string ShippingZipCode;
public int ShippingMethod;
public const int DONT_CARE = 1;
}
I added the contstant declaration to one of the classes. All the non-const properties of the class appear as class properties in the WSDL. The client can get/set them. But the constant I declare right along side the properties does not appear in the WSDL and is not accessible to the client.
Here's what the class looks like. Everything works except the constant is not available to the client.
public class MyClass
{
public int ID; //Required
public string ShippingAttentionLine;
public string ShippingAddressLine1;
public string ShippingCity;
public string ShippingState;
public string ShippingZipCode;
public int ShippingMethod;
public const int DONT_CARE = 1;
}