Connect LinqPad to WCF webservice with ?wsdl URI query

Hydrargyrum picture Hydrargyrum · Jul 7, 2014 · Viewed 9.2k times · Source

I want to connect LinqPad to a WCF web service which exposes its WSDL information at a URI of the form http://server.example.com/Product/Service/Version/Soap11?wsdl. I can successfully add this URI as a Visual Studio WCF web service reference, and it works with WcfTestClient also.

The actual endpoint of the service, when connecting to invoke methods, is http://server.example.com/Product/Service/Soap11.

When I try to add the web service as a LinqPad connection, if I specify the web service's URI including the ?wsdl query, I get a LinqPad error message saying "ArgumentException: Expected an absolute, well formed http URL without a query or fragment. Parameter name: serviceRoot". If I leave out the ?wsdl query, I get a 400 Bad Request response instead.

(I get the same 400 Bad Request response when I try to create a Visual Studio web service reference, or add the service to WcfTestClient, without appending ?wsdl to the URI).

Is there anything I can change at the client end to get LinqPad to successfully connect to this web service? Or do I need to mess around with the configuration at the server end? I don't control the web services I'm trying to connect to, but I might be able to tweak some configuration files on the server if I must.

Answer

Joe Albahari picture Joe Albahari · Jul 11, 2014

Check out the following:

https://github.com/dylanmei/linqpad-soap-driver

It's a third-party LINQPad driver for SOAP-based web services.