Generate java classes from wsdl and xsd using gradle
- or -
Post a project like this£10(approx. $12)
- Posted:
- Proposals: 3
- Remote
- #3255329
- Expired
Description
Experience Level: Entry
I have a wsdl file and i would like to generate java classes from it using gradle build. I am using java 11 and gradle 7.
This is similar to generating classes from maven build using cxf-codegen plugin maven like this
org.apache.cxf
cxf-codegen-plugin
${cxf.version}
generate-sources
generate-sources
wsdl2java
I have got something which generate java classes however its not generating the service classes. It generates only domain classes.
I am using something like this
task generateJavaClasses {
System.setProperty('javax.xml.accessExternalSchema', 'all')
def jaxbTargetDir = file("src/main/java/")
doLast {
jaxbTargetDir.mkdirs()
ant.taskdef(
name: 'xjc',
classname: 'com.sun.tools.xjc.XJCTask',
classpath: configurations.jaxb.asPath
)
ant.jaxbTargetDir = jaxbTargetDir
ant.xjc(
destdir: '${jaxbTargetDir}',
package: 'simplesolution.dev',
schema: 'src/main/resources/employee.wsdl',
language: 'WSDL'
)
}
}
you can use below wsdl file for example:
This is similar to generating classes from maven build using cxf-codegen plugin maven like this
org.apache.cxf
cxf-codegen-plugin
${cxf.version}
generate-sources
generate-sources
wsdl2java
I have got something which generate java classes however its not generating the service classes. It generates only domain classes.
I am using something like this
task generateJavaClasses {
System.setProperty('javax.xml.accessExternalSchema', 'all')
def jaxbTargetDir = file("src/main/java/")
doLast {
jaxbTargetDir.mkdirs()
ant.taskdef(
name: 'xjc',
classname: 'com.sun.tools.xjc.XJCTask',
classpath: configurations.jaxb.asPath
)
ant.jaxbTargetDir = jaxbTargetDir
ant.xjc(
destdir: '${jaxbTargetDir}',
package: 'simplesolution.dev',
schema: 'src/main/resources/employee.wsdl',
language: 'WSDL'
)
}
}
you can use below wsdl file for example:
Manglesh J.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
25 Apr 2024
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies