I have what may be a rather unusual issue where I am unable to consume a wsdl in visual studio 2013.
In order to view the url in IE/Chrome/Safari I have been required to install a .p12 and .crt secure certificates.
I have set IE not to prompt but in Safari I see the following prompt: I guess that visual studio is also wishing to confirm the certificate but unable to prompt.
When attempting to add a service reference in Visual Studio 2013 I see the following error:
"An error occured (details) while attempting to find services at..."
The details are:
There was an error downloading 'https://xxx/xxx.svc/$metadata'.
The request was aborted: Could not create SSL/TLS secure channel.
Metadata contains a reference that cannot be resolved: 'https://xxx.wsdl'.
Could not establish secure channel for SSL/TLS with authority 'xxx.com'.
The request was aborted: Could not create SSL/TLS secure channel.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Is there a work around?
On the taskbar, click Start, and then click Control Panel. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. Expand Internet Information Services, then select Client Certificate Mapping Authentication, and then click OK.
Client certificates are, as the name indicates, used to identify a client or a user, authenticating the client to the server and establishing precisely who they are.
The first step as Prashant says is to download the WSDL file. This is as simple as 'File > Save As' from the browser.
The next step is to examine the downloaded WSDL and look at the xml for any 'xs:import' references. Follow each of the references and download the files to the same path as the WSDL.
I found that the the WSDL referenced 2x .xsd files ahd the files then referenced other .xsd files. I ended up with a total of 6 files.
For all the files (both wsdl and xsd) it is necessary to check the 'xs:import' to ensure the schemaLocation points to the local file path.
Finally, if you add a service reference as perusal and enter the local path of the WSDL file.
Sorry to answer my own question, but I wanted to document this for the rest of the team and also anyone else who may be stuck.
You should get the .wsdl file and then use wsdl.exe to generate a proxy from it.
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