So for your second option, would I have to put the public const String
Accepted in a class that is return by some method or can I put it in its own
class? If it's in its own class, how will wsdl know to include it in the
proxy? Or do all public const's automatically get included?
Thank you
> You can put the struct into a separate project & have both client and server
> each reference the common assembly.
> Also, the normal practice for declaring constants is to go ahead and use
> fields (one of the few places where public fields are OK):
> public const String Accepted (const is implied to be static)
Keith Patrick - 28 Feb 2007 17:10 GMT
If you're encapsulating your constants as a struct, then merely referencing
it in your project and using it in your web method will tell the WSDL to
define it. Your web client might try to make a proxy version of your struct
in the References.cs file, so you have to make sure you mark your struct
with XmlRoot("your web service's namespace") so that the code generation
tool uses the one that is already referenced by both projects instead of
creating a new one for the client