Connect to a WCF web service without WCF - asp.net

We have an ASP.NET 2.0 site. A 3rd party has created a web service that we are supposed to connect to, and I was naively expecting a 2.0 style web service to be created. When I was given the url, I was expecting to see a .asmx suffix...but instead was given a url with .svc suffix.
Going to that page tells me to to create a WCF client by running svcutil...but, again, we aren't running .NET 3.0+ yet.
Since it's a web service, I'm thinking the basic functionality should be essentially the same, but freely admit I know essentially nothing about WCF (yet.)
Can I expect this to work eventually, or is there some kind of potentially blocking issue (WCF web services being inherently different in some profound way)? Is there a simple path for creating a basic client (like svcutil would if we were in the 3.0+ world)?

If it's using BasicHttpBinding (SOAP 1.1) it's probably interoperable.
In the "Add Service Reference" dialog in VS2010, click on "Advanced", then click on the "Add Web Reference" button.

Related

Is it possible to detect that a web service was written in .NET?

I am trying to write a client program for consuming a SOAP web service using ksoap2.
I don't know how to find out if a WSDL is .NET based. In a video tutorial I watched, they said that since the URL contains the term "asmx" (this one), which stands for ASP.NET, so it is a .Net based web service.
But if I have any other web service and its WSDL, all I see is an XML schema (and I have seen URL's of WSDL's which do not contain "asmx"), how do I get to know if it is a .NET based webservice or not? Is it generally possible to detect?
.svc extension can be some pointer for WCF service. You can also browse service url (something like http://demos.telerik.com/aspnet-ajax/combobox/examples/loadondemand/wcf/ComboBoxWcfService.svc), WCF services display information page.

Calling WCF service from jsp page

I have created a WCF Service and published it to a Windows Server running IIS. In an asp.net web application, I can add a Service Reference to the WCF Service which exposes its methods which I can call. This all works fine.
I need someone who is running a jsp site to be able to call a method in my WCF Service. How can they do that? (I know absolutely nothing about jsp). Presumably they cannot reference my WCF Service within their application in the same way you can within a .net application.
The web services are totally platform independent. Therefore, someone writing in Java should have no problem calling a web service server, regardless if it was written using WCF or another platform. For example, here, here and here you could find some tutorials on how to build web service clients using java. This java code could be called from JSP pages.
If you want to quickly test your web service from the client side, you could use SoapUI. It's a web service client tool developed in java. I am sure you will find it useful.
Hope I helped!

ASMX Web Service only displays request when clicking invoke from browser

I have the web service (developed in .net 4.0) and published in local IIS 7.0
When I go to the browser, I can see the asmx invoke operation. When passing the values and click "invoke" I get only the XML for request, but with values passed in 0, like this:
<H_Receptores xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://mywebsite.com/app">
<UserID>0</UserID>
<ReceptorID>0</ReceptorID>
</H_Receptores>
This should be values of 1 and 2 (what I entered in the web service form).
What should I do, or what I'm doing worng?
By the way, in Visual Studio 2010, if I right click and select view on browser, it opens a local development temporary IIS on port :41089 and there the operation works superb.
First, why did you create an ASMX service if you were using .NET 4.0. ASMX is a legacy technology, supported only for backwards compatability. All new SOAP web service development should use WCF.
Second, don't worry about how it works in the browser! You're not going to invoke the application from the "help page", are you? In order to test your service, create some form of client to consume the service. An example would be to create a small console application, use "Add Service Reference" to reference the service, then have the consle application call the service.
I find it more convenient to use Unit Test projects for this purpose, BTW, since I can create a set of tests and execute them all at once.

connect to a WCF web service using asp.net

I'm new to WCF web services never done anything with them before and I'm being asked to create a page to connect to a WCF web service
I have no idea where to start and I've searched the internet with no success.
Does anybody have an example of an asp.net page connecting to a WCF web service?
I've set up the WCF web service on my server but do not have a clue on how to actually connect or query it to get my XML data back.
The WCF web service is set up as it's own URL and only has 2 files within the root one being the web.config.
I somehow need to query this URL and get some XML data back from it.
Any ideas?
You need to create a service reference from your asp.net project to your WCF project. Right-click on the ASP.NET and click on "add service reference", set the URL of the service and VS will generate a proxy class for you.
Asking your favorite search engine for "asp.net add service reference" should give you a good selection of starting points.
Look into WCF connections and web.config. This link should provide you some direction: http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic5

Web Service vs. WCF - different objects when consumed

I'm new to the WCF, and I'm looking for some advice. In my web app I consumed a web service (R+Click on project - "Add Web Reference") and started coding. My web app is really big, so it was taking forever to compile each time I wanted to debug, so I built a stripped down WinForm using the same code.
In VS2008 there is no "Add Web Reference" option when using the 3.5 framework, so I just chose "Add Service Reference" and used the same url. The objects/methods that I now have access to are completely different when compared to the objects/methods in the web app after consuming this as a web service.
Is that normal? Is this somehow related to the WCF?
Thanks
You can still add web references.
Do
Add Service Refernce
Hit the "Advanaced" button on the bottom left
Hit "Add Web Reference" on the bottom left.
Yes this is related to WCF. When your project target is >= .NET 3.0 the Add Service Referemce option will be available which will use svcutil.exe to generate client classes, otherwise you will have the Add Web Reference option which uses wsdl.exe. WCF clients use different classes to call a web service and that's why you get different classes generated.

Resources