Integrating FedEx Web Services into .Net, stuck at step 1 - wsdl

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?

The proper way to load the FedEx API WSDL file in Visual Studio 2010:
Open the Solution Explorer
Right click your project
Click 'Add Service Reference'
Click the 'Advanced...' button
Click the 'Add Web Reference...' button
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.
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!

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.

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.

Related

how to call a soap webservice made in delphi (on apache) from curl

In Delphi 11 Alexandria, I created a simple SOAP webservice using File->New->Soap Server. I asked to create the demo interfaces, I have built the project, corrected Apache conf, and I have copied the DLL inside Apache's module directory.
So, if I request:
http://127.0.0.1:81/xyz/mod_webbroker.dll
I get into the page where I see the interfaces, and I can view the WSDL.
Now, I would like to try to call the demo function (echoDouble) from PHP using curl.
How do I know what address I should use?
I tried:
http://127.0.0.1:81/xyz/wsdl/IMyService/echoDouble/
But it's not working.
Any help?
I understand my doubts now. I have always used "Datasnap rest application" but now I am trying "SOAP server application", that is why I cannot find the correct URL, because they work different. When using "Datasnap rest application" you need to go to a specific URL to get the function but SOAP works different, the base URL is always this (in my case):
http://127.0.0.1:81/xyz/wsdl/IMyService/
Sorry for that, I will switch back to "Datasnap rest application"

How can I publish/upload ASP.NET MVC 5 Website

I have never published an ASP.NET MVC website to a hosted server. I have read and followed instructions and failed with publishing from Visual Studio directly to the hosted server. I used FTP publish method, provided required credentials, then published the website successfully. When I do this, I get the error when I try to access the website:
500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
I thus followed another instruction to publish to a local folder, using File System method, then uploaded the contents of that local folder using ftp to the hosted server. This gives me this error when I try to access the website:
Server Error
403 Forbidden
You do not have permission to access this document.
I would have loved the second method to work, but looking at the folder content, I can see some folders like App_Start missing, which I know is where start up pages are managed from, so I am not sure whether this is a proper procedure.
I would love some advice on how to publish this website. It would also be great to find a way that will allow updating changes, instead of publishing the entire website whenever changes are made.
I am using VS2019, and a .net hosting provider, not Azure.
Thank you!
In most case you can't see App_Start but all can working fine, you should find httpdocs it's the destination folder that you need to use to copy your files.
You can also try web deploy in your visual studio.
To make it work correctly you need to get the setup file from your hosting provider, with this you don't need to update always all files by ftp, and if you are lucky (if you have Database rights) you can also auto-update your database.
Don't forget also to check your web.config if you use a database connection.
Please try this two methods then if you need more help I will edit.

Create web service using external WSDL through Add Service Reference

I have an ASP.NET MVC3 project in .NET 4 which needs to act as a SOAP server to receive notifications from another website.
I have created web services before, but I don't know how to set up a way to receive these notifications where the WSDL is provided by the external website.
I know I can create a service and get that to produce its own WSDL, but I'm assuming there must be an easy way to add a service reference, and then create a service that uses the objects/methods generated by it.
How do I do this?
Thanks
You can use the svcutil tool from visual studio commands line, to create the required configuration and proxy files

How to create a .wsdl file in .Net2.0 for a web service?

I am making a window service in .Net2.0 on which I am adding a web reference of a web service in .Net2.0 only, present at the Linux server. For that I am requiring a .wsdl file that is to be generated after i compile the Web service OR I have to make it manually on my own.
I am not able to generate the .wsdl neither automatically nor manually (don't know how to make it).
Kinldy provide me with a solution if someone is aware of the working of .Net Web Services at different Servers.
Thanks
here is url of your service: http://localhost/SuperWebService , if you click this url: http://localhost/SuperWebService?wsdl it will generate WSDL
You need to generate a proxy for calling a web service. The simplest way to do this is using the Add Web Reference option when you right click on your project in Visual Studio.

How to publish an ASP.NET MVC website

I've a site that I'd like to publish to a co-located live server. I'm finding this simple task quite hard.
My problems begin with the Web Deploy tool (1.1) giving me a 401 Unauthorized as the adminstrator because port :8172 comes up in the errors and this port is blocked - but the documentation says "The default ListenURL is http://+:80/MsDeployAgentService"!
I'm loathe to open another port and I've little patience these days so I thought bu66er it, I'll create a Web Deploy package and import it into IIS on the server over RDP.
I notice first that Visual Studio doesn't use a dialog box to gather settings, or use my Publish profiles but seems to use a tab in the project properties, although I think these are ignored when importing the package anyway?
I'm now sitting in the import wizard with Application Path and Connection String. I've cleared the conn string as I think this is for some ASP stuff I don't use but when I enter nothing in the Application Path, the wizard barks at me saying that basically I'm a weirdo because most people publish to folders beneath the root site.
Now, I want my site to be site.com/Home/About and not site.com/subfolder/Home/About and I think being an MVC routed site that a subfolder will introduce other headaches. Should I go ahead and use the root?
Finally, I also want to publish a web service to www.site.com/services/soap which I think IIS can handle.
While typing this question, Amazon have delivered my IIS 7 Resource Kit, and I've been scouring the internet but actually I'm getting more confused.
Comment here seems to show consensus opinion that Publish isn't for production sites and that real men roll their own.
ASP.NET website 'Publish' vs Web Deployment Project
...I guess this was pre- Web Deployment Tool era?
I'm going to experiment on a spare box for now but any assistance is welcome.
Luke
UPDATE
The site was imported (to the root) manually with Web Deploy and it worked. If you get the error "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' " its because your app pool is 4.0 and should be 2.0.
If you are using VS 2010, may I recommend Scott Hanselman's Web Debloyment Made Awesome?
http://www.hanselman.com/blog/WebDeploymentMadeAwesomeIfYoureUsingXCopyYoureDoingItWrong.aspx
Even if you are using VS2008, there are nice concepts there that will probably help.
I've experienced the same frustration and trouble with this as well. Coming from a Java web background where we can package everything as a single WAR and toss it on the server, the deployment process with ASP.NET seems archaic.
I currently have a python script that uses FTP to transfer the needed files to my test instance on the remote server. I have another python script that transfers those files to my live site. These scripts are smart enough to take care of differences between some of the configuration files etc..
I've found it much easier than trying to setup permissions or using the Microsoft deploy tools.
Hi you can use filezilla software to upload

Resources