1

I'm adding inheritance to one of my interfaces in WCF, but the inherited interface is not showing it's methods in the wsdl:

I have and endpoint implementing:

contract="HNA.SP.PS.WEB.OBJECTS.IServicios" 

And these descriptions:

namespace HNA.SP.PS.WEB.OBJECTS
{

    [ServiceContract]
    public  interface IServicios : IEmail
    {  

        [OperationContract]
        FakeResult FakeMethod1(Param ctc);

        [OperationContract]
        List<FakeResult> FakeMethod2(Param producto);       

    }
}

The inherited interface below:

namespace HNA.SP.PS.WEB.OBJECTS.Servicios.Datos
{
    [ServiceContract]
    public interface IEmail
    {    
        [OperationContract]
        bool TestingMethod();
    }
}

The implementation of the Interface is in two files, both partial classes:

public partial class Servicios : IServicios
{
   public  FakeResult FakeMethod1(Param ctc) { 
     //Whatever
   }

   public   List<FakeResult> FakeMethod2(Param producto) {
    //Whatever
   }       

And other partial class implementing the other method:

public partial class Servicios 
    {

        public bool TestingMethod()
        {
            return true;
        }
    }

If I recompile the service, I can view my OperationContracts from the Parent Interface (IServicios), but the method (TestingMethod), from the inherited interface is not shown in the WSDL and I can not find why.

Carlos Landeras
  • 11,025
  • 11
  • 56
  • 82
  • Can you try this http://stackoverflow.com/questions/720376/multiple-interfaces-from-a-single-wcf-service http://stackoverflow.com/questions/10249137/wcf-service-inheritance-extend-a-service – Deepu Madhusoodanan Aug 28 '14 at 12:49
  • I tries adding knownType without any luck – Carlos Landeras Aug 28 '14 at 19:21
  • how about putting IServicios and IEmail into the same namespace? I could see the difficulty of mapping 2 clr namespaces into 1 xml target namespace. – ZZZ Aug 29 '14 at 05:50
  • I've just tried that. No luck :( – Carlos Landeras Aug 29 '14 at 06:03
  • I think there is some other restriction into your project.. Please create a separate wcf service project and implement same scenario. I tried same. I can see all three methods in wsdl. If still having issue let me know I will post what I have tried. – Sandip Aug 29 '14 at 06:47

0 Answers0