none
Using System.Drawing.FontStyle

    Question

  • Hi,

    I've a wcf Service which expose a class (Text). In this class there's a property (Style), which type is  the enumeration System.Drawing.FontStyle.
    Building a Wcf client, it works and I'm able to use enumeration.
    Using the service in java, I can't find Style as enumeration, but as String[]...

    Can you tell me something about this topic? Is there a solution?
    thanks, fRenato
    Monday, July 06, 2009 10:13 AM

Answers

  • Hi fRenato,

    As John said, .NET specific type cannot be used directly in non-.NET servide client, this is the expected behavior.

    For your scenario, would you provide some more info on the service's business logic or its functionality? One possible approach is use a custom class (such as a custom Enumerate type) instead of the System.Drawing.FontStyle. Thus, for your .NET class, you can manually convert between your custom type and the FontStyle built-in type. For other non-.NET client, they'll be able to accept the custom type as a enumerate type.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, July 09, 2009 11:19 AM
    Moderator

All replies

  • Hi fRenato,

    I believe that the FontStyle enumeration is .NET framework specific, you can't use it in your Java code directly.

    Regards,
    John
    Monday, July 06, 2009 12:22 PM
  • Hi fRenato,

    As John said, .NET specific type cannot be used directly in non-.NET servide client, this is the expected behavior.

    For your scenario, would you provide some more info on the service's business logic or its functionality? One possible approach is use a custom class (such as a custom Enumerate type) instead of the System.Drawing.FontStyle. Thus, for your .NET class, you can manually convert between your custom type and the FontStyle built-in type. For other non-.NET client, they'll be able to accept the custom type as a enumerate type.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, July 09, 2009 11:19 AM
    Moderator