确定 BizTalk 2006 中消息的接收端口或位置

发布于 2024-08-19 02:02:09 字数 220 浏览 2 评论 0原文

我需要知道给定消息是通过哪个接收端口或位置接收的,方法是检查接收端口/位置的名称,或者使用名称或我可以在每个端口上定义的一些静态字符串填充上下文属性/ 我将在自定义反汇编程序中使用此信息来对消息执行一些操作,但我需要知道消息的

端口,以便我知道需要对消息执行哪些操作。我非常有信心知道如何读取这样的自定义组件中的上下文属性,但我只是不知道如何提前填充它。我无法弄清楚消息本身的任何地方是否注明了消息传入的端口。

I need to know which receive port or location a given message was received through by either examining the name of the receive port/location, or populating a context property with either the name, or with some static string that I can define on each port/location

I will use this information in a custom disassembler to do some work on the message, but i need to know which port the message so that I know what kind of work I need to do to the message. I'm pretty confident I know how to read context properties in a custom component like this, but I just can't figure out how to populate it earlier on. And I can't figure out if the port a message came in on is noted anywhere on the message itself.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江南烟雨〆相思醉 2024-08-26 02:02:09

Abhilash 的博客<上有一个很好的可用上下文属性列表< /a>.

您想要的是 ReceivePortName,因此在您的管道中您需要类似以下内容:

public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)    
{    
    IBaseMessageContext context = pInMsg.Context;
    string portName = context.Read("ReceivePortName", "http://schemas.microsoft.com/BizTalk/2003/system-properties").ToString();
}

There is a nice list of the available context properties on Abhilash's blog.

What you want is the ReceivePortName, so in your pipeline you would want something like:

public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)    
{    
    IBaseMessageContext context = pInMsg.Context;
    string portName = context.Read("ReceivePortName", "http://schemas.microsoft.com/BizTalk/2003/system-properties").ToString();
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文