FedEx Web Services. What is correct procedure to add to .net website. Access denied C:\

Hello,
I have obtained my developer key, password, testing acct number, and meter number from FedEx. I downloaded a wsdl file "RateService_v14.wsdl from the FedEx Developer center. I would like to add a new page to my website where users can view FedEx rates.

Using VS 2010 VB.Net

How do I add this to my project? I tried right clicking on my project in Solution Explorer then "Add Service Reference / Advanced / Add Web Reference"  
 
Then in the URL:  C:\FedEx Web Services\RateService_v14.wsdl

Then in the box on the right "Web Services at this address I get the error:

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

I have changed permissions to full for all users for this file.

I read the FedEx pdf and googled but no luck.

Can someone point me in the right direction. Thanks.
ExpressMan1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Try putting quotation marks around the path when you add the reference. (It shouldn't have mattered, but that looks to be what you're running in to.)

e.g.

"C:\FedEx Web Services\RateService_v14.wsdl"

I don't really think you need to do the "Web Reference", though. The Service Reference *should* accomplish the same thing. If not, then I would fall back to the Web Reference.
0
ExpressMan1Author Commented:
Tried the quotation marks in web reference and did not get "Access is denied" message in the box on the right titled "Web Services at this URL", which is now clear,  but instead "This program cannot display the web page" "Most likely causes you are not connected to the internet" etc.

Tried just the service reference and got "An error occurred while attempting to start services at "C:\FedEx Web Services\RateService_v14.wsdl"
Details:   Invalid URI: The URI scheme is not valid.
0
käµfm³d 👽Commented:
Can you open up the WSDL file in a text editor? Does it look similar to the one found here:

https://github.com/jzempel/fedex/blob/master/fedex/wsdls/RateService_v14.wsdl

In other words, can you confirm that it is in fact a WSDL file?
0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

käµfm³d 👽Commented:
I just tried the one that I linked to above, and it appears to work correctly, so I'm wondering if your file is corrupted.
0
ExpressMan1Author Commented:
I opened it in notepad and it looks the same.

I don't see where I am supposed to enter the fedex key, password, and meter number in this file though. Is there another file I need for this to work?
0
ExpressMan1Author Commented:
Don't know if this helps but if I click on the RateService_v14.wsdl file it opens in a new file in vs 2010.
0
käµfm³d 👽Commented:
OK, I just downloaded the file from Fedex. When you save the file to your local machine, as you have already done, you make note of where you saved it. Put that path into the "Address" box of the "Add Service Reference" dialog with no quotes. Clicking the "Go" button will list out the services available to you:

Screenshot
Just give it a proper Namespace, and then click the "OK" button, and you should have your service reference.

To actually call the service, you will need to create an instance of the proxy class that the "Add Service Reference" utility created for you. This will end up being a class whose name ends in the word "Client". In this case, that is RatePortTypeClient:

FedexRateService.RatePortTypeClient client = new FedexRateService.RatePortTypeClient();

Open in new window


Then just instantiate the appropriate parameter objects, and call the method that you are interested in:

namespace _28248270
{
    class Program
    {
        static void Main(string[] args)
        {
            FedexRateService.RatePortTypeClient client = new FedexRateService.RatePortTypeClient();
            FedexRateService.RateRequest parameters = new FedexRateService.RateRequest();

            parameters.WebAuthenticationDetail.UserCredential.Key = "your developer key";
            parameters.WebAuthenticationDetail.UserCredential.Password = "your developer password";
            parameters.RequestedShipment = new FedexRateService.RequestedShipment();
            parameters.RequestedShipment.DropoffType = FedexRateService.DropoffType.BUSINESS_SERVICE_CENTER;

            FedexRateService.RateReply response = client.getRates(parameters);
        }
    }
}

Open in new window


I'm guessing a bit on the developer key and password. Some sample code came packaged with the WSDL, so you can inspect that to get a better example of how the API should be used.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ExpressMan1Author Commented:
Thank You.  

The add service reference worked. I will need to keep working on learning the rest though.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.