Skip to content

Errors/Warning compiling a WSDL file - but the generated Java sources are ok #243

@weberhofer

Description

@weberhofer

First: 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>

Metadata

Metadata

Labels

bug-externalIssue concerns an external dependency

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions