Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Service Reference in Visual Studio 2010 problem

I'm trying to use Visual Studio 2010 to Add Service Reference to a service that I do not own. It does not add anything to the app.config, and the Reference.cs file that gets created only contains two classes, viz SerializableExpression and an empty InterLinqType class. But I don't have a usable client that I can instantiate. When I turn off the option to Reuse Types in generated assemblies then it generates a bit more members in the above-mentioned classes, but still I have no usable client class that I can instantiate as my proxy to the service! Using Visual Studio 2008 to add a Service Reference to the same service all works perfectly! Please help.

like image 388
Shawn de Wet Avatar asked Jan 28 '11 05:01

Shawn de Wet


People also ask

How do I add an existing service reference?

In Solution Explorer, right-click the name of the project to which you want to add the service, and then click Add Service Reference. The Add Service Reference dialog box appears. In the Address box, enter the URL for the service, and then click Go to search for the service.


1 Answers

I've had this issue in the past working with a 3rd party service.

3 things to try.

  1. Download the WSDL locally and try to add it from there.
  2. Create the proxy from the command line and then add it to your project. Here is more info on the command line util: http://msdn.microsoft.com/en-us/library/aa347733.aspx Play around with the flags that are available. Keep an eye on the /targetClientVersion flag. Here is a sample usage:

    svcutil /t:code /language=VB http://servicedomain/serviceurl /out:MyServiceProxy.vb /config:MyServiceProxy.config

  3. Validate the WSDL you are looking at is actually valid. I've had invalidate characters, unclosed tags, and invalid locations of extra dtd files throw off the creation of proxies. You can try and use the validator here to see if it fails here: http://xmethods.net/ve2/Tools.po

like image 82
Paul Lemke Avatar answered Nov 01 '22 16:11

Paul Lemke