Generate WebService producer from WSDL in Visual Studio 2005 - c#

I have a WSDL file defining the interface for a web service and I want to implement that service (i.e. producer/server code) using C#, ASP.Net and Visual Studio 2005. Setting up a Web Reference as consumer of a web service is a breeze, but as a producer isn't as obvious.
In the java world there is wsdltojava. Is there something similar to this?

Yes there is. And wait for it, it is called wsdl.exe!
The file lives in the Microsoft Windows SDK bin directory (for older version of .NET, the .NET SDK may be in another location).

Related

Add web pages to gRPC Service project (VS 2019)

I've created a project of type "gRPC Service C#" in Visual Studio 2019. Can I add (and host) web pages to that project? or should I create another one (and what type of project)?
I want to use these web pages as interface with gRPC services (not call them directly from a web browser). Thank you in advance for your help.
Looks like it's possible by using a Worker but it's a lot of pain. Good practice is having a worker or IIS to host gRPC service and a web application on another project.

Windows Azure App Service: recover lost source code [duplicate]

I have an App Service in my Azure account which I deployed with Visual Studio Publish wizard. Is it possible to restore the deployed solution locally (in Visual Studio) from the Azure App Service?
When you publish an app to an App Service (web app), just your code is published, not the Visual Studio project / solution files. So no, unless you somehow forcibly packaged (or maybe ftp'd) a copy of your solution files, they won't be available for download.
It's fairly trivial to pull the app down to a local machine though, since Web App has built-in ftp. Just don't count on being able to retrieve source code for languages such as c# and Java (since usually just the dll/jar files are published).
I want to mention one thing which might be helpful if your application is .NET. There are many .NET Decompilation tools today(Reflector, ILSPY, JustDecompile etc.) that can open a .NET DLL and let you view the code (the best one being Telerik's JustDecompile which can create a PROJECT out of a .DLL file or any .NET Assembly)
The code will not look EXACTLY like the one you created but can get you pretty close. Definitely worth a try if you lost your code and looking for some way to get it. This will only work if the code was not obfuscated in the first place. There might some rework required but you can get somewhat close.

Microsoft.Lync.Model assembly not found on Asp.Net application

I am writing an ASP.Net application which uses the Lync client API to get user availability state from Lync.
Now I get a strange error when calling the Lync api methods:
"The file or assembly 'Microsoft.Lync.Model [...] not found".
But I have referenced the Lync client api in the correct version.
What do I have to change to make this working?
The Lync client api may not be an ideal fit for an ASP .Net application but that depends which of the 2 you are using.
There is one for desktop applications and one for Silverlight applications, see https://msdn.microsoft.com/en-us/library/office/jj933180.aspx for more details.
Regardless of which version you are using you will need the Lync client installed on that machine. To be explicit if you are using the api on the server as I suspect then the server will need the Lync Client installed there.
It's also worth noting that there is a web api for lync https://msdn.microsoft.com/en-us/library/office/dn962133(v=office.16).aspx
You can find here exact instruction
https://msdn.microsoft.com/en-us/library/office/hh378548%28v=office.14%29.aspx
Microsoft.Lync.Model.dll is not added to the global assembly cache on your computer during Microsoft Lync SDK installation. Instead, you must navigate to the install location of these files and select them for inclusion in your project references.
nothing more then this, if you sill have a problem maybe it's a good thing to create new application project in Visual Studio.
Hope it help.

How do I consume an existing webservice in ASP.NET?

I need to consume an existing web service in ASP.net.
The documentation of the website that provides the web servicesays that I have to use WSDL.exe to generate a stub, but I can't find this tool.
I also tried the Add web reference wizard in Visual Studio 2010 (VS2010), but if I paste the URL in, VS2010 doesn't work anymore.
What am I missing?
As far as I remember there should be a choice between .net 2.0 and WCF services.
Try to select .net 2.0 web service type. We had to do it for using SOAP web services running on Python.
You might also try using the Add Service Reference Wizard instead - worked for me for WebServices the Web Reference Wizard did not like quite as much. Make sure to use the link to either the asmx (if it's one) or the .wsdl
As far as I know, you can't create SOAP webservice with .net 4. When you creating new project, you need to choos .net 3.5 or earlier first, and then create project.
As for creating stub from existing wsdl, I don't know how to do it.

An operation can have only one in or out header of a given type?

Situation: I am trying to consume a clients web service for CC authorization. They are not publishing the WSDL file on there site, but they have provided the WSDL file. I am using Visual Studio 2005 and creating a web application that consumes the web service.
The only reference to this error that seems to apply is here: http://followtheheard.blogspot.com/2007/12/consuming-web-services.html. I installed WSE3.0 and configured my project to use WSE and am calling the WSE version of the web reference and I am still getting this error. Any help would be appreciated.
Apparently there is poor interoperability between web services written in Java requiring WSE and Visual Studio 2005. Upgrading to Visual Studio 2008 allows for easier use of the WSE3.0 toolset.

Categories

Resources