Question

When using the consume WCF / generated items wizard, items generated include the schemas, bindings and also an ODX containing Port Type definitions to consume the service.

And it is common / good practice to separate schemas from orchestrations into separate assemblies.

However, in the case of WCF generated artifacts the effort to separating these is considerable, as each Port Type must then be edited to point to the reference assembly - this can be cumbersome with a Service with many operations (and a request / response for each). And this gets worse if the WCF service changes and needs to be regenerated.

So, if I may ask:

  1. What do you do consider best practice here? I am leaning toward keeping the Port types and dummy ODX's in the Schema assembly.
  2. Do you move the Generated Port Types out of the dummy ODX generated and then delete the Dummy ODX's?

Thanks!

Was it helpful?

Solution

I thing you're trying too hard.

What I would do is have the service reference of the consumed WCF service in an orchestration of its own (without any logic). Just a plain bare orchestration with only the port types defined there. This orchestration can then be in a separate assembly.

That way, you can reference this orchestration from other projects.

You should not try to separate the generated schemas from the port types. These are inextricably linked anyway because they are all, collectively, part of the "service contract".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top