I have some web services that I need to reference in a Windows 8 Metro style application, normally you can just add a reference to the service via VS2012, but the services are behind a security layer.
I have downloaded the .WSDL file to my local PC, and now I need to generate the class file for this service.
The WSDL.exe that I have found on my local PC is for .NET 4.0 and produces code that is not suitable for the .NETCore framework. Is there a WSDL.exe equivalent for Windows 8 apps?
Visual Studio 2012 can obviously add a reference to non-secure asmx WSDL web services, so the functionality must be somewhere.
As per little investigation, the original .NET 1.x asmx-based Web Reference proxies are not supported in Metro style apps.
Web Service with SOAP 1.1 end point is supported by Add Service Reference (right-click on a project and choose Add Service Reference) in Metro style apps.
A workaround should be remove the offending constructor that fails to build (unfortunately, you'll need to do that everytime you regenerate the code), and to pass an instance BasicHttpBinding and EndpointAddress to one of the constructors of the WSFTerminalsSoapClient.
Have a look at following references, which might help you in this regard:
Web Services from WinRT Metro
WCF in Windows 8 Metro styled apps? Absolutely supported
I found out how to do this if anyone is interested.
You simply download the XML WSDL file from the site via a normal browser.
Then in VS2012, you can add a service reference to that file directly (i.e. put in the full path to the file c:\tmp\mywsdl.xml) and it will be able to generate the proxy for you.
Related
Any help would be greatly appreciated!! I have scoured the web trying to find an answer. I am writing a UWP app that will be deployed to the Xbox platform. I need to access a web service written in .Net 2.0. In earlier versions of .Net / Visual Studio the Add Web Reference Button was hidden in a panel accessed through ->Add Service Reference ->Advanced ->Add Web Reference. With latest build of VS2015 the Add Web Reference Button is missing. Did this completely go away or is it hidden even deeper in the environment somewhere?
XML Web Services, also known as ASMX services, were the predecessor of Windows Communication Foundation (WCF). You can access Web Services by adding a service reference just as you would for any other WCF service.
A service reference enables a project to access one or more Windows Communication Foundation (WCF) services. Use the Add Service Reference dialog box to search for WCF services in the current solution, locally, on a local area network, or on the Internet.
For more info, please How to: Add, Update, or Remove a Service Reference.
I know there are a lot of questions like this, but none of them solved my problem.
I have a Windows Phone project, with some associated projects. I need to create a new project with the service reference, but I can't add it.
I found a link where they said to install a component from Add Connected Service > find other services > WCF Services but it says that my project is not supported.
Which kind of project must I create? I have in the same solution a project which has the right-click > add service reference but I was not the creator and I don't know what kind of project it is.
PS:
- I can't right click > Add service reference, I tried it in both project name and reference name.
- I need a Windows Phone Stuff. I link what i mean with a picture:
PSS: The destination version of windows phone is not the reason. I tryed changing the WP8.0 into WP8.1 and I can still add the ref
Does anyone know which kind of project I have to add for being able to add service ref?
Thanks
Instead of using Service Reference would suggest you to switch to the Windows recommended REST API endpoints instead. As now Windows is focusing more on REST service consumption than adding service reference that was available earlier.
Sadly now Windows Phone Store apps in Windows Phone 8.1 do not support the System.ServiceModel namespace generated by the Add Service Reference menu. Hence they have removed the option Add Service Reference.
To be able to use it you will have to create a Silverlight application and use this Workaround of using a WCF service.
You can find a MSDN Forum discussion of the same.
I have a WCF service which is used by two client applications, one is a web application and the other is a Windows forms application.
When I add a service reference to the web application it works perfectly.
But, when I add a service reference to the Windows application it doesn't generate the proxy class.
Then I run selected the "Reuse types in referenced assemblies" in configure service reference section and it generates the reference with XML serialization. That is not what I needed because it gives me lot of errors since I'm using GUID everywhere.
Can anyone explain me how to generate the proxy class with runtime serialization? (both client application use same version of visual studio - Vs2010)
I'm really struggling with this and your help is highly appreciated.
You can use svcutil to generate proxy class. Add these proxy class in a DLL and then reference it in your Web and Windows application. In this way, you don't need to rely on Visual Studio and will have consistent proxy code for both Web and Windows app
More details - http://msdn.microsoft.com/en-us/library/aa702581(v=vs.110).aspx
I am creating a Windows Phone application with Visual Studio 2013 Premium.
I have an older version of this project built for the old Windows Mobile platform.
The old project contains proxy classes used with the "Add Service Reference" functionality, ie classes and references from a WSDL file.
The new Visual Studio 2013 does not give the capability to add web service reference, unless you specify an older .NET framework.
My question is the following: Can I combine somehow the new UI capabilities with my old code?
Is it possible for a example to have a dll with the old web references (.NET 3.5) and link it with a project with target the "Windows Mobile 8"?
Windows Phone 8 available APIs don't allow you to handle anything about connection parameters, so proxy address as well.
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.