[
https://issues.apache.org/jira/browse/THRIFT-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090251#comment-15090251
]
Benjamin Gould commented on THRIFT-3523:
----------------------------------------
> That stuff could fit into the contrib folder.
> However, it also somewhat overlaps with the existing XSD generator. How would
> you describe the relationship between those two?
Unfortunately the XSD generator doesn't actually produce a valid XML schema in
many cases... IIRC it doesn't really handle container types properly etc. Also
it generates some weird PHP include files which don't have a clear purpose. I
just assumed that the whole generator is some old code that has|had some
usefulness at Facebook and is not really for general use.
I don't think my solution is necessarily a good replacement though (at least
from a Thrift compiler perspective) because it depends on having a XSLT library
available to transform the output of this XML generator... that would introduce
a dependency to the compiler, and it is something that can easily be done by
application code. It makes sense to me that those transforms could go into the
contrib folder, or in the lib/xml folder. In any case, while my solution is
working well enough that I can import the WSDLs into soapUI and use it as a
test client for my Thrift services, the transforms are still "alpha" and need
some polishing up, and I still need to implement some corner cases like parent
services etc. When they are further along I can open up a new JIRA ticket.
> XML Generator
> -------------
>
> Key: THRIFT-3523
> URL: https://issues.apache.org/jira/browse/THRIFT-3523
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (General)
> Reporter: Benjamin Gould
> Assignee: Benjamin Gould
> Priority: Minor
>
> I've put together an XML model for Thrift IDL that is very similar in concept
> and structure to the model created by the JSON generator of the Thrift
> compiler. The code is based on the JSON generator, and inherits the 'merge'
> option from that module for including the model of all includes in a single
> file if desired.
> This generator is useful if you wish to extend the Thrift compiler with some
> XML based templating engine such as XSLT. For example I have prototyped
> transforms that can create valid XML schema and WSDL files from Thrift IDL,
> as well as transform SOAP requests and responses to and from Thrift messages.
> Those transforms are not included because they may be outside the scope of
> Thrift, but I can provide them if interested. Regardless, I feel the XML
> model is generally useful and might be a good addition to the Thrift compiler.
> Also included is an XML schema for the model file format and tests that
> generate XML from existing IDL in the Thrift test suite to validate against
> that schema. These tests are Ant based and so only run when --with-java is
> enabled in ./configure
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)