[Mono-bugs] [Bug 691333] New: Query string convesion is unsupported from custom data type.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 3 00:40:54 EDT 2011



           Summary: Query string convesion is unsupported from custom data
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: sakno at tncor.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;

I have a WCF RESTful service(WebHttpBinding) that contains HTTP request handler
in the form of service method:
public sealed class Complex
  public double Image;
  public double Real;
public interface IArithmeticService
  [WebGet("?x={x}&y={y}", RequestFormat = WebMessageFormat.Json,
  Complex Add(Complex x, Complex y);
ComplexConverter is derived from System.ComponentModel.TypeConverter and
provide conversion from string to an instance of Complex class and vice versa.
This requirement is implemented according with the following article:
"Types that have a TypeConverterAttribute that can convert the type to and from
a string representation").
On Microsoft .NET, operation dispatcher receives query string, and converts
each parameter using ComplexConverter from string to an instance of Complex
class. Mono doesn't support this feature.

Reproducible: Always

Steps to Reproduce:
1. Write custom data type T;
2. Create a new class derived from TypeConverter class and implements
conversion between string and T;
3. Decorate T class with TypeConverterAttribute;
4. Create WCF RESTful service with service method that handles HTTP
parametrized request and accepts argument of T class;
5. Invoke service method from browser or client program;
Actual Results:  
Exception Conversion from the argument parameterType 'Company.Product.Type' is
not supported at
(System.String parameter, System.Type parameterType) 

Expected Results:  
WebDispatchMessageFormatter obtains TypeConverterAttribute and instantiates
converter for custom data type, then converts string to an instance of custom
data type and invokes service method successfully.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list