Commit Graph
204 Commits
Author SHA1 Message Date
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
Andreia Gaita 987ef9dbab [Json] Add support for calling external json (de)serialization methods
On Moonlight, ScriptObject types have custom (de)serialization methods that
need to be called whenever a user object includes properties of that type.
This patch creates a TypeMap subclass (ExternalTypeMap) and exposes a method
that can be called from moon's System.Windows.Browser to register custom
serialization and deserialization methods, keyed by type. These are called
whenever a property is found with a type (or base type) that has custom
methods registered.
2010-10-16 19:58:08 +01:00
Andreia Gaita ef2049a2b6 [Json] Fix decimal type serialization 2010-10-16 19:58:08 +01:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Frank Wilhelm 37329cdd7c Make Validate() less restrictive for contracts with explicit UriTemplate. 2010-10-15 19:41:33 +09:00
Andreia Gaita 7cfce53c32 [Json] Fix uint type conversion when reading, should be mapped to long, not int 2010-09-30 21:03:12 +01:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Atsushi Eno 5628b49a01 implemented large parts of WCF standard endpoints and configuration support. 2010-09-13 22:36:37 +09:00
Jb Evain 3f52624d8f Fix the mobile_System.ServiceModel.Web include 2010-09-08 18:48:35 +02:00
Jb Evain 704d43d176 Factorize the System.ServiceModel.Web monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain df235555ea Enable the System.ServiceModel.Web build for monodroid 2010-09-08 18:48:30 +02:00
Sebastien Pouliot 58907842f3 Fix public key in [InternalsVisibleTo] attribute
mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs: Use the
Silverlight public key (instead of the regular FX public key) for
NET_2_1
2010-08-27 14:32:20 -04:00
Jb Evain 2fc10ac052 fix the net_2_1 build 2010-08-11 10:43:49 +02:00
atsushieno 71992148d7 implement missing configuration members in Sys.SM.Web. 2010-08-04 19:21:03 +09:00
Andreia Gaita 778694e1b8 Add support for deserializing Char types
* JsonSerializationReader.cs: Add Char type to the switch. Reads the
  content as a string and validates its length
2010-07-27 20:12:02 +01:00
Andreia Gaita 4a6ea9c095 Add serialization support for generic IDictionary objects
* JsonSerializationReader.cs, JsonSerializationWriter.cs:
  Add a special case for IDictionary, since KeyValuePair objects
  have private setters and can't be processed via the normal
  object code path.
2010-07-27 20:08:15 +01:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
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 1451ae1956 2010-07-08 Atsushi Enomoto <[email protected]>
* WebHttpBehavior.cs : Set an a default DispatchOperation to throw 
	  EndpointNotFoundException instead of raising null Invoker error.
	  And add error handler that converts the exception to HTTP 404.


svn path=/trunk/mcs/; revision=160040
2010-07-08 10:29:45 +00:00
Atsushi Eno 3e59168e9d 2010-07-06 Atsushi Enomoto <[email protected]>
* TypeMap.cs :
	  Do not try to add static members as serialization targets.
	  Support OnDeserializing and OnDeserialized. Fixed bug #615800.

	* DataContractJsonSerializerTest.cs : add test for bug #615800.


svn path=/trunk/mcs/; revision=159958
2010-07-06 13:41:08 +00:00
Atsushi Eno b79dda6c6d 2010-07-06 Atsushi Enomoto <[email protected]>
* JsonSerializationWriter.cs : it cannot serialize DateTime in
	  double, which causes crash in deserializer.


svn path=/trunk/mcs/; revision=159945
2010-07-06 09:21:34 +00:00
Atsushi Eno 6ce2b49f94 2010-07-06 Atsushi Enomoto <[email protected]>
* TypeMap.cs : when an object is null, return null, not just an 
	  uninitialized object.

	* DataContractJsonSerializerTest.cs : add test for bug #615801.


svn path=/trunk/mcs/; revision=159944
2010-07-06 09:08:57 +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
Atsushi Eno 13e5341363 2010-07-06 Atsushi Enomoto <[email protected]>
* JsonReader.cs : do not keep Attribute state once Read() is called.


svn path=/trunk/mcs/; revision=159942
2010-07-06 08:53:58 +00:00
Atsushi Eno 607b85ba51 2010-06-22 Atsushi Enomoto <[email protected]>
* WebMessageEncodingBindingElement.cs : return MessageVersion in
	  GetProperty<T>(). Fixed WebHttpBinding working.

	* WebMessageEncodingBindingElementTest.cs : add test for
	  GetProperty<MessageVersion>().


svn path=/trunk/mcs/; revision=159316
2010-06-22 08:59:54 +00:00
Atsushi Eno f58223b1e8 2010-06-18 Atsushi Enomoto <[email protected]>
* Rss20ItemFormatter.cs : enabled DateTimeOffset parsing.
	  Fixed bug #615332, patch by Carlos Martin.


svn path=/trunk/mcs/; revision=159145
2010-06-18 17:53:42 +00:00
Atsushi Eno a5eefdf642 2010-06-16 Atsushi Enomoto <[email protected]>
* Atom10ItemFormatter.cs : Fix reading of "source" element to not
	  expect feed element (ReadFrom() expects it). Fixed bug #614596.


svn path=/trunk/mcs/; revision=159019
2010-06-16 12:42:09 +00:00
Atsushi Eno e84398552b Fix bug #612191, patch by Carlos Martin.
svn path=/trunk/mcs/; revision=158865
2010-06-14 06:20:36 +00:00
Atsushi Eno e276eefde2 this bug had nothing to do with it.
svn path=/trunk/mcs/; revision=157824
2010-05-25 05:54:52 +00:00
Atsushi Eno d006ca4a99 2010-05-25 Atsushi Enomoto <[email protected]>
* UriTemplate.cs : safe-unescape template parameters.
	  Got bug #573795 site working.


svn path=/trunk/mcs/; revision=157823
2010-05-25 05:43:00 +00:00
Atsushi Eno a1375bd687 2010-05-24 Atsushi Enomoto <[email protected]>
* JsonQueryStringConverter.cs : objects are regarded serializable as
	  long as they are public here, with some exceptions (not implemented).

	* JsonQueryStringConverterTest.cs : add more tests for CanConvert()
	  and reorganized some classes to make tests rational.


svn path=/trunk/mcs/; revision=157795
2010-05-24 12:38:12 +00:00
Atsushi Eno 94fc6b94d1 2010-05-21 Atsushi Enomoto <[email protected]>
* WebScriptServiceHostFactory.cs : similarly to ServiceDebugBehavior
	  and ServiceMetadataBehavior in ServiceHostBase, it must *prepend*
	  WebScriptEnablingBehavior to apply all other behaviors subsequently.


svn path=/trunk/mcs/; revision=157667
2010-05-21 07:19:58 +00:00
Atsushi Eno 02c1565c69 2010-04-24 Atsushi Enomoto <[email protected]>
* JsonSerializationReader.cs : use List<T> if the contract
          member type is interface.


svn path=/trunk/mcs/; revision=156039
2010-04-24 07:11:05 +00:00
Atsushi Eno 546b5d35f2 2010-04-05 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : don't use ToUniversalTime()
	  which makes test results timezone dependent.


svn path=/trunk/mcs/; revision=154780
2010-04-05 05:57:39 +00:00
Atsushi Eno ed25aa0106 2010-03-19 Atsushi Enomoto <[email protected]>
* WebHttpBehavior.cs : set FilterPriority to make it in higher
	  priority than conflicting endpoints (such as mex endpoint).


svn path=/trunk/mcs/; revision=153876
2010-03-19 02:26:11 +00:00
Jb Evain e1dc31d7ab use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153653
2010-03-16 10:53:59 +00:00
Jb Evain b3f3ef56c8 rename net_2_1 to moonlight
svn path=/trunk/mcs/; revision=153638
2010-03-16 08:32:37 +00:00
Atsushi Eno da5e52a621 2010-03-15 Astushi Enomoto <[email protected]>
* net_4_0_System.ServiceModel.dll.sources:
	  more types from Sys.SM.Web.dll in 4.0 profile here.

	* net_2_0_System.ServiceModel.Web.dll.sources,
	  common_System.ServiceModel.Web.dll.sources : UriTemplates are
	  moved to Sys.SM.dll in 4.0 profile.


svn path=/trunk/mcs/; revision=153562
2010-03-15 08:33:53 +00:00
Kornél Pál 85ceae01fd JavaScriptReader.cs: Deserialize false correctly. Fixed bug #586712.
svn path=/trunk/mcs/; revision=153536
2010-03-13 09:48:25 +00:00
Atsushi Eno ef6043ede2 2010-03-12 Atsushi Enomoto <[email protected]>
* monotouch_System.ServiceModel.Web.dll.sources :
	  This also needs new files.


svn path=/trunk/mcs/; revision=153487
2010-03-12 02:23:57 +00:00
Atsushi Eno 6f0cd4a650 2010-03-10 Atsushi Enomoto <[email protected]>
in System.ServiceModel.Web:
	* JavaScriptReader.cs : moved from Sys.Json/JsonReader.cs.

	* net_2_0_System.ServiceModel.Web.dll.sources,
	  net_2_1_raw_System.ServiceModel.Web.dll.sources :
	  move JsonReader.cs as Sys.R.S.Json/JavaScriptReader.cs

in System.Json:
	* JsonReader.cs : moved to Sys.SM.Web/Sys.R.S.Json.

	* System.Json.dll.sources : remove JsonReader.cs.


svn path=/trunk/mcs/; revision=153393
2010-03-10 10:22:36 +00:00
Atsushi Eno 286c255027 2010-03-10 Atsushi Enomoto <[email protected]>
in System.ServiceModel.Web:
	* JavaScriptObjectDeserializer.cs : new internal file, which is
	  used by System.Json (for moonlight compatibility).

	* net_2_0_System.ServiceModel.Web.dll.sources,
	  net_2_1_raw_System.ServiceModel.Web.dll.sources :
	  add JavaScriptObjectDeserializer.cs and JsonReader in Sys.Json
	  (which is to be moved later).

	* AssemblyInfo.cs: added InternalVisibleTo(System.Json). Also added
	  dummy 2.0 for easy testing.

in System.Json:

	* JsonValue.cs : use Sys.SM.Web.dll's JavaScriptObjectDeserializer
	  for silverlight sdk / moonlight compatibility.
	* JsonReader.cs : renamed to JavaScriptReader (for disambiguation in
	  Sys.SM.Web.dll). Now it is native-type based and used by the above
	  deserializer.

	* Makefile : reference System.Xml and System.ServiceModel.Web (for
	  moonlight compatibility).

	* AssemblyInfo.cs : use the same pub key in 2.0 (dummy), to ease
	  testing locally.



svn path=/trunk/mcs/; revision=153392
2010-03-10 10:17:24 +00:00
Atsushi Eno fb01abdaa2 2010-03-10 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : oops, the test was careless.
	  Use fixed date.


svn path=/trunk/mcs/; revision=153390
2010-03-10 08:29:40 +00:00
Atsushi Eno 2e11b2e4fa 2010-03-09 Atsushi Enomoto <[email protected]>
* JsonSerializationWriter.cs, JsonSerializationReader.cs,
	  JsonWriter.cs : Fix DateTime serialization and "\/" string escape
	  issues. Fixed bug #586169.

	* DataContractJsonSerializerTest.cs : add test for bug #586169.
	* JsonWriterTest.cs : add standalone write case for "\/".


svn path=/trunk/mcs/; revision=153318
2010-03-09 11:21:24 +00:00
Atsushi Eno 3c732b3a95 2010-03-02 Atsushi Enomoto <[email protected]>
* EncodingConverter.cs, WebHttpBindingElement.cs,
	  WebHttpSecurityElement.cs : implement OnApplyConfiguration(), fill
	  some TypeConverters, and fix BindingElementType, based on the patch
	  by Sander Rijken.

2010-03-01  Sander Rijken  <[email protected]>

	* webHttpBinding, webHttpBinding.config : new test files.

2010-03-01  Sander Rijken  <[email protected]>

	* WebHttpBindingElementTest.cs : new test.

2010-03-02  Atsushi Enomoto  <[email protected]>

	* System.ServiceModel.Web_test.dll.sources : add new test.
	* Makefile : add new extra dist.


svn path=/trunk/mcs/; revision=152807
2010-03-02 07:46:25 +00:00
Atsushi Eno a7b1a7ee44 2010-02-24 Atsushi Enomoto <[email protected]>
* JsonWriter.cs : write NaN, INF, -INF as JSON string, not JSON number.
	  Fixed bug #573691.


svn path=/trunk/mcs/; revision=152342
2010-02-24 09:46:11 +00:00
Atsushi Eno 9579012ec5 2010-01-27 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer.cs : KnownTypes does not include root
	  type. Fixed bug #573689.

	* DataContractJsonSerializerTest.cs :
	  enable TypeIsNotPartsOfKnownTypes(), and add more related tests.


svn path=/trunk/mcs/; revision=150279
2010-01-27 06:17:48 +00:00