Commit Graph
35 Commits
Author SHA1 Message Date
Miguel de Icaza 64c50872d7 [System.ServiceModel.Web/WebMessageFormatter] Fix OperationContracts with void returns
WebMessageFormatter crashes when the OperationContracts had a void return type.

Fixes #20764, patch from <[email protected]>
2015-03-05 11:33:26 -05:00
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Rodrigo Kumpera f378e23a3f Since NET_2_1 implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:41:51 -05:00
Rodrigo Kumpera de71901cf8 Kill the MOONLIGHT define in System.ServiceModel.Web. 2013-02-11 13:01:10 -05:00
Atsushi Eno 9f3efdc59e Fix NET_2_1 builds. 2011-10-26 00:35:57 +09:00
Miguel de Icaza 8c810e02a3 Apply patch from Mario Kosmiskaso fix bug 1209: Patch to correctly expose WebOperationContext.IncomingResponse
There was apparently no point in the call flow when the reponse message was set
in the context, resulting in WebOperationContext.IncomingResponse always being
null.

After patching WebMessageFormatter to set the response in the context (if
available) the value of WebOperationContext.IncomingResponse was still null. A
bit more investigation showed that IncomingWebResponseContext would construct a
HttpResponseMessageProperty encapsulating the OperationContext at the time the
request was made but before the response was received and cache that object.
That caused the HttpResponseMessageProperty to always have a null value for the
response. The second part of the patch changes this behavior and always creates
a new HttpResponseMessageProperty on GET.
2011-10-16 11:46:00 -04:00
Atsushi Eno ff0aa4e036 Revert GET switch for serializing requests. BodyWriter handles it better. 2011-08-24 18:11:25 -07:00
Atsushi Eno eb1d9dc2da for GET request, just skip the member. It does not contain xml for null. 2011-08-24 16:46:08 -07:00
Atsushi Eno 3d385eb270 Skip serialization when the return type is void.
This batch should fix bug #206.
2011-08-24 12:14:48 -07:00
Atsushi Eno 6bdb4baa47 Differentiate GET query parameter binding from another request binding.
This is one core of the bugfix for #206.
2011-08-24 12:05:05 -07:00
Atsushi Eno cc8c07fb8c UriTemplate should not be mandatory, make it optional. Fix unit test. 2011-08-23 11:31:06 -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 012a859db4 Fix 2.0 build. 2011-06-13 21:35:16 +09:00
Atsushi Eno 8219d05935 Implement OnWriteBodyContents() and add message buffer support for RawMessage. 2011-06-13 20:05:27 +09:00
Atsushi Eno 8a8df8387b Return null for empty message in WebMessageFormatter. Useful eror messages. 2011-04-15 23:49:39 +09:00
Atsushi Eno 2464cfc869 Read body content if required. Fixed all issues in bug #656020.
Now it considers message content format and IsWrapped[Request|Response] to
retrieve XmlObjectSerializer.
2011-01-20 15:32:33 +09:00
Atsushi Eno e96fbeb319 Serialize non-mapped message parameter as body content. Part of bug #656020 fix. 2011-01-19 17:05:07 +09:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Atsushi Eno cee551a2f4 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageEncoder.cs : support Raw message in ReadMessage() too.
	  Allow null content type.

	* WebMessageFormatter.cs : do not depend on WebOperationContext.
	  add support for Raw format request.

	* WebMessageEncodingBindingElementTest.cs : add test for null
	  content type for ReadMessage() (allowed),

	* WebHttpBehaviorTest.cs : add test for deserializing Raw request
	  message too.


svn path=/trunk/mcs/; revision=160377
2010-07-14 18:24:54 +00:00
Atsushi Eno 74ec2c95ef 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : add support for Raw format.

	* WebMessageEncoder.cs : support Raw message. Fixed bug #619542.

	* WebHttpBehaviorTest.cs : add test for bug #619542 (not sure if it
	  works on mono; run-test is broken in trunk. Verified under .NET).


svn path=/trunk/mcs/; revision=160341
2010-07-14 08:43:31 +00:00
Atsushi Eno 4efe543e9f 2010-07-06 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer_2_1.cs : add extra methods for
	  Sys.SM.Web.Extensions build.

	* WebMessageFormatter.cs : add NET_2_1 profile build.

	* AssemblyInfo.cs : InternalVisibleTo System.ServiceModel.Web.Extensions.


svn path=/trunk/mcs/; revision=159943
2010-07-06 08:59:28 +00:00
Jb Evain e1dc31d7ab use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153653
2010-03-16 10:53:59 +00:00
Atsushi Eno b5688b9e2d add experimental monotouch build.
svn path=/trunk/mcs/; revision=144701
2009-10-23 02:37:20 +00:00
Atsushi Eno ae41bed338 2009-10-08 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer.cs, JsonSerializationWriter.cs:
	  alwaysEmitTypeInformation is  false by default. It is for __type
	  attribute, not for type attribute. __type name is always with ":#".
	* TypeMap.cs : sort members in default typemap (it is ordered).
	  Uncomment EmitDefaultValue.
	* JsonWriter.cs : handle "null" string (it is somewhat messy).

	* WebMessageEncoder.cs : use alwaysEmitTypeInformation to output
	  object __type.

	* DataContractJsonSerializerTest.cs : added test for
	  alwaysEmitTypeInformation argument.


svn path=/trunk/mcs/; revision=143748
2009-10-08 09:55:36 +00:00
Atsushi Eno cd263cb1f4 2009-10-08 Atsushi Enomoto <[email protected]>
* JsonQueryStringConverter.cs : add custom body name support (used.
	  for AJAX). Handle string value (in very LAMESPEC way).
	* WebMessageFormatter.cs : add custom body name support.
	  Slightly changed reply serialization.
	  Convert deserialized values using QueryStringConverter.

	* WebScriptEnablingBehavior.cs : use JsonQueryStringConverter, with
	  "d" wrapper name. Allow only WrappedRequest.

	* JsonQueryStringConverterTest.cs : added some string deserialization
	  test. It just proved .NET is too lame.


svn path=/trunk/mcs/; revision=143747
2009-10-08 08:59:56 +00:00
Atsushi Eno c213f959b4 2009-10-07 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : revert and fix wrapper name change. XML
	  and JSON have different serialization.


svn path=/trunk/mcs/; revision=143697
2009-10-07 18:30:51 +00:00
Atsushi Eno baedd9881f 2009-10-07 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : also fix wrapped message deserialization.
	  It should expect FooResponse (body WrapperName), not FooResult
	  (ReturnValue part Name).


svn path=/trunk/mcs/; revision=143694
2009-10-07 17:48:01 +00:00
Atsushi Eno 85da709567 2009-10-07 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : when they serialize Wrapped message, it
	  first writes "root" and then the wrapper element.


svn path=/trunk/mcs/; revision=143689
2009-10-07 17:10:27 +00:00
Atsushi Eno 2e58802be5 2009-10-07 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : JSON writer does not support namespace.


svn path=/trunk/mcs/; revision=143635
2009-10-07 12:53:36 +00:00
Atsushi Eno f8705002b6 2009-09-02 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : it was not returning value with correct
	  wrapper name/namespace. Fix interop with .NET client.


svn path=/trunk/mcs/; revision=141121
2009-09-02 11:41:43 +00:00
Atsushi Eno b231dcede6 2009-09-02 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : Made the same prohibition for dispatch
	  formatters too. Support WebMessageBodyStyle on dispatcher side too.


svn path=/trunk/mcs/; revision=141117
2009-09-02 11:04:52 +00:00
Atsushi Eno d64b10b0c7 2009-09-02 Atsushi Enomoto <[email protected]>
* WebHttpBehavior.cs : now message formatters are pairs of request/
	  reply formatters.

	* WebMessageFormatter.cs : override some serialization methods as
	  prohibited.

	* WebHttpBehaviorTest.cs : some message formatters tests.


svn path=/trunk/mcs/; revision=141112
2009-09-02 10:35:08 +00:00
Atsushi Eno 36942bc07b 2009-09-02 Atsushi Enomoto <[email protected]>
* WebHttpDispatchOperationSelector.cs : use common extension method.
	* WebMessageFormatter.cs : support WebMessageBodyStyle(.Wrapped*).
	  Cache serializers.


svn path=/trunk/mcs/; revision=141102
2009-09-02 08:53:30 +00:00
Atsushi Eno fb60368a09 2009-07-28 Atsushi Enomoto <[email protected]>
* OutgoingWebRequestContext.cs : implement.

	* WebMessageFormatter.cs : apply OutgoingRequest if available.


svn path=/trunk/mcs/; revision=138782
2009-07-28 03:21:20 +00:00
Jb Evain 982e3b35a4 move to from olive to mcs
svn path=/trunk/mcs/; revision=111188
2008-08-20 21:25:05 +00:00