Commit Graph
45 Commits
Author SHA1 Message Date
Tony Di Nucci 40df8e384f Fix for #7305 - stack overflow when ServiceHost is initialised with a ServiceContract which implements an interface 2018-04-03 15:02:05 +02:00
hgy59 9b36f1452f wcf: fix index of message body parts. Do not use MessageBodyMemberAttribute.Order as index. 2018-03-28 10:46:43 +02:00
Ludovic Henry 249daf43de [mcs] Replace NET_2_1 by MOBILE
NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.
2016-08-18 16:34:36 +02:00
Miguel de Icaza 468225a247 Merge pull request #757 from mlintner/master
These changes fix 14335. When in getcontractinternal various things can ...

This patch further does not affect mobile.
2015-09-23 16:05:09 -04:00
Martin Baulig 87622fc711 [WCF]: Update to my last fix for bug #22129.
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.
2014-09-16 21:34:20 +02:00
Mark Lintner 9cb08ed0a8 undid some unecessary formatting 2013-09-19 21:43:04 -07:00
Mark Lintner b2dcf4fdab This adds a unit test and a more robust method for determining the servicecontract to be returned from ContractDescription.GetContract and to more accurately determine exceptional conditions. 2013-09-19 18:58:20 -07:00
Mark Lintner dd25ba0629 These changes fix 14335. When in getcontractinternal various things can confuse the host processing of ContractInterfaces. I only identified and fixed a couple so far and they fix problems with multiple inheritance of contracts and deep hierarchies. It is looking to verify that all of the contract interfaces it has in the list inherit from the root interface. However when IA and IB inherit from the IRoot. It will iterate nxn times and with multiple inehritance it will eventuall get a 1A and verify that it inherits from iroot it gois along until it verifies that A inherits from the root then finds it cannot verify IA becuase because it is checking to see if IB inherits from it. It doesnt because both of them are peers and inheit from IRoot. This threw an exception. I fixes that and a couple of related bugs.
Please enter the commit message for your changes. Lines starting
2013-09-15 10:27:04 -07:00
Miguel de Icaza b6d1b4492f Class libraries: introduce mobile_static profile, for MonoTouch-like static builds, but not limited to iOS (WinStore, Kumpera did the work). 2013-07-30 16:51:38 -04:00
Rodrigo Kumpera a0d28b2587 Kill the MOONLIGHT define in System.ServiceModel. 2013-02-11 13:01:11 -05:00
Martin Baulig 7c68dee830 [#6187][WCF]: Fix contract interface inheritance. 2012-09-18 05:20:30 +02:00
Atsushi Eno 106fdeb492 ReturnValue in MessageDescription was missing when there was MessageContract. 2011-08-24 12:09:16 -07:00
Atsushi Eno 951a6e6276 part of fix bug #41. MessageParameterAttribute is considered for return value. 2011-08-02 07:41:49 -07:00
Atsushi Eno 777580137c ServiceKnownTypeAttribute.MethodName was used way different to lookup method. 2011-04-14 14:56:07 +09:00
Atsushi Eno 549e702365 Add XmlSerializerFormatAttribute support in mobile profiles.
Unlike moonlight, XmlSerializer is in the framework lib (sys.xml), so we don't
have to split them out to Sys.Xml.Serialization.dll.
2011-04-08 15:58:04 +09:00
Atsushi Eno 852b7fe308 Some XmlSerializerFormatAttribute and XmlSerializerOperationBehavior refactoring. 2011-04-07 19:19:07 +09:00
Atsushi Eno 4379361aa7 Implement ConfigurationName support for ChannelFactory.
It is required for MoonlightDrtViewer bugfixing.
2011-04-01 18:23:16 +09:00
Peter Gerbrandt c48cff92ce Fix contract description for contracts with deep inheritance hierarchy. 2011-04-01 14:17:10 +09:00
Peter Gerbrandt bb22b06f22 Support for the same interface as service contract and as callback contract. 2011-03-07 12:51:19 +09:00
Atsushi Eno 86977acb58 Operation interface methods also have ServiceKnownType attributes. 2011-02-16 17:14:05 +09:00
Atsushi Eno b8ecb21ef2 Async MessageContract pattern needs more sophisticated contract validity check.
It totally killed discovery.
2011-02-15 23:24:01 +09:00
Atsushi Eno bac5d7a27f MessageHeaderDescription were not filled in message contract. Reject wrong contracts. 2011-02-15 22:11:22 +09:00
Atsushi Eno a2f1b9fb76 Now operations are collected per corresponding ContractDescription.
This fixes naming of MessageDescription Action URI from its type.
2011-02-03 01:07:44 +09:00
Atsushi Eno d7ad74f11f Implement GetInheritedContracts(), towards bugfix #668089. 2011-02-02 16:11:58 +09:00
Marek Habersack 8a63927fd1 [wcf] .NET allows for service contract methods to be decorated only by Web{Get,Invoke}Attribute
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.
2010-11-10 19:22:26 +01:00
Atsushi Eno 0e7a3971a3 Do not reject contract from the same method, could happen by a type with multiple service contracts within the typie hierarchy.
For details, see: http://lists.ximian.com/pipermail/mono-devel-list/2010-September/035940.html
2010-10-08 15:55:12 +09:00
Atsushi Eno 3905366d74 Add some argument check. RemoteAddress could be null for callback client runtime channel. 2010-09-03 15:14:32 +09:00
Atsushi Eno eed5cddbae 2010-06-04 Atsushi Enomoto <[email protected]>
* 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
2010-06-04 08:40:36 +00:00
Atsushi Eno 3966750e29 2010-06-03 Atsushi Enomoto <[email protected]>
* 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
2010-06-03 16:33:31 +00:00
Atsushi Eno d51ce00eba 2010-04-02 Atsushi Enomoto <[email protected]>
* 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
2010-04-02 09:39:45 +00:00
Atsushi Eno 3d1c16fc37 2010-04-02 Atsushi Enomoto <[email protected]>
* 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
2010-04-02 05:45:39 +00:00
Atsushi Eno 4a82278269 2010-01-13 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : fill Operation.Faults.

	* FaultContractInfo.cs : implement.
	* DispatchOperation.cs, ClientOperation.cs: fill Faults.

	* net_2_1_raw_System.ServiceModel.dll.sources :
	  add FaultContractInfo.cs.


svn path=/trunk/mcs/; revision=149445
2010-01-13 10:37:41 +00:00
Atsushi Eno 5c3aa1b73a 2010-01-08 Atsushi Enomoto <[email protected]>
* 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
2010-01-08 10:40:46 +00:00
Geoff Norton 7381abcea4 Put WCF back in to monotouch
svn path=/trunk/mcs/; revision=143021
2009-09-30 15:08:11 +00:00
Atsushi Eno f5d6d3167b 2009-09-06 Atsushi Enomoto <[email protected]>
* 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
2009-09-06 10:32:38 +00:00
Atsushi Eno 0ed29e41ae 2009-09-06 Atsushi Enomoto <[email protected]>
* 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
2009-09-06 02:34:53 +00:00
Atsushi Eno 179ab148aa 2009-08-07 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : add new contract getter to
	  create callback contract type (which does not demand
	  ServiceContractAttribute).


svn path=/trunk/mcs/; revision=139548
2009-08-07 06:27:33 +00:00
Atsushi Eno 358bd6b145 2009-07-02 Atsushi Enomoto <[email protected]>
* 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
2009-07-02 16:07:53 +00:00
Atsushi Eno 2b471a3555 2009-07-02 Atsushi Enomoto <[email protected]>
* 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
2009-07-02 12:59:32 +00:00
Atsushi Eno cb495e2901 2009-05-28 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : fill ProtectionLevel by
	  OperationContractAttribute.


svn path=/trunk/mcs/; revision=134954
2009-05-28 14:29:37 +00:00
Atsushi Eno cfd90af68a 2009-03-05 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : fill service known types.

	* ServiceKnownTypeAttribute.cs : correct implementation to populate
	  specified types.


svn path=/trunk/mcs/; revision=128719
2009-03-05 19:10:55 +00:00
Atsushi Eno 0c744bd73f 2009-02-12 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : do not write body wrapper element
	  when IsWrapped = false.


svn path=/trunk/mcs/; revision=126704
2009-02-12 11:29:36 +00:00
Atsushi Eno aa73556f40 2009-01-23 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : async begin method with
          [MessageContract] has 3 parameters, not 1.


svn path=/trunk/mcs/; revision=124303
2009-01-23 09:17:58 +00:00
Jb Evain 031fa07cc1 2008-09-12 Astushi Enomoto <[email protected]>
Jb Evain  <[email protected]>

	* Makefile: support net_2_1_raw compilation profile.
	* net_2_1_raw_System.ServiceModel.dll.sources

	* *.cs: SL2 compilation support.


svn path=/trunk/mcs/; revision=112857
2008-09-12 11:21:41 +00:00
Jb Evain bdd0809c70 move to from olive to mcs
svn path=/trunk/mcs/; revision=111187
2008-08-20 21:24:37 +00:00