I am developing a project using Visual Studio 2010, and I need to consume a webservice. The problem is that the development machine does not have access to the webservice, so I cannot add a reference directly.
What I need is to include a stub in my project that is exactly the same structure like the webservice. Once I deploy the project on the live server I will then be able to simply change the URL in the web.config and point it to the real webservice.
How can I achieve this?
Get the webservice wsdl, then execute the Visual Studio command prompt and wsdl.exe description.wsdl
This generate a cs proxy file that you can add to your solution and use.
Use SoapUI to mock the services for dev
You can use wsdl.exe to generate your client classes, which you can then add to your project, you will need access to a windows machine on which you can run it.
Simply create a Visual Studio Web Project with a web service and add it to your solution. After this you can set your reference to Web project and develop with it.
Related
I am trying to create a Web service client through Hosted wsdl file in visual studio but am unable to do it as am new to web services.
so does any one know, how to do this?
I tried it by adding service references.
also tried by Adding Command in Visual studio like
wsdl /l:CS /protocol:SOAP http://localhost/OIDServer/OIDServer.asmx?WSDL
but no use.
I have been through tons of threads and am unable to find the correct answer for my question. I have created a very simple WCF service on my development machine using visual studio 2010. The service works correctly when using VS to host it. I have even had success creating a small c# application to consume this service. However I now need to move this service to IIS on my work's development server. I have tried following several guides online but nothing has worked so far. Any help would be greatly appreciated.
if you are able to execute your wcf service using WCFTestClient successfully and not on IIS
that means problem is in endpoint configuration. I suggest have a look once again endpoint suggestions.
Using Web Deploy to publish from Visual Studio to a remote web server requires additional installation of Web Deploy on the server http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
Visual Studio generates an output log during the web deploy publish that may have additional information on why it is failing. Sometimes there are permission issues to work through as well http://blogs.iis.net/krolson/archive/2009/11/04/using-iis-manager-accounts-for-web-deployment-tool-msdeploy-delegation.aspx
You can also generate a Web Deploy Package with Visual Studio and manually deploy it to the server http://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
most of the time i add web reference of web service and give the path of asmx file but now i am using a UPS web service and may be this web service was developed by another technology. there is no any asmx file concept. they provide wsdl file and i just add the web reference and paste the file path of wsdl file there. i compile my project and got no error. my apps is running fine but when i create a setup project of that apps and install on another machine then i am getting object reference error. so i just do not understand why it is not running on another machine when i install it from setup but it is running fine when i run it from my machine IDE. so please guide me what i am missing. what i need to do when i will be working with wsdl and that will run fine on remote machine where wsdl file not exist.
Check if there is an App.config in your Setup project included where the link to your WSDL is set and check if you have that if the link to your WSDL exists on the PC where you are installing.
And if that does not work you can always try to convert the WSDL to a DLL with the help of this site.
I need to build a setup project for an windows application I developed in C#. Along the way, I need the user to be able to set the database server/instance name along with authentication type, and a username /password if they are using SQL authentication. This connection string is stored in my app.config file.
Once setup is complete, a website needs to open that will install a couple of controls that are needed for this application.
I have been looking at how to develop setup projects but I can't seem to figure out how to do what I need to do.
All help is appreciated. Thanks!
you need to create a custom dialog in the setup project as shown Create custom dialogs for use in your Visual Studio Setup projects
One interesting way to do it is to use custom action with "normal" winform like described here
Take a look at Wix, i tested it for a small application/addin, works fine.
For your problem more work to to, but i think if you create your Wix modular you can put the parts together for a new setup application.
You can also build an InstallHelper exe that will run during the standard VS Setup Project as described at http://www.eggheadcafe.com/tutorials/aspnet/ec13b205-9a90-496f-9d7b-ccebdf1d3ca1/build-a-custom-action-ins.aspx.
So here's the deal.
I'm attempting to use Visual Studio to connect to an AXIS web service. Unfortunately, the Web Service does not have a public WSDL file available on the server. I know the location of the Web Service, but it will not let me open the WSDL file from a browser.
Luckily, I do have a local copy of the WSDL file that the server is using. Now I know I can use SVCUTIL.EXE to build a class of the local WSDL file that can be accessed with Visual Studio. However, I need to know how to use the generated class to run services with the server.
Normally, I can use Visual Studio's "Data Source" tool to point it to the right web address and have it take care of the hard stuff, but because the server is trying to hide the web service, how do I connect Visual Studio to the server?
Specific examples in C# would be greatly appreciated.
Thank you very much.
I'd just host the wsdl on your local IIS... point the "Add Service Reference..." wizard at the WSDL hosted locally, then use the application's ".config" file to re-direct the service reference to the actual URL.