Solved

Tutorial on consuming an aspx web service with WCF service

Posted on 2013-05-15
4
473 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

16 Experts available now in Live!

Get 1:1 Help Now