Re: CallbackContract with inherited interfaces -> Base interface not seen in proxy code...
am 04.01.2008 20:16:40 von sloan
Take a look here:
http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!1 58.entry
It shows now to avoid using the svcutil.exe tool, and create well defined
interface development.
"José Joye" wrote in
message news:66658BC6-1FEA-460E-8076-F6A1EEFBEC9B@microsoft.com...
> I'm playing with WCF and I'm trying to define a Callback Contract with an
> interface that derives from another one.
> Doing so, the generated proxy code (using svcutil.exe) does not see the
> base
> interface and an "NotSupportedException" is thrown on the Server when
> trying
> to call methods defined in base interface.
> I have also tried to manually define the base interface in the proxy class
> so as to be able to implement the methods in the client -> Same behaviour.
>
> Does anyone knows how to do this?
> Thanks for any help!
> José
>
>
> Here is my contract definition (I have attached a complete sample) :
>
> namespace wcfContract
> {
>
> [ServiceContract(Namespace = "Test")]
> public interface IPing
> {
> [OperationContract]
> void Ping();
> }
>
> public interface ITestCallback : IPing <-------------- IPing not
> seen in proxy
> {
> [OperationContract]
> void TestCB();
> }
>
> [ServiceContract(Namespace = "Test", CallbackContract =
> typeof(ITestCallback))]
> public interface ITest : IPing
> {
> [OperationContract]
> void Test();
> }
> }
>
Re: CallbackContract with inherited interfaces -> Base interface n
am 04.01.2008 21:53:03 von JosJoye
Sloan,
Thanks for your link! I will have a deep look at it :-)
However, I still want to understand why the Ping() method in my case it not
shown in the generated proxy. As far as I have seen, with inherited
interfaces they are normally "flattened" by svcutil.exe. However, methods are
there. In my case (with CallbackContract), it is just missing!
Thanks,
- José
"sloan" wrote:
>
> Take a look here:
> http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!1 58.entry
>
> It shows now to avoid using the svcutil.exe tool, and create well defined
> interface development.
>
>
>
>
> "José Joye" wrote in
> message news:66658BC6-1FEA-460E-8076-F6A1EEFBEC9B@microsoft.com...
> > I'm playing with WCF and I'm trying to define a Callback Contract with an
> > interface that derives from another one.
> > Doing so, the generated proxy code (using svcutil.exe) does not see the
> > base
> > interface and an "NotSupportedException" is thrown on the Server when
> > trying
> > to call methods defined in base interface.
> > I have also tried to manually define the base interface in the proxy class
> > so as to be able to implement the methods in the client -> Same behaviour.
> >
> > Does anyone knows how to do this?
> > Thanks for any help!
> > José
> >
> >
> > Here is my contract definition (I have attached a complete sample) :
> >
> > namespace wcfContract
> > {
> >
> > [ServiceContract(Namespace = "Test")]
> > public interface IPing
> > {
> > [OperationContract]
> > void Ping();
> > }
> >
> > public interface ITestCallback : IPing <-------------- IPing not
> > seen in proxy
> > {
> > [OperationContract]
> > void TestCB();
> > }
> >
> > [ServiceContract(Namespace = "Test", CallbackContract =
> > typeof(ITestCallback))]
> > public interface ITest : IPing
> > {
> > [OperationContract]
> > void Test();
> > }
> > }
> >
>
>
>
Re: CallbackContract with inherited interfaces -> Base interface n
am 04.01.2008 22:04:46 von sloan
I don't know either. I gave up on svcutil a while back, and haven't looked
back.
I don't need any non-DotNet clients using my service code, so I can work
without it.
......
"José Joye" wrote in message
news:D11915A5-34CF-4490-AE0F-858A60186C75@microsoft.com...
> Sloan,
>
> Thanks for your link! I will have a deep look at it :-)
>
> However, I still want to understand why the Ping() method in my case it
> not
> shown in the generated proxy. As far as I have seen, with inherited
> interfaces they are normally "flattened" by svcutil.exe. However, methods
> are
> there. In my case (with CallbackContract), it is just missing!
>
> Thanks,
> - José
>
> "sloan" wrote:
>
>>
>> Take a look here:
>> http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!1 58.entry
>>
>> It shows now to avoid using the svcutil.exe tool, and create well defined
>> interface development.
>>
>>
>>
>>
>> "José Joye" wrote in
>> message news:66658BC6-1FEA-460E-8076-F6A1EEFBEC9B@microsoft.com...
>> > I'm playing with WCF and I'm trying to define a Callback Contract with
>> > an
>> > interface that derives from another one.
>> > Doing so, the generated proxy code (using svcutil.exe) does not see the
>> > base
>> > interface and an "NotSupportedException" is thrown on the Server when
>> > trying
>> > to call methods defined in base interface.
>> > I have also tried to manually define the base interface in the proxy
>> > class
>> > so as to be able to implement the methods in the client -> Same
>> > behaviour.
>> >
>> > Does anyone knows how to do this?
>> > Thanks for any help!
>> > José
>> >
>> >
>> > Here is my contract definition (I have attached a complete sample) :
>> >
>> > namespace wcfContract
>> > {
>> >
>> > [ServiceContract(Namespace = "Test")]
>> > public interface IPing
>> > {
>> > [OperationContract]
>> > void Ping();
>> > }
>> >
>> > public interface ITestCallback : IPing <-------------- IPing not
>> > seen in proxy
>> > {
>> > [OperationContract]
>> > void TestCB();
>> > }
>> >
>> > [ServiceContract(Namespace = "Test", CallbackContract =
>> > typeof(ITestCallback))]
>> > public interface ITest : IPing
>> > {
>> > [OperationContract]
>> > void Test();
>> > }
>> > }
>> >
>>
>>
>>