简体   繁体   中英

Add SOAP/WSDL Web Service reference at runtime

Has anyone successfully added a Soap Web Service to a C# App at runtime?

This is required because the C# app is going to be deployed to a host connected to a VPN. The Soap Web Service is another host in the VPN. (We cannot install Visual Studio on the deployment host). Therefore, we cannot add the reference in our development machines. We are developing against a fake service.

You can generate proxy classes from the web service url.

read the following article.

http://msdn.microsoft.com/en-us/library/aa529578.aspx

This way you do not need to add reference to the web service.

Also what do you mean by adding reference at runtime. You can add reference to your local development PC and then deploy the code to the host PC. There is no need to add reference again when your project is deployed to third party server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM