Solved

Tutorial on consuming an aspx web service with WCF service

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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