Errors/Warning compiling a WSDL file - but the generated Java sources are ok
See original GitHub issueFirst: Thanks for all the new contributions to the project!
I have tried to update a project which creates java sources from a WSDL. Unfortunately I see the following exception on invoking the compiler:
[INFO] Sources are not up-to-date, XJC will be executed.
[WARNING] Error while parsing schema(s).Location [].
org.xml.sax.SAXParseException; Versuchen Sie, WSDL zu kompilieren? Unterstützung für WSDL ist zu Testzwecken bestimmt. Eine Aktivierung ist mit der Option -wsdl möglich.
at com.sun.tools.xjc.ErrorReceiver.warning(ErrorReceiver.java:76)
at com.sun.tools.xjc.ModelLoader.sanityCheck(ModelLoader.java:176)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:90)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76)
at org.jvnet.mjiip.v_2_3.XJC23Mojo.loadModel(XJC23Mojo.java:50)
at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute(XJC23Mojo.java:40)
at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute(XJC23Mojo.java:28)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:477)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:319)
...
The exception asks something like "Do you try to compile WSDL? Support for WSDL is for test purposes. You can activate it with the option -wsdl.
With version 0.14.0 everything was working without that message. However, the tool creates the Java-Codes as expected!
The relevant section in my pom.xml is:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<schemaDirectory>${basedir}/src/main/resources</schemaDirectory>
<schemaIncludes>*.wsdl</schemaIncludes>
<args>
<arg>-XtoString</arg>
</args>
<plugins>
<!-- besseres toString() in generierten JAXB-Klassen -->
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.13.1</version>
</plugin>
</plugins>
</configuration>
</plugin>
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13
Top Results From Across the Web
Maven trouble when trying to generate from WSDL file
Im trying to generate sources from a wsdl file, but I keep running into an error on my pom. xml that I believe...
Read more >Maven cxf-codegen-plugin (WSDL to Java) - Apache CXF
CXF includes a Maven plugin which can generate java artifacts from WSDL. ... and can make it easier for some IDE's to detect...
Read more >Generate WSDL document from Java | IntelliJ IDEA ... - JetBrains
A major part of Web service client development is implementing generation of requests to the service and parsing responses from it in compliance ......
Read more >Importing WSDL with Java and Maven - softwarecave
JDK provides wsimport executable which can generate Java source code files based on the information provided in the WSDL file.
Read more >wsimport - Task Overview - Java EE
Package the WSDL file, schema documents, web.xml , sun-jaxws.xml , service endpoint interface and implementation class, value types, and generated classes, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll take a look at it this weekend. Seems odd since the root of the stack trace is the xjc layer.
I’ve noticed the same exception but all the sources were generated on JDK 17. I’ve noticed no change after adding