Usually WCF requires that each service method is marked with the OperationContract attribute with the exception
of methods decorated with the Web{Get,Invoke}Attribute attributes which are defined in System.ServiceModel.Web.
This patch adds a simple way to extend the ContractDescriptionGenerator in order to provide this functionality
without circular dependency of System.ServiceModel on System.ServiceModel.Web. Several extenders can be registered
with the description generator and they will be invoked in the registration order until any of them returns 'true'.
Extenders are passed a reference to the OperationContract attribute with which the current method is decorated - if
the reference is null, the extender should create a default instance of the attribute so that the description generator
considers the method as one to be included in the contract description.
* ServiceMetadataExtension.cs : Reduced not a few lines of code,
now that we know wsdl and help do not have to be differentiated,
this extension support can be a lot simpler.
* HttpListenerManager.cs :
No need to get messed around MetadataPublishingInfo anymore.
svn path=/trunk/mcs/; revision=159411
* ServiceHostBase.cs : Do not build more than one ChannelDispatcher
for a Binding. Then check duplicate listen URIs, excluding mex ones.
* ChannelDispatcher.cs : add simple bool field to mark for mex channel.
* ServiceMetadataExtension.cs : use simple ChannelDispatcher.IsMex field.
* ServiceHostTest.cs : improved endpoint tests and enabled them.
* ChannelDispatcherTest.cs : had to disable a test that regressed from
validating duplicate listen URI. Possible remedy is described too.
svn path=/trunk/mcs/; revision=159140
* ServiceHostBase.cs : retrieve MessageVersion and raise an error
if there is none. (Check this earlier than building a listener.)
* ChannelDispatcher.cs : MessageVersion check is moved to
ServiceHostBase.
* ServiceMetadataExtension.cs : overwrite MessageVersion to use None.
(The only special case I found for ChannelDispatcher.MessageVersion.)
* CustomBindingTest.cs : add tests for MessageVersion check on Open().
* MetadataExchangeBindingsTest.cs : make sure that special casing of
MessageVersion does not happen at this layer.
svn path=/trunk/mcs/; revision=159061
* OperationDescription.cs : add contract origin flags to identify
which operation should be used for client operations (and dispatch
too in the future).
* MessageDescription.cs : add IsRequest flag to indicate if it is
for request or not.
* ServiceContractGenerator.cs, ContractDescriptionGenerator.cs :
make use of above changes.
* ContractDescription.cs : don't create extraneous ClientOperations
in irrelevant message direction.
* EndpointDispatcher.cs, BaseMessagesFormatter.cs:
Now MessageDescription.Direction is differentiated from "IsRequest"
property, to precisely identify request/reply in callbacks. Also
now we don't have to create extraneous ContractDescription for
callbacks.
* DuplexClientRuntimeChannel.cs : do not create and use extraneous
ContractDescription for callback contract. Non-callback ones now
works fine.
This fixes service part of bug #567672, IsOneWay = true case.
svn path=/trunk/mcs/; revision=158454
* ContractDescriptionGenerator.cs : Now callback contract methods are
also reflected into OperationDescription as well as those from non-
callback contract. Callback methods have reverse MessageDirection,
so adjust them.
* ContractDescription.cs, ServiceEndpoint.cs, TypedMessageConverter.cs :
A bit of renaming / reflect method call changes.
* EndpointDispatcher.cs, DispatchRuntime.cs, ClientRuntime.cs :
now Callback[Dispatch|Client]Runtime properties are always filled
so that users can configure the callback runtimes (not sure such
configured runtimes work fine yet, but it is a required step).
* InputOrReplyRequestProcessor.cs : instead of HasCallbackRuntime
hack, use CallbackClientRuntime.CallbackContractType for checking
callback existence.
* ClientProxyGenerator.cs : CreateProxyType now carefully considers
requested proxy type, contract type and callback contract type.
i.e. now the resulting proxy has implemented methods for callbacks
that are also filled at ContractDescription.
* ClientRuntimeChannel.cs : reflect some method call changes.
svn path=/trunk/mcs/; revision=158412
* ContractDescription.cs : fill ClientOperation.Formatter here.
(It is hacky, see additional comment.)
* ClientRuntimeChannel.cs : replace GetFormatter() with Formatter.
* ClientOperation.cs : do the same for client side too.
svn path=/trunk/mcs/; revision=158083
* HttpListenerManager.cs : fixed the issue that mex_info is never
retrieved from the latest channel listener (which could be other
listener than the one which was set mex info).
* ServiceMetadataExtension.cs : raise an error if it failed to set
mex info. (Make it safer.)
svn path=/trunk/mcs/; revision=155991
* ServiceHostBase.cs : add host-to-http-listener mapping so that
they can be managed per host.
* HttpTransportBindingElement.cs,
HttpChannelListener.cs,
HttpListenerManager.cs : add host-to-http-listener mapping so that
they can be managed per host.
* ServiceMetadataExtension.cs : reflect DispatcherBuilder change.
svn path=/trunk/mcs/; revision=155974
* ContractDescriptionGenerator.cs : fill FaultDescription action,
name and namespace as expected.
* FaultDescriptionTest.cs : add new test.
* FaultContractAttributeTest.cs : new test.
* System.ServiceModel_test.dll.sources : add some new fault tests.
svn path=/trunk/mcs/; revision=154698