[ 
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

        

Reply via email to