The problem already starts when creating the OperationDescription; we need
to also look at the End* method here to correctly parse the reply parameters.
Then ClientRuntimeChannel.Process needs to distinguish between sync/async
and copy the out/byref parameters when needed.
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.
* 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
* 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
* FaultDescription.cs : fill Action.
* ContractDescriptionGenerator.cs : do not fill Faults from service
impl. method. Do this from contract method instead.
* OperationDescription.cs : remove extra TODOs.
svn path=/trunk/mcs/; revision=154691
* ContractDescriptionGenerator.cs : fix GetCallbackContract() to
correctly retrieve ServiceContractAttribute from the service type,
not the callback type. This ended up to get the bug #567672 sample
working (but it will break at some stage as it involves some
non-implemented classes).
* EndpointDispatcher.cs, InputOrReplyRequestProcessor.cs :
Pass service type to correctly retrieve ServiceContractAttribute
from the service type, not callback type.
* ServiceProxyGenerator.cs, ServiceRuntimeChannel.cs :
Pass service type to correctly retrieve ServiceContractAttribute
from the service type, not callback type.
* CallbackBehaviorAttributeTest.cs : added callback example from
bug #567672.
svn path=/trunk/mcs/; revision=149226
* ContractDescriptionGenerator.cs : default action name is prepended
"urn:", and on the other hand do not add extra '/' in such case.
* HttpRequestChannel.cs : Fix message version member comparison.
Double-quote SOAPAction. Remove extra Exception.
* HttpReplyChannel.cs : ditto for version comparison. Unquote above.
* HttpRequestContext.cs : when addressing is None, remove action
from the message.
svn path=/trunk/mcs/; revision=141394
* ContractDescriptionGenerator.cs : end method lookup should be
done against the type that defines begin method.
* ClientProxyGenerator.cs : it missed end method argument on
generating end method proxy.
svn path=/trunk/mcs/; revision=141393
* ContractDescriptionGenerator.cs : add new contract getter to
create callback contract type (which does not demand
ServiceContractAttribute).
svn path=/trunk/mcs/; revision=139548
* ContractDescriptionGenerator.cs : actually it had to fill all of
the interface methods (and implementation methods).
* ContractDescriptionTest.cs : make sure the contract actually
contains operations from the base types.
svn path=/trunk/mcs/; revision=137307
* ContractDescriptionGenerator.cs : do not reject derived service
contract from another service contract type.
* ContractDescriptionTest.cs : added test for derived contract type.
svn path=/trunk/mcs/; revision=137288
* ContractDescriptionGenerator.cs : fill service known types.
* ServiceKnownTypeAttribute.cs : correct implementation to populate
specified types.
svn path=/trunk/mcs/; revision=128719