Commit Graph
153 Commits
Author SHA1 Message Date
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
Martin Baulig 1ae87e9ee9 [WCF]: Add stubs for some missing .NET 4.0/4.5 APIs. 2013-09-02 21:52:13 +02:00
Rodrigo Kumpera a0d28b2587 Kill the MOONLIGHT define in System.ServiceModel. 2013-02-11 13:01:11 -05:00
Martin Baulig 37b26ae4a0 [#7177][WCF]: Correctly handle derived FaultExceptions. 2012-09-19 06:01:11 +02:00
Rolf Bjarne Kvinge 9ab872cb69 System.ServiceModel: Make FaultContractInfos available (and therefore deserialized correctly) in mobile profiles. Fixes #1437 and 2859. 2012-02-04 03:04:34 +01:00
Jonathan Pryor 00e29089c7 [System.ServiceModel] Don't try to deserialize void messages.
Fixes: http://bugzilla.xamarin.com/show_bug.cgi?id=1164

The breakage reported in #1164 was caused by commit 106fdeb4, which
fixed bxc206. The problem is that in fixing bxc206, response messages
of a type having a MessageContractAttribute custom attribute were
changed to have a `void` return type, according to the
MessageDescription's Body.ReturnValue.Type property.

This fix is correct, in that it's what .NET does, but it broke XML
deserialization which expected the "actual" return type to exist, not
`void`.

Case in point: the added IService1.EndJSMGetDatabases() method will
have a MessageDescription with a Body.ReturnValue.Type=typeof(void).
The problem is that deserializing this message will fail:

	System.Runtime.Serialization.SerializationException: Deserializing
	type 'System.Void'. Expecting state 'EndElement'. Encountered state
	'Text' with name '' with namespace ''.

Obviously this is not good. ;-)

The fix is simple: don't use the MessageDescription's ReturnValue if
it's `typeof(void)`.

There are two added wrinkles:

 1. Writing a test case for the above.

 2. The test case broke with another error: a NRE within
    BaseMessagesFormatter.MessageObjectToParts(). This is because
    when ContractDescriptionGenerator.GetMessage() sets the
    ReturnValue for a response message, it doesn't set
    MessagePartDescription.MemberInfo.
    BaseMessagesFormatter.MessageObjectToParts(), meanwhile, was
    checking the ReturnValue's MemberInfo...which was null.

    Add a null check here so that the actual bug can be tested.
2012-01-20 00:18:54 -05:00
Martin 5aecac0f33 completes commit 4f3d21e46e 2011-12-29 15:38:58 +01:00
QuickJack 4f3d21e46e Fixes CS0168 in System.ServiceModel.dll 2011-12-29 15:28:26 +01:00
Miguel de Icaza 2852ed0b59 Update copyrights 2011-09-13 18:26:13 -04:00
Sebastien Pouliot 7894348cc8 Add null-check on 'partDesc'. Fix bug #612 (WCF regression) 2011-09-07 11:16:23 -04:00
Atsushi Eno bde305b72c When there is void return, the common message formatter should ignore it.
This case occurs when MessageContract is used and there is no member for
the return value.
2011-08-24 12:10:31 -07:00
Atsushi Eno 2be522da83 This filter should ignore port, and should not filter out anonymous URIs. 2011-08-24 12:00:59 -07:00
Atsushi Eno 5fc5f02c46 Merge pull request #145 from ngraziano/99b87f07af0beed3a887
Fix Service Model Xml Serialization and XMLAttributes
2011-08-03 05:54:54 +09:00
Atsushi Eno 0c7d5fcc14 Fill/reflect ReturnValue to and from corresponding message part.
This may have fixed bug #41.
2011-08-02 09:58:28 -07:00
Atsushi Eno 226c2db9ac Implement support for Stream param with WebHttpBinding raw content format. 2011-06-28 20:43:13 +09:00
Atsushi Eno 0045240824 Enable environment-controled output on non-moon profile too. Add error logging. 2011-04-25 15:35:03 +09:00
Atsushi Eno a316b856d0 Get real fix for bug #687902. Revert request processor IDisposable.
and handle session shutdown when creating InstanceContext.
Also add note on DisposeInstance(), which got me stuck.
2011-04-20 19:11:34 +09:00
Atsushi Eno 5c306c5d04 Ongoing service channel closing fix and session management in ChannelDispatcher.
It is part of bugfix 687902.

To get the bug fixed, the new "using" sections in ChannelDispatcher.cs to
explicitly dispose channels. But this causes regression in PerSession-based
tests. So some new session management code is (likely) required as well.

It will also alter "mixed" MaxConcurrentCalls and MaxConcurrentSessions with
correct management code.
2011-04-20 16:52:36 +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 72f0cd6e5b Split XmlMessagesFormatter out. It is for use in Sys.Xml.Serialization.dll.
XmlMessagesFormatter will be used in Sys.Xml.Serialization.dll and this
type should not be excluded by !NET_2_1 or !MOONLIGHT. It is not doable
if this class is in BaseMessagesFormatter.cs.
2011-04-08 00:19:40 +09:00
Atsushi Eno 852b7fe308 Some XmlSerializerFormatAttribute and XmlSerializerOperationBehavior refactoring. 2011-04-07 19:19:07 +09:00
Rolf Bjarne Kvinge 30443d63dd System.ServiceModel: make it a lot more compatible with Silverlight 2011-03-31 16:01:22 +02:00
Atsushi Eno e60ff5ff90 Add endpoint behavior support in NET_2_1, which involved not a few additions. 2011-03-16 17:20:00 +09:00
Peter Gerbrandt fe6910a0a8 Apply DataContractSerializerOperationBehavior. 2011-03-14 12:16:25 +09:00
Atsushi Eno 1e4407cd84 Replace SRE-based client proxy generator with RealProxy.
Now PE verified workaround should be unnecessary.
2011-03-07 12:29:39 +09:00
Atsushi Eno 1125d54fa3 Another fix to not write null header. Add UniqueId deserialization workaround. 2011-02-24 14:24:44 +09:00
Atsushi Eno 3378ca880c Do not try to serialize null header item. 2011-02-18 16:23:15 +09:00
Atsushi Eno 3aaf87fe84 Message headers are now serialized and deserialized for MessageHeaderDescription. 2011-02-15 23:14:27 +09:00
Atsushi Eno 58a7b75bd8 Support ServiceKnownTypes. Fixed another case on bug #652331. 2011-02-09 15:42:40 +09:00
Atsushi Eno cae51172f8 Open and close client/service runtime channels in chains. Fixed bug #663278. 2011-02-07 23:15:22 +09:00
Atsushi Eno 0351f32bb8 handle IsTerminating. 2011-02-07 23:14:53 +09:00
Atsushi Eno e0a3b79880 Callback contract should be distinguished from others for DispatchOperation. 2011-02-04 12:50:25 +09:00
Atsushi Eno 91074e3475 Fix regression, avoid null key. 2011-01-21 20:24:30 +09:00
Atsushi Eno b2802fa2d5 And rename source file name. 2011-01-21 16:20:23 +09:00
Atsushi Eno 3691992579 Rename InstanceBhavior, too ambiguous among IXxxBehavior interfaces. 2011-01-21 16:18:54 +09:00
Atsushi Eno feec98f870 Sessions should not be keyed by MessageId but be done by channel SessionId. 2011-01-21 16:17:59 +09:00
Marek Habersack d4bb1c86b7 [wcf] make /js and /jsdebug dispatchers work.
There were several issues here:

- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
  ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
  This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
  dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
  when it should first try to find one whose URL matches the current request exactly.
2010-10-20 15:04:37 +02:00
Atsushi Eno 0c7a1a1f5c Fix the issue that callback contract often gets confused by picking unexpected contract type.
The problem is that DispatchRuntime.Type is a service implementation type
that could implement two or more contract interfaces, and it was in random
order how ServiceProxyGenerator picks up the contract type. Now it looks
for correct contract type instead of the service type by exactly looking
for the target contract in the endpoint (dispatcher).
2010-09-29 16:41:59 +09:00
Atsushi Eno 66cda586dc 2010-07-12 Atsushi Enomoto <[email protected]>
* InputOrReplyProcessor.cs : remove SecurityHandler. WS-Trust must
	  be handled before endpoint dispatching (it must not pass contract
	  filter) and doesn't make sense to be here.
	* SecurityHandler.cs : move to old-code.

	* SecurityReplyChannel.cs : handle WS-Trust message here.
	* SecurityRequestContext.cs : so, do not pass those messages here.

	* SslSecurityTokenAuthenticator.cs,
	  AuthenticatorCommunicationObject.cs,
	  SecureConversationSecurityTokenAuthenticator.cs :
	  add timeout argument to negotication requests.

	* System.ServiceModel.dll.sources: remove SecurityHandler.cs


svn path=/trunk/mcs/; revision=160244
2010-07-12 13:17:58 +00:00
Atsushi Eno 6da7552dd2 more internal namespace moving.
svn path=/trunk/mcs/; revision=160234
2010-07-12 10:46:21 +00:00
Atsushi Eno d46518eef2 2010-07-12 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : apply ErrorHandlers to IInputChannel too.


svn path=/trunk/mcs/; revision=160228
2010-07-12 09:43:24 +00:00
Atsushi Eno ec25baadc3 2010-07-09 Atsushi Enomoto <[email protected]>
* PostReceiveRequestHandler.cs : don't replace correctly passed-by-
	  reference Message with wrong, consumed Message.


svn path=/trunk/mcs/; revision=160148
2010-07-09 18:16:33 +00:00
Atsushi Eno b177dfdc22 2010-07-09 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : do not swallow exception during
	  RequestContext.get_RequestMessage() and thus return SOAP Fault for
	  MessageSecurityException to the client.


svn path=/trunk/mcs/; revision=160122
2010-07-09 12:36:21 +00:00
Atsushi Eno e9f74b8a85 2010-07-08 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : support ErrorHandlers.


svn path=/trunk/mcs/; revision=160041
2010-07-08 10:30:40 +00:00
Atsushi Eno ab39e8acac 2010-07-05 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs :
	  moved IChannelDispatcherBoundListener from HttpChannelListener.cs.

	* SvcHttpHandler.cs : removed old code and #if blocks.

	* HttpStandaloneReplyChannel.cs
	  HttpStandaloneRequestContext.cs
	  HttpStandaloneChannelListener.cs
	  HttpReplyChannel.cs
	  HttpRequestContext.cs
	  HttpChannelListener.cs : renamed former 3 files to latter 3 files.

	* System.ServiceModel.dll.sources :
	  renamed new HTTP channel listener implementation sources, and
	  removed old sources.



svn path=/trunk/mcs/; revision=159913
2010-07-05 17:29:24 +00:00
Atsushi Eno f8bdb655cb 2010-07-02 Atsushi Enomoto <[email protected]>
* MessageProcessingContext.cs : update possibly-updated ReplyMessage
	  to send, by message inspectors. Fix by Clovis Ribeiro, should fix
	  bug #619534.


svn path=/trunk/mcs/; revision=159820
2010-07-02 16:28:03 +00:00
Atsushi Eno b1be2aea6f 2010-06-24 Atsushi Enomoto <[email protected]>
* HttpTransportBindingElement.cs :
	  Use new HTTP channel listener implementation.

	* ChannelDispatcher.cs : enable service throttling again.
	  This time Http(Listener), ASP.NET and TCP listeners all work.

	* System.ServiceModel.dll.sources :
	  add new HTTP channel listener implementation sources.

	  Old sources will be kept for a while, won't entirely vanish as
	  ASP.NET support will live there.


svn path=/trunk/mcs/; revision=159491
2010-06-24 12:07:13 +00:00
Atsushi Eno 975c8846f8 2010-06-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : raise an error if IChannelListener is
	  already opened when it's opening.


svn path=/trunk/mcs/; revision=159267
2010-06-21 13:56:53 +00:00
Atsushi Eno d24448c5b9 2010-06-21 Atsushi Enomoto <[email protected]>
* ServiceThrottle.cs : take ChannelDispatcher to validate setters.

	* ServiceThrottlingBehavior.cs : pass channel dispatcher for .ctor.

	* ServiceHostBase.cs : remove extra throttling field.


svn path=/trunk/mcs/; revision=159232
2010-06-21 07:44:07 +00:00
Atsushi Eno 880083beeb 2010-06-18 Atsushi Enomoto <[email protected]>
* 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
2010-06-18 15:33:40 +00:00