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.
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.
I've had this issue in the past working with a 3rd party service.
3 things to try.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With