0

Hi,

Firstly, I must apologise as I am a novice and my approach may be flawed.

I am using MS Visual Web Developer 2010 Express on a Windows 7 Enterprise platform.

What I want to do is add a provided 3rd party wsdl file to a C# ASP.NET MVC Web App and then consume each service. I have successfully done this in a Java environment.

I am at the stage wher I am trying to add a Service Reference to the wsdl as follows:

-> select Service Reference from the menu options
-> select Advanced
-> select Add Web Reference

When I add the reference to my wsdl I get an access denied cannot copy message, as follows:

There was an error downloading 'C:\temp\wsdl'.
Access to the path 'C:\temp\wsdl' is denied.
Access to the path 'C:\temp\wsdl' is denied.
Access to the path 'C:\temp\wsdl' is denied.
There was an error downloading 'C:\temp\wsdl'.
Access to the path 'C:\temp\wsdl' is denied.
Access to the path

I have moved my files under the c drive and this is what I get:

There was an error downloading 'C:\'.
Access to the path 'C:\' is denied.
Access to the path 'C:\' is denied.
Access to the path 'C:\' is denied.
There was an error downloading 'C:\'.
Access to the path 'C:\' is denied.
Access to the path 'C:\' is denied.
Access to the path 'C:\' is denied.

This is the same for the desktop folder:

There was an error downloading 'D:\Users\malikmo\Desktop\test'.
Access to the path 'D:\Users\malikmo\Desktop\test' is denied.
Access to the path 'D:\Users\malikmo\Desktop\test' is denied.
Access to the path 'D:\Users\malikmo\Desktop\test' is denied.
There was an error downloading 'D:\Users\malik

I would appreciate advice on my approach and why I am getting an access denied message. I have checked the property for the location I am going to and all seems to be fine.

1
Contributor
1
Reply
3
Views
5 Years
Discussion Span
Last Post by malikmm
0

Ok this where I have got to so far:

After reseaching the web I found that I have to use svcutil.exe with the /mc switch to generate the WCF contracts. This will create a code file that I can add to my project. It will contain all interfaces and data types I need to create mu service. The default language is C# but you should be able to change this using /l:vb.

svcutil /mc "WSDL file path"

In my case, my WSDL has a supporting XSD file so I passed it in as arguments after the WSDL.

svcutil /mc "WSDL file path" "XSD 1 file path" "XSD 2 file path" ... "XSD n file path"

Now, I believe I need to create a class "MyService" which will implement the service interface (IServiceInterface) - or the several service interfaces - and this is my server instance.

I have read that the class by itself doesn't really help yet - I will need to host the service somewhere. I need to either create my own ServiceHost instance which hosts the service, configure endpoints and so forth - or you can host your service inside IIS.

Is this the correct way forward?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.