开发者

How do you change the namespace of the serialized message in NServiceBus

I've tried adding the appSetting "NameSpace" to my publisher and subscriber but the messages still contain the namespace http://tempuri.org/...

[Edit]

In the publisher EndpointConfig I have added:

public class ServerInit : IWantCustomInitialization
{
    public void Init()
    {
        Configure.With().XmlSerializer("http://foo.com");
    }
}

This works but I would rather see this in the开发者_开发知识库 config file. Please let me know if anyone can suggest a way to do this.


Just put that in your app settings and pull it using the .net configuration manager.


Thanks Udi, I noticed that the distributor reads this from the appSettings already, just wondered why the others don't.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜