Hi all,
Per default, all data contract entities, involved in realization of service operation (and their known types, are include in service metadata. I am trying to find out, if it is possible in include other classes or data contracts in the metadata. The reason for this is that i have some enums, which can be used to fill in string fields of entities involved in service operation or, when service returns error messages, they have an identifier which I would like to "translate" or give a meaning to it without referencing some assembly form the external service.
Is such thing possible, or have someone other hints how to deal with this?
Thank to all in advance.
Ilustratory exmaple of service declaration would be something like:
[DataContract(Namespace = "http://schemas.example.com/Common/ExampleServices/V20090903")]
public enum SearchTaskField
{
[EnumMember]
Id,
[EnumMember]
Date,
...
}
[DataContract(Namespace="http://schemas.example.com/Common/ExampleServices/V20090903")]
public class SearchCondition
{
[DataMember(Name = "ColumnName")]
public virtual string ColumnName
{
get; set;
}
[DataMember(Name = "ColumnValue")]
public virtual object ColumnValue
{
get; set;
}
[DataMember(Name = "ObjectType")]
public virtual string ObjectType
{
get; set;
}
}
[ServiceContract(Namespace="http://schemas.examle.com/Common/ExamleServices/V20090903")]
public interface IExampleServiceServiceContract
{
[OperationContract(Name = "Search")]
SearchOut Search(SearchIn messageIn);
}
[MessageContract]
public class SearchIn
{
[MessageBodyMember(Name = "Conditions", Order = 1)]
public virtual IList<Condition> Conditions
{
get; set;
}
}