我迫切需要从编排中发送规范消息 (M1),并且需要将规范消息映射到另一条消息 (M2)。生成的消息 (M2) 在发送到 Web 服务之前必须包装在另一个请求消息 (M3) 中。
我无法在编排中执行初始转换,因为我只能在内部处理规范模式。
在编排之外实现这两个阶段转换的最佳方法是什么?
提前致谢!
I have an urgent need to send a canonical message (M1) out of an orchestration and need to map the canonical message to another message (M2). The resulting message (M2) has to be Wrapped in another request message (M3) before sending it to a web service.
I can't perform the initial transform in the orchestration as I can only deal with the canonical schema internally.
Whats the best way to achieve this 2 stage transform outside of the orchestration?
Thanks in advance!
发布评论
评论(2)
您可以创建一个按顺序应用每个映射的管道组件。然后配置端口以使用此组件的管道。
然后在管道组件的 Execute 方法中:
请注意,此示例在内存中执行所有操作,因此对于大消息来说可能会出现问题。我将尝试找到一个使用流的更好的示例(或者更糟糕的情况,您可以使用 VirtualStream 来避免将所有内容保留在内存中)
You could make a pipeline component that applies each map sequentially. Then configure the port to use a pipeline with this component.
Then in the pipeline component's Execute method:
Note that this example does everything in memory so it could be a problem for large messages. I'll try to find a better example that uses streaming (or worse case, you can use VirtualStream to avoid keeping everything in memory)
如果您可以使用 ESB 工具包,理想的方法是使用行程(Richard Seroter 有一篇关于该方法的好文章 此处)。如果这不是一个选择,这是我过去使用过的方法:
http://blogs.msdn.com/b/chrisromp/archive/2008/08/06/stacking-maps-in-biztalk-server.aspx
If you can use the ESB Toolkit, the ideal approach would be to use an itinerary (Richard Seroter has a good article on that approach here). If that's not an option, here's an approach I've used in the past:
http://blogs.msdn.com/b/chrisromp/archive/2008/08/06/stacking-maps-in-biztalk-server.aspx