-
-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Java code generation from WSDL files #14545
Conversation
Sorry for the delayed review here! Actually consuming this one will be blocked by #14258, which is on my plate for (hopefully) next week. I'll make sure to loop back around on it then. |
Sorry for the continued delay here! @Eric-Arellano is going to be picking up the codegen investigation. Have also requested a review from @tdyas, who has experience in this area. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This seems landable, but I'll leave it up to @Eric-Arellano and @tdyas to decide whether to enable shipping it in the binary now (same question as #14407 basically).
|
||
|
||
class WsdlSourceTarget(Target): | ||
alias = "wsdl_source" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the semantics of wsdl
such that it always makes sense to compile file-at-a-time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does as in a way each WSDL has a targetNamespace
attribute which could be different or that you may be interested in overriding using the jvm_package
/ jvm_module
fields.
Also when having a few WSDL files in the same folder and those WSDLs have embedded XSDs with names that may colide. Treating them individually helps removing class name collisions as at the moment can not guarantee those XSDs are defining the same types (could probably be added later but this was a first go at it).
I removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This closes #14523. Still pending for the changes needed to support codegen in compiled languages but the rules for triggering the generation and orchestration of the jvm process that generate the final code shouldn't change much.
This is just a minimal implementation as there could additional enhancements done later (meaning, adding support for more features or customisations).
In the other hand, I'm slightly doubtful of the usability of the module feature (i.e. generate a
module-info.java
file): An scenario in which I see them useful is for cases in which a team/company has developed some SOAP services and uses the WSDL of those services to generate client SDKs that then publishes or shares to other parties. Not too sure if others find this as too niche.A clear future enhancement to this PR would be to add support for loading XSD files too. Would it be a reasonable approach to have a
xsd_sources
target as well?