2018.2: Generate java code from wsdl : Bug?
Answered
When i try to generate java code from wsdl with these parameters (Right click on the wsdl on an empty package > WebServices > Generate Java Code from Wsdl...) :
-
Web service wsdl url : file:/C:/Dev/myproject-bom/myproject-services/src/main/resources/Wsdl/myws.wsdl
-
Output path : C:\Dev\myproject-bom\myproject-services\src\main\java
-
Package prefix : net.mycompany.webservice
-
Web Service Platform : CXF
-
Binding to be used : JAXB 2.0
-
Output mode : client
I have this error:
WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from :
ffile:/C:/Dev/myproject-bom/myproject-services/src/main/java/net/mycompany/webservice/myws.wsdl
When i look into the generated command line in the "run" tool window, i see this :
java.exe
-classpath [...]
-Djava.util.logging.config.file=C:\Dev\apps\apache-cxf\apache-cxf-2.4.6/etc/logging.properties
-Xmx128M org.apache.cxf.tools.wsdlto.WSDLToJava
-d C:\Dev\myproject-bom\myproject-services\src\main\java
-p net.mycompany.webservice
-client C:\Dev\myproject-bom\myproject-services\src\main\java\net\mycompany\webservice\myws.wsdl
However, if i change the last line into this :
-client C:\Dev\myproject-bom\myproject-services\src\main\resources\Wsdl\myws.wsdl
and run the command line again, everything works fine and the code is generated.
Anything i'm doing wrong or is this a bug?
Please sign in to leave a comment.
IDE is not expecting the file in the resources directly, it was designed to work from a file in the source directory under the specified package prefix. Request is welcome at https://youtrack.jetbrains.com/issues/IDEA.
Thank you for the quick reply and the explanation.
Done: https://youtrack.jetbrains.com/issue/IDEA-196675