Also see this question here , which discusses the third option, namely: add service reference in BizTalk as an alternative XSD import method.
IMO, you would defeat BizTalk's point of use by using .NET proxies to handle integration. For instance:
- You hardcode the protocol (WCF), and now you need to marshal requests and response messages to / from your user code. Using the send port, any request-response mechanism can be configured during deployment β especially useful for installation and test integration.
- You will lose all the benefits of BizTalk message delivery mechanisms, such as retries, standby transports, resumed paused messages, different maps for different ports, and possibly the entire collection of pubs (for example, what if several listeners want to listen to answers from called web services? )
- Where will you store WCF
serviceModel configuration serviceModel , such as endpoint, etc.? those. You have lost the flexibility of linking files.
So TL; DR Always use WCF adapters in BizTalk
However, I agree that updating the generated items occurs if the consumed service changes can be messy. FWIW, we soften this a bit:
- Always create a separate empty folder into which you want to import all imported artifacts.
- Leave all the generated elements βas isβ, that is, do not try to move the dummy .odx or delete it (since it has pre-configured port types).
Unfortunately, this leaves the following actions that still need to be applied manually:
- Remember to change the port types to
public if the artifacts are in a separate assembly for your orchestrations - The advanced and highlighted properties of imported circuits must be reapplied (for example, remember to print screen shots after any changes). Perhaps this can be simplified or automated by saving and re-pasting in the
<xs:annotation> section of the shift. - If you use messaging contracts in your WCF service and reuse the same referenced messages in multiple applications, you need to manually remove duplicates created by adding the generated elements, and then re-link to existing schemas. (for example, we have a standard response message to all BizTalk calls)
source share