[Mono-dev] [PATCH] System.Web.Services: support for interface service declaration

Atsushi Eno atsushi at ximian.com
Mon Mar 19 04:00:26 EDT 2007


Hi Kosta,

>         - Does this change intended to include private methods
>           (BindingFlags.NonPublic) in a *class* as well as
>           private interface implementation? If yes why?
> 
> Yes, it's intentionally, but only if they are an implementation of an 
> interface.
> Why? This is an MS behavior. They include methods even if the interface 
> declared privately!

Well, what I've asked was different. I was reading the patch and
thought that if private methods with [WebMethod] in a class (where
no interfaces are involved) are exposed as web service operations.

Now I cooked such case on .NET, ran it and they are not exposed, and
tried the patch and saw that they are not exposed after your patch.
So from the result there was no such issue that I was afraid.

>         - I'm not sure that comparing methods in your own way is
>           good. At least comparing ParameterInfo just by Type
>           does not look good enough.
> 
> I need to check that a method is an implementation of the relevant 
> method declared in an interface. Can you propose a correct way / point 
> on issues in my implementation?

Hmm ok, what I was wondering was what if they have ref/out parameters
but there is not likely (or very unlikely) that could bring issues.
Operations that have the same name result in an error, and there are
very unlikely Foo(param) and Foo(out param) in the same contract.
So I stop almost pointless thoughts here.

>         - Is ConformanceChecker change relevant, or is this just
>           a fix that happened to be included? If yes please commit
>           this one individually (having test case is much better).
> 
> It's related, but can be separated. The issue comes because I have 2 
> bindings to different Namespaces. In this case 'collection != null' so 
> GetDocument returned null and conformance checking failed.

Ah, that's why.

BTW the patch broke one test case:

Failures:
1) 
System.Web.Services.Protocols.SoapHttpClientProtocolTest.OutParametersTest :
System.NullReferenceException : Object reference not set to an instance 
of an object
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke 
(System.String method_name, System.Object[] parameters) [0x00021] in 
C:\cygwin\home\atsushi\svn\mcs\class\System.Web.Services\System.Web.Services.Protocols\SoapHttpClientProtocol.cs:357
   at 
System.Web.Services.Protocols.SoapHttpClientProtocolTest+FooService.Req 
(System.String arg, System.Int32& status, System.Boolean& 
statusSpecified) [0x00000] in 
C:\cygwin\home\atsushi\svn\mcs\class\System.Web.Services\Test\System.Web.Services.Protocols\SoapHttpClientProtocolTest.cs:80
   at (wrapper remoting-invoke-with-check) FooService:Req 
(string,int&,bool&)
   at 
System.Web.Services.Protocols.SoapHttpClientProtocolTest.OutParametersTest() 
[0x0004e] in 
C:\cygwin\home\atsushi\svn\mcs\class\System.Web.Services\Test\System.Web.Services.Protocols\SoapHttpClientProtocolTest.cs:55

As long as it goes away, it could go into svn I think. Thanks again :)

Atsushi Eno



More information about the Mono-devel-list mailing list