IT Community - Software Programming, Web Development and Technical Support

ASP.net 2.0 Webservice and WCF

This is a discussion on ASP.net 2.0 Webservice and WCF within the ASP and ASP.NET Programming forums, part of the Web Development category; Can we call WCF service from asmx client...I dont know how to call WCF from asmx...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-11-2007, 03:57 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Question ASP.net 2.0 Webservice and WCF

Can we call WCF service from asmx client...I dont know how to call WCF from asmx
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-11-2007, 04:15 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default ASP.net 2.0 Webservice and WCF

We need to integrate the WCF in ASMX ...

First thing we need to generate a class for WCF using wsdl.exe


wsdl /n:Microsoft.ServiceModel.Samples /o:generatedClient.cs /urlkey:ServiceAddress http://localhost/servicemodelsamples/service.svc?wsdl

By using the generated typed proxy, the client can access a given service endpoint by configuring the appropriate address. The client uses a configuration file (App.config) to specify the endpoint to communicate with.

<appSettings>
<add key="ServiceAddress"
value="http://localhost/ServiceModelSamples/service.svc"/>
</appSettings>


The client implementation constructs an instance of the typed proxy to begin communicating with the service.

// Create a client to the Service.
using (Service client = new Service())
{
// Call the Add service operation.
double value1 = 100.00D;
double value2 = 15.99D;
double result = client.Add(value1, value2);
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webservice and its uses poornima ASP and ASP.NET Programming 7 03-20-2008 09:49 PM
HTTPWebRequest in webservice S.Vinothkumar ASP and ASP.NET Programming 4 09-26-2007 12:40 AM
Error in webservice Sathish Kumar C# Programming 7 09-20-2007 04:55 AM
Webservice – Xml & Soap Karpagarajan XML and SOAP 1 08-31-2007 11:45 PM
note on webservice nssukumar Java Programming 1 03-12-2007 05:05 AM


All times are GMT -7. The time now is 06:12 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0