Solved

Tutorial on consuming an aspx web service with WCF service

Posted on 2013-05-15
4
472 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
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Rose Babu
ID: 39167560
0
 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now