开发者

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
{
...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜