在 BizTalk 2006 R2 中使用 WCF 服务

发布于 2024-07-07 11:01:30 字数 129 浏览 12 评论 0原文

我试图弄清楚如何在 BizTalk 2006 R2 中使用 WCF 服务(发送请求并接收响应)。

我已经完成了“添加生成的项目”向导。 现在我试图找出如何在编排中使用它生成的项目。

应该如何提出请求?

I'm trying to figure out how to consume a WCF service in BizTalk 2006 R2 (sending a request and receiving a response).

I've gotten as far as going through the "Add Generated Items" wizard. Now I am trying to find out how to use the items it generated in an orchestration.

How should the request be made?

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

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

发布评论

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

评论(3

最好是你 2024-07-14 11:01:30

下面是如何执行此操作的描述 - 我将假设至少具备 BizTalk 映射等内容的基本知识,如果您需要更多详细信息,请告诉我,我会更新。

在 BizTalk 中生成项目后,您应该(至少):

  • 一个创建了消息和端口类型的编排文件
  • 一个描述您从 WCF 服务发送和接收的消息的架构
  • 一个 .Binding.xml 文件描述 WCF 服务公开的服务契约,并允许在 BizTalk 中轻松配置

    1. 打开编排文件。 这应该是空的。
  • 将端口从工具箱拖到业务流程设计器界面。

  • 适当地命名端口。
  • 选择“使用现有端口类型” - 现有端口类型之一将是您的 WCF 服务(由“添加生成项”向导创建)
  • 指定您将发送和接收消息
  • 指定稍后绑定

该端口应具有请求和响应操作消息它们应该已自动配置为使用 WCF 服务的消息。 如果您的服务公开多个操作,您将看到此处反映出来。

  1. 使用标准 BizTalk 映射方法,将要发送到 WCF 服务的数据映射到 WCF 端口的请求消息中。 (您可能希望在编排设计器中将消息名称更改为比默认的 message_1、message_2...更好的名称)

  2. 将“接收”和“发送”形状拖到编排设计器上,并将它们连接到正确的端口消息。

  3. 连接 BizTalk 编排的其余部分以从适当的源系统获取数据(这只是基本的 BizTalk,而不是 WCF)

  4. 部署 BizTalk 应用程序。

    应用程序现已准备就绪,您可以将其部署到 BizTalk。

  5. 配置 BizTalk 应用程序

    • 打开 BizTalk Server 2006 管理控制台并找到包含刚刚部署的业务流程的应用程序。
    • 编排将被取消登记,您需要绑定其所有端口
      对于大多数端口来说,这就像任何其他 BizTalk 应用程序一样 - 只是处理 WCF 服务的端口有所不同。

对于 WCF 端口,您有(至少在开始时)两个主要选项:

  1. 导入由 BizTalk 生成项目向导创建的绑定文件(右键单击应用程序并导入 - 导航到 .xml 绑定文件) - 也许建议您这样做了解 Biztalk 如何表示所有 WCF 绑定选项。
  2. 配置您自己的 WCF 发送端口。

    • 为此,端口需要是请求响应以匹配 WCF 服务。
    • 选择一种 WCF 发送端口类型以匹配您的 WCF 服务的绑定类型。
      首先(对于基本的 Web 服务),这通常是 WCF-BasicHttp。
      一旦掌握了基础知识,您可能想返回此处并尝试自定义绑定中可用的选项 - 那里有很多!
    • 配置发送端口。

现在创建了 WCF 端口,您可以绑定编排端口。

完成所有这些后,您应该能够启动 BizTalk 应用程序并且一切正常。

可能有帮助的一件事 - 错误将被写入事件日志,它们可能没有帮助,但您还应该能够在挂起的消息视图中看到从服务返回的任何肥皂故障消息。

祝你好运!

Below is a description of how to do this - I'm going to presume at least basic knowledge of things like BizTalk mapping, please let me know if you need any more detail and I'll update.

After generating the items in BizTalk you should have (at the least):

  • An orchestration file with Messages and Port Types created
  • A schema that describes the messages you send and receive from and to your WCF service
  • A .Binding.xml file that describes the service contract exposed by the WCF service and allows easy configuration in BizTalk

    1. Open the orchestration file. This should be empty.
  • Drag a Port from the toolbox onto the orchestration designer surface.

  • Name the port appropriately.
  • Select "Use an existing Port Type" - one of the existing port types will be your WCF service (created by the Add Generated Items wizard)
  • Specify that you will be sending and receiving messages
  • Specify Bind Later

This port should have Request and Response operation messages and they should have been automatically configured to use the messages for your WCF service. If your service exposes multiple operations, you will see that reflected here.

  1. Using standard BizTalk mapping methods, map the data you want to send to the WCF service into the request message for the WCf port. (you may want the change the message names in the orchestration designer to be something better than the default message_1, message_2...)

  2. Drag Receive and Send shapes onto the orchestration designer and connect them to the right Port messages.

  3. Wire up the rest of the BizTalk orchestration to take data from appropriate source systems (this is just basic BizTalk, not WCF)

  4. Deploy the BizTalk application.

    The application is now ready to go, you can deploy it to BizTalk.

  5. Configure the BizTalk application

    • Open the BizTalk Server 2006 Administration Console and find the application containing the orchestration you just deployed.
    • The orchestraion will be unenlisted, you need to bind all of its ports
      For most of the ports this is just like any other BizTalk application - only the ports that deal with the WCF service differ.

For the WCF ports you have (at least to begin with) two main options:

  1. Import the bindings file made by the BizTalk Generate Items wizard (right click on the applicaiton and import - navigate to the .xml binding file) - Perhaps advisable until you have an idea of how Biztalk represents all the WCF binding options.
  2. Configure your own WCF send port.

    • For this the port needs to be Solicit-Response to match the WCF service.
    • Choose one of the WCF Send Port types to match the binding type of your WCF service.
      To begin with (for a basic Webservice) this will often be WCF-BasicHttp.
      Once you have the basics working you might want to return here and experiment with the options available in the Custom binding - there is a LOT there!
    • Configure the send port.

With your WCF port now created you can bind the orchestration ports to it.

Once all this is done, you should be able to start the BizTalk application and things should work.

One thing that may help - errors will be written to the event log, they may not be helpful, but you should also be able to see any soap fault messages returned from the service in the suspended message view.

Good luck!

多情出卖 2024-07-14 11:01:30

如果您只是使用 BizTalk 来编排 WCF 服务,那么 BizTalk 就显得有些过分了。 您可以更轻松地在 Windows Workflow Foundation 内的 .NET 3.5 中使用 WCF 服务。

也就是说,这里的截屏视频应该有所帮助:

http://www.pluralsight.com/community/blogs/aaron/archive/2007/11/15/49172.aspx

BizTalk is overkill if you are just using it to orchestrate WCF services. You can use WCF services in .NET 3.5 inside of Windows Workflow Foundation a bit more easily.

That said, here is a screencast that should help:

http://www.pluralsight.com/community/blogs/aaron/archive/2007/11/15/49172.aspx

等风来 2024-07-14 11:01:30

与BizTalk中的其他Service开发一样,非常简单。 让事情变得更简单。

  1. 只需开发您想要的工作流程(编排)和服务。
  2. 打开 WCF Web 发布向导并检查 (a) 启用元数据端点,(b) 在您的应用程序中创建 BizTalk 接收位置。
  3. 转到 BizTalk 控制台并启用接收位置并从 Biztalk 控制台启动应用程序。
  4. 然后从 IE 或 Fire Fox 浏览它以检查服务是否正在运行。
    目前服务已开发完成。 让我们为它的客户做点什么。
  5. 转到 Patah“c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\”并写入 SVCUTL 和您的服务的 url,即 c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\ svcutil localhost:axix//axx.svx?wsdl,这将复制两个文件,一个是output.config,另一个是BizTalkServiceInstance。 将这两个文件剪切并粘贴到您的 ciletn 中,然后查看您的服务 desp 的使用情况。
    我认为这是我尝试做的最简单的。
    谢谢
    阿卜杜勒·阿齐兹·法鲁奇。

Its is very simple as other Service development in BizTalk. Let make it more simpler.

  1. Just Develop you desire Work Flow (Orchestration) and Service.
  2. Open WCF Web publishing Wizard and Check (a) Enable Metadata Endpoint , (b) Create BizTalk Receive Location in the in ur application.
  3. Go to you BizTalk console and Enable the Receive location and Start your Application from Biztalk Console.
  4. Then Browse it from IE or Fire Fox to check that either Service is running or Not.
    Now Service has been Develop. Lets do something for its Client.
  5. Go to the Patah "c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\" and Write SVCUTL and your url of your service i.e. c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\svcutil localhost:axix//axx.svx?wsdl, this will copy the two files, one is output.config and other is BizTalkServiceInstance. cut and paste both files to your ciletn and then See you service desp for its consumption.
    I Think this is the most simplest which i tried to make.
    Thanks
    Abdul Aziz Farooqi.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文