Here is my interface
[ServiceContract(Namespace = "")]
interface IParam { }
Here is my class
public class Parameter : IParam
{
private string categoryName;
[DataMember]
public string CategoryName
{
get { return categoryName; }
set { categoryName = value; }
}
}
My operation contact is
[OperationContract]
string GetSegmentsByCategoryName(Parameter Params);
Here is my main:
Parameter abc = new Parameter ();
abc.CategoryName = "xxx";
str = client.Channel.GetSegmentsByCategoryName(abc);
when I check at wireshark i got this xml
<Params xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CategoryName>
xxx
</CategoryName>
</Params>
i one to get rid of xmlns:i="http://www.w3.org/2001/XMLSchema-instance when I pass the object through wcf httpbinding.