开发者

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

开发者 https://www.devze.com 2023-01-08 23:58 出处:网络
I\'ve tried adding the appSetting \"NameSpace\" to my publisher and subscriber but the messages still contain the namespace http://tempuri.org/...

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

精彩评论

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