You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kieran Benton (Created) (JIRA)" <ji...@apache.org> on 2012/01/14 19:59:39 UTC

[jira] [Created] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
-------------------------------------------------------------------------------------------------------------

                 Key: THRIFT-1489
                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
             Project: Thrift
          Issue Type: New Feature
          Components: C# - Compiler
            Reporter: Kieran Benton
            Priority: Minor


As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.

I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.

The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Benton reopened THRIFT-1489:
-----------------------------------


See my latest comment, but essentially I missed one tiny place where XML documentation support is required. Patch added to complete the work.
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch, 0003-Added-XML-documentation-support-to-generated-client-.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187563#comment-13187563 ] 

Kieran Benton commented on THRIFT-1489:
---------------------------------------

For anyone who's interested there's two rough areas to this:
A) my use of csharp:wcf=... to set the namespace. I would have preferred to have used a namespace decl in the file itself but couldn't see a way in the generators to easily access that
B) the uses of wcf faults and how they interact with thrift exceptions. Such a shame you can't mark a .net exception with the datacontract attribute and have it work properly. 


- Sent from a mobile Blackberry device


                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188062#comment-13188062 ] 

Hudson commented on THRIFT-1489:
--------------------------------

Integrated in Thrift #389 (See [https://builds.apache.org/job/Thrift/389/])
    THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton

changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh

roger : http://svn.apache.org/viewvc/?view=rev&rev=1232578
Files : 
* /thrift/trunk/.gitignore
* /thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc
* /thrift/trunk/lib/cpp/README_WINDOWS
* /thrift/trunk/test/csharp/ThriftTest/TestServer.cs
* /thrift/trunk/test/csharp/ThriftTest/maketest.sh

                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Benton updated THRIFT-1489:
----------------------------------

    Attachment: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch

Adding patch.
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Benton updated THRIFT-1489:
----------------------------------

    Attachment: 0003-Added-XML-documentation-support-to-generated-client-.patch
    
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch, 0003-Added-XML-documentation-support-to-generated-client-.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Roger Meier (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier resolved THRIFT-1489.
---------------------------------

    Resolution: Fixed

Thanks!
committed with the following changes:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh


                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Benton updated THRIFT-1489:
----------------------------------

    Attachment: 0002-Added-support-for-Thrift-comments-converting-them-to.patch
    
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189966#comment-13189966 ] 

Kieran Benton commented on THRIFT-1489:
---------------------------------------

Really sorry, but realised I'd missed one area of XML documentation generation - on the generated client side. Added another (tiny) patch to add support and reopening.
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch, 0003-Added-XML-documentation-support-to-generated-client-.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Benton updated THRIFT-1489:
----------------------------------

    Description: 
As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.

The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 

I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.

Usage of the option is as follows:

.\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift

Pretty simple :)

  was:
As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.

I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.

The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 

    
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Roger Meier (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier reassigned THRIFT-1489:
-----------------------------------

    Assignee: Roger Meier
    
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190098#comment-13190098 ] 

Hudson commented on THRIFT-1489:
--------------------------------

Integrated in Thrift #392 (See [https://builds.apache.org/job/Thrift/392/])
    THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton
fix: add missing area of XML documentation generation

roger : http://svn.apache.org/viewvc/?view=rev&rev=1234095
Files : 
* /thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc

                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch, 0003-Added-XML-documentation-support-to-generated-client-.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Bryan Duxbury (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187261#comment-13187261 ] 

Bryan Duxbury commented on THRIFT-1489:
---------------------------------------

Any Csharp people lurking about to give this a review?
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Kieran Benton (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187767#comment-13187767 ] 

Kieran Benton commented on THRIFT-1489:
---------------------------------------

Added an additional patch to cover including C# XML documentation in the same way that the Java compiler does - applying the parsed comments in the appropriate format to the generated C#. This is always enabled and not turned on by the new :wcf flag.
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (THRIFT-1489) Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code

Posted by "Roger Meier (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier resolved THRIFT-1489.
---------------------------------

    Resolution: Fixed

committed
                
> Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1489
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1489
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C# - Compiler
>            Reporter: Kieran Benton
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: 0001-Added-a-binding-option-csharp-wcf-http-testnamespace.patch, 0002-Added-support-for-Thrift-comments-converting-them-to.patch, 0003-Added-XML-documentation-support-to-generated-client-.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> As in the summary, I've modified the C# compiler to have an additional optional parameter "wcf" which has a root URI namespace passed to it. If these are present, the compiler will add [ServiceContract], [OperationContract], [DataContract], [DataMember] and [FaultContract] attributes to the appropriately generated entities.
> The big win here is that this essentially allows a server to handle both Thrift or XML/SOAP/JSON with little difference - a big issue for interoperability with external clients within a enterprise environment. 
> I've added provisional support for WCF "faults" by generating a corresponding "fault" class for each generated Thrift exception. It's not possible to add [DataContact] to generated exceptions as the base "Exception" class has support for ISerializable which WCF does not like. Possibility of modifying the C# library to handle throwing of faults and convert to the "thrift exception" counterpart if there is one? Workable for now though.
> Usage of the option is as follows:
> .\thrift.exe -o .\outputdir\ --gen csharp:wcf=http://mynamespace.com/services/ definition.thrift
> Pretty simple :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira