简体   繁体   English

如何在BizTalk 2013中配置/使用Web服务

[英]How to configure / consume a web service in BizTalk 2013

I need some help in integrating web services into Biztalk 2013 在将Web服务集成到Biztalk 2013中时,我需要一些帮助

Scenario is, we have several existing Web services which need to be configured in BizTalk 2013. From now onwards the consumer will access the webservices from Biztalk in stead of original URl. 场景是,我们有几个现有的Web服务,需要在BizTalk 2013中进行配置。从现在起,消费者将可以从Biztalk代替原始的URl访问Web服务。

Can anyone share a step-by-step guide for doing this? 任何人都可以分享此操作的分步指南吗?

Steef -Jan Wiggers answers a similar question, please have a look , Using services in BizTalk Steef -Jan Wiggers回答了类似的问题,请看看, 在BizTalk中使用服务

Although the .xsd files imported by Add Service is added as a schema and set to BtsCompile, there are some limitations such as: 尽管通过添加服务导入的.xsd文件被添加为架构并设置为BtsCompile,但是存在一些限制,例如:

Add Service Reference will add the client proxy, which isn't needed in a BizTalk project (and which might 'tempt' your devs to do silly things like using this proxy from a Custom assembly) Service Reference makes a mess of importing complicated WSDL (eg with Generics or dependencies on other Schemas), See Considerations when consuming Web Services Using the Add Generated Items wizard does extra work for you: 添加服务参考将添加客户端代理,这在BizTalk项目中是不需要的(并且可能会“诱使”您的开发人员做一些愚蠢的事情,例如使用来自自定义程序集的此代理)。服务参考使导入复杂的WSDL变得一团糟(例如,具有泛型或其他架构上的依赖项),请参阅使用Web服务时的注意事项。使用“ 添加已生成的项目”向导可以为您完成额外的工作:

Adds in a Port Type for accessing the service, already preconfigured for the correct message types. 添加用于访问服务的端口类型,该端口类型已经为正确的消息类型进行了预配置。 Note however that it adds the Port type to a dummy .odx - ie don't delete the odx until you've moved the Port type elsewhere. 但是请注意,它将端口类型添加到虚拟.odx中-即,除非将端口类型移至其他位置,否则不要删除odx。 Allow you to create the Send Port bindings at the same time. 允许您同时创建发送端口绑定。 One thing I would recommend with the Wizard, is to create a folder for the WCF reference and always import all the artifacts into the folder (ie don't do the usual separation of Schemas from Ports and leave the dummy .odx there as well). 我会向向导建议的一件事是为WCF参考创建一个文件夹,并始终将所有工件导入到该文件夹​​中(即,不要将模式与端口进行通常的分离,也要在其中保留虚拟.odx) 。 This way, if you need to regenerate the items, just delete everything in the folder and start again (sadly, the wizard doesn't have a Update Service Reference equivalent. 这样,如果您需要重新生成项目,则只需删除文件夹中的所有内容,然后重新启动即可(遗憾的是,该向导没有等效的Update Service Reference。

Also note that if you do move the generated Schemas and Port Types into a separate assembly, that you will need to change the type modifier access to Public (it is internal by default) 还要注意,如果确实将生成的模式和端口类型移动到单独的程序集中,则需要将类型修改器访问权限更改为“公共”(默认情况下是内部的)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM