Calling the web / wcf service from an orchestration: adding a generated element and adding a link to the service

If I want to call a web service or wcf method from an orchestration, I can do this by adding a link to the project in the project or by adding a generated element. What is the advantage of any approach - is there any best practice?

+4
source share
1 answer

Steef -Jan Wiggers answers a similar question here

TL DR - Always use the Generated Items wizard .

My 10c. Although the .xsd files imported by Add Service are added as a schema and installed in the BtsCompile, there are some limitations, such as:

  • Adding a link to the service will add a client proxy that is not needed in the BizTalk project (and which may “seduce” your developers to do stupid things, such as using this proxy from a custom assembly).
  • The service guide makes it difficult to import complex WSDLs (for example, using Generics or dependencies on other schemes), see Considerations When Using Web Services

Using the Add Generated Items wizard does the extra work for you:

  • Adds to a port type for accessing a service that is already preconfigured for the correct message types. Note, however, that it adds a port type to the .odx dummy - i.e. Does not remove odx until you have moved the port type elsewhere.
  • Allows you to create Send Port bindings at the same time.

One thing I would recommend using the Wizard is to create a folder for the WCF link and always import all artifacts into the folder (i.e. do not perform the usual separation of circuits from the ports and leave the dummy .odx there as well). Thus, if you need to restore items, simply delete everything in the folder and run it again (unfortunately, the wizard does not have the equivalent of the Update Service Reference .

Also note that if you move the generated schemes and port types to a separate assembly, you will need to change access to the modifier of type Public (by default it is internal)

+5
source

Source: https://habr.com/ru/post/1309008/


All Articles