WCF: DataContractAttribute and Namespace
When I auto-generate my client classes I get these attributes.
<System.Diagnosti开发者_StackOverflowcs.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="FeedStatusReport", [Namespace]:="http://schemas.datacontract.org/2004/07/OfferingSystem"), _
System.SerializableAttribute()>
On the server side, how do I change the namespace that the client sees?
Use this with your ServiceContract:
[ServiceContract(Namespace="http://someNameSpaceGoesHere/")]
public interface ISomeService
{
...
}
精彩评论