Solved

Tutorial on consuming an aspx web service with WCF service

Posted on 2013-05-15
4
488 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 July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

632 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