Solved

Tutorial on consuming an aspx web service with WCF service

Posted on 2013-05-15
4
486 Views
Last Modified: 2013-06-11
Hi.

I have a fairly good idea on how to consume a web service with a console application, but I would like to know how to do it using a WCF service.  Can anyone help?
0
Comment
Question by:Jasmin01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:Jasmin01
ID: 39167938
No.  I have an aspx web service already created.  I want a WCF service to consume the aspx web service.
0
 
LVL 16

Accepted Solution

by:
Rose Babu earned 500 total points
ID: 39170498
since you stated that the aspx web serice then i assume it is a rest web service

or you created a asmx webservice (soap web service)?

here i give some suggesstions to consume the both kind of web services. webservice must be configured and ready to be consumed.

if u have REST service (aspx) then

Consume the service using HttpWebRequest
     
      http://swagatblog.wordpress.com/2011/01/09/consume-web-services-dynamically-using-httpwebrequest/
      
      http://developer.yahoo.com/dotnet/howto-rest_cs.html
      
if u have SOAP service (asmx) then

consume the webservice by adding the webservice as a web reference in your wcf project and create a service object then call the method.
     
On the Project menu, click Add Web Reference.
In the Add Web Reference dialog box, type the URL for the Web service in the Address text box and press ENTER.
If you set the local computer to host the Web service, the URL is http://localhost/TestService/TestService.asmx.
Click Add Reference.
Create an instance of the proxy object that was created.
Invoke the method on the proxy object.
     
      FYR, http://www.tutorialspoint.com/asp.net/asp.net_web_services.htm

Hope this will help you a lot...
0
 

Author Comment

by:Jasmin01
ID: 39180488
What I have is a asmx webservice that validates a clients contact details.  I am consuming this service in a windows application.  What I would like to do, is to add a button that will call my WCF service, that will in, validate the contact details from my aspx webservice.

I was told that I would need to add an entry on my windows application's app.config file.  Does anyone know how to do this?
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question