Question

I'm signed up, I've downloaded sample code, I've got a WSDL...and yet I have no idea how to get this stuff into my existing .Net application. The WSDL was in a zip file, not a URL so I can't just "Add Web Reference." I've run the wsdl tool from the .Net command prompt, and it made a nice class for me...yet dropping that into my web_reference folder doesn't give me any kind of instantiatable class.

I know I'm missing something stupid. Can someone point me in the right direction please?

Was it helpful?

Solution

Actually, you can just "Add Web Reference". Give the path to the URL.

OTOH, you should be doing all new web service development (even client development) using WCF. Microsoft now considers ASMX web services to be "legacy technology".

BTW, I just tried using their address validation service, and it won't work with .NET. Both ASMX and WCF clients will attempt to use the XML serializer to consume this service, and there is a bug there that prevents that service from being used.

OTHER TIPS

The proper way to load the FedEx API WSDL file in Visual Studio 2010:

  1. Open the Solution Explorer
  2. Right click your project
  3. Click 'Add Service Reference'
  4. Click the 'Advanced...' button
  5. Click the 'Add Web Reference...' button
  6. Enter the exact path to the WSDL file for the specific FedEx web reference you're using. For example, I extracted mine to the root of my C:\ drive, so all I entered into the URL field was "C:\ShipService.wsdl" without quotes. If you leave quotes, it won't work.
  7. When you hit go, Visual Studio should consume the wsdl into workable classes for you. Click Add Reference and enjoy!

Note: Make sure you read the FedEx documentation well - a lot of their services have gotchyas and implementation can be a nightmare. For example, their address validation service is consumed incorrectly and creates two-dimensional arrays in Reference.cs where they shouldn't exist - this is detailed in the documentation. Worse yet, the fact that they don't allow address validation on their dev environment isn't documented anywhere! Good luck!

Matt, the WSDL zip file has the WSDL and its associated transactions for that service. Unzip the file and then "Add the reference" to the WSDL in your code.

Try changing the namespace of the proxy class to that of your application. I currently use the proxy class with C# and it works in spite of FedEx's limited documentation and samples.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top