KennyKls

Hi, i want to migrate a webservice (asmx) to wcfservice (svc) with VisualStudio2005.
Here a snippet from my WSImplementation (C#):
...
using System.ServiceModel;

namespace MyApp.WebService
{
[ServiceContract(Namespace = "http://MyApp/WebService/")]
[WebService(Namespace = "http://MyApp/WebService/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WSImplementation :
System.Web.Services.WebService
{
[WebMethod]
[OperationContract]
[SoapHeader("SessionHeader", Direction = SoapHeaderDirection.In)]
public GetCinResponse GetCin(
GetCinRequest GetCinRequestMessage)
{
...

I made a service.svc with this entry:
...Service="MyApp.WebService.WSImplementation"...

And i added the same path in my web.config for "<service name" AND "<endpoint contract"

But i can`t access this WCFService in my client. I added a service-reference. There are no error-messages, but when i call "WSImplementationClient",  VisualStudio said, that it isn`t known.
And there are none of the OperationContract-methods available!! Is it a namespace-problem

Anyone there who can help

Thx
K.


Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

Michele Leroux Bustamante

How did you create your WCF service What you SHOULD do is generate the ASMX WSDL and use SvcUtil to generate the service contract. That way, you get all the correct namespace definitions etc.




Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

KennyKls

I made it like this:

http://blogs.msdn.com/trobbins/archive/2006/12/02/integrating-wcf-with-your-existing-asmx-services.aspx

I added a Service Reference and i get a WCFService.map file and a WCFService.cs file. But they are both small and include only one of the methods!
And in this article, i don`t need to use svcutil by myself, because i made the Service Reference.. The problem is, that i can`t get access on the methods or the WSImplementaionClient





Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

Michele Leroux Bustamante

That approach might work for simple services, but I don't recommend it. THe best way to reverse engineer a service is to generate the service contract and binding configuration using SvcUtil. I can't speak for this other approach.




Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

KennyKls

Tried it with the other method too, but i get a lot of warnings and errors, for example a problem with System.ComponentModel.PropertyChangedEventHandler : It can`t be derived from System.MulticastDelegate. I found nothing about this error. I thought, i can name the WCF-Reference like the web-service-reference and use all methods the same way, with the aim, that i can use the same serviceaccesslayer and only exchange the reference...




Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

Michele Leroux Bustamante

Can you send me the WSDL please mlb@idesign.net






Re: Windows Communication Foundation (Indigo) Problem with ASMX2WCF Migration...

KennyKls

Thanks for your offer, but i try it with WSE 3.0 now!

K.