views:

45

answers:

3

I could not think of a better way to title this question. my apologies :)

Anyways, so I have been given a url to a service that I am to consume. There is no information that I have on this service as yet, and so before I ask the clients any dumb questions, I want to know if it really matters if I am consuming this service by adding it to my project as a web reference or a service reference?

When adding as a service reference I won't be checking that box that allows to generate async methods. Does this mean that in this case both the service reference's proxy class and the web reference's proxy class are fundamentally the same?

Thanks for your time...

A: 

This is a duplicate of this http://stackoverflow.com/questions/308454/difference-between-web-reference-and-service-reference question. Look there for answers.

Andreas Paulsson
So can I add a service reference to a java based web service?
Yes, you can. Add service reference with the URL to the WSDL.
Andreas Paulsson
+1  A: 

You should have a WSDL file that defines the web service. If that URL generates a WSDL file (you can try going to the URL in a web browser) then it can be used to generate the service reference. You should definitely use the WCF framework for any web service related programming in .Net 3.0 onwards. So I would say that use a service reference. WCF is a more customisable, interoperable and peforming framework and is in fact the base for all other distributed computing initiative from Microsoft in recent times (like OData, RIA services etc.)

Pratik
what if the service I am to consume was developed in Java. Would it still make sense to add a wcf reference?
@user20358 yes, service reference can consume java services. basicHttpBinding is the SOAP 1.1 binding
Eugarps
@Eugarps, Not only basicHttpBinding but if the java service is using WS-* protocol then WCF can consume those too.
Pratik
+1  A: 

Service reference is backwards compatible with web reference (service reference being the new, 2008/2010 WCF proxy way of consuming a service).

You can call any SOAP 1.1 web service with service reference. Web reference may be more simple for somebody unfamiliar with either to configure, but the WCF client is more configurable.

Eugarps