What is the advantage of the WCF client if I can use the Webservices 2.0 client just as well?

Recently, several WCF services were introduced to our API company. There are implementation examples for Windows that use proxy codes created by Visual Studio 2010 (either a full WCF client or Silverlight code). Everyone looks good.

Then I realized that it is also possible to let Studio generate a Webservices 2.0 client proxy and what can I say:

  • It works as well as a WCF client
  • It also returns real objects, like WCF
  • It also uses SOAP

What the hell is the difference / advantage of the WCF native client?

Please note that I am particularly interested in the CLIENT PARTY. The server side is a completely different story. The point is, why should I connect to the WCF server using the WCF client code if the Web Services client code works so well?

I can also ask a question regarding MONO: WCF support in Mono is far from ideal, and WebServices 2.0 are very good. Therefore, after a fight with WCF, for some time I switched to the WS 2.0 client proxy server and still have not noticed any problems. Are there any problems that I will have to expect?

+4
source share
2 answers

Flexibility.

Today you use this service through HTTP. Tomorrow, you might want to add some resistance and strike at MSMQ. Using WCF, that configuration change is using the Webservice client code, you are viewing a complete redo of this area of ​​your code.

+4
source

Another advantage is the ability to enable tracing, message logging and diagnostics with reconfiguration.

See Administration and Diagnostics for more information .

Diagnostic Features Provided by WCF

WCF provides the following diagnostic functions:

  • End-to-end tracing provides control data for troubleshooting application problems without using a debugger. WCF trace outputs for process steps as well as error messages. This may include opening a factory channel or sending and receiving host service messages. Tracing can be enabled to launch the application to monitor its progress. For more information, see Tracking . for how you can use trace to debug your application, see Using trace to troubleshoot your application .

  • Message logging allows you to see how messages appear both before and after transmission. For more information, see the Message Log topic.

  • Event tracing writes events to the event log for any major problems. You can then use the event viewer to examine any anomalies. For more information, see Event Log .

  • Performance counters displayed through Performance Monitor let you monitor your application and system status. See the WCF performance tabs for more information.

+3
source

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


All Articles