.net - Eigener Verbrauch von Webdiensten

original title: ".net - Homegrown consumption of web services"


Translate

I've been writing a few web services for a .net app, now I'm ready to consume them. I've seen numerous examples where there is homegrown code for consuming the service as opposed to using the auto generated methods that Visual Studio creates when adding the web reference.

Is there some advantages to this?



Ich habe einige Webdienste für eine .net-App geschrieben und bin jetzt bereit, sie zu nutzen. Ich habe zahlreiche Beispiele gesehen, in denen es hausgemachten Code zum Konsumieren des Dienstes gibt, anstatt die automatische ...

Dies ist die Zusammenfassung nach der Übersetzung. Wenn Sie die vollständige Übersetzung anzeigen möchten, klicken Sie auf das Symbol "Übersetzen"


Alle Antworten
  • Translate

    No, what you're doing is fine. Don't let those people confuse you.

    If you've written the web services with .net then the reference proxies generated by .net are going to be quite suitable. The situation you describe (where you are both producer and consumer) is the ideal situation.

    If you need to connect to a web services that is unknown at compile time, then you would want a more dynamic approach, where you deduce the 'shape' of the web service.

    But start by using the auto generated proxy class, and don't worry about it until you hit a limitation. And when you do -- come back to stack overflow ;-)