Søren Poulsen [
http://community.jboss.org/people/meselfe] created the discussion
"Maven wsconsume fails"
To view the discussion, visit:
http://community.jboss.org/message/573165#573165
--------------------------------------------------------------
Im trying to use the wsconsume maven plugin on the helloworld wsdl from the
http://docs.jboss.org/tools/3.1.0.GA/en/ws_ref_guide/html/index.html Jboss ws user guide.
Maven throws "org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
'xjc:globalJavaType' to a(n) 'group' component".
This is the full stacktrace:
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
'xjc:globalJavaType' to a(n) 'group' component.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AssertionError: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the
name 'xjc:globalJavaType' to a(n) 'group' component.
at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:78)
at
com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:233)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:522)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at
com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:134)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2244)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:187)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:133)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:182)
at
org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:230)
at
org.jboss.wsf.spi.tools.WSContractConsumer.consume(WSContractConsumer.java:202)
at
org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:123)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
'xjc:globalJavaType' to a(n) 'group' component.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDGroupTraverser.traverseLocal(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser.traverseSeqChoice(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser.traverseChoice(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown
Source)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown
Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown
Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:626)
at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:75)
... 31 more
This is the WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name='HelloWorldService'
targetNamespace='http://webservices.samples.jboss.org/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://webservices.samples.jboss.org/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<types>
<xs:schema
targetNamespace='http://webservices.samples.jboss.org/'
version='1.0'
xmlns:tns='http://webservices.samples.jboss.org/'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='sayHello' type='tns:sayHello' />
<xs:element name='sayHelloResponse'
type='tns:sayHelloResponse' />
<xs:complexType name='sayHello'>
<xs:sequence>
<xs:element minOccurs='0' name='arg0'
type='xs:string' />
</xs:sequence>
</xs:complexType>
<xs:complexType name='sayHelloResponse'>
<xs:sequence>
<xs:element minOccurs='0' name='return'
type='xs:string' />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name='HelloWorld_sayHello'>
<part element='tns:sayHello' name='sayHello'></part>
</message>
<message name='HelloWorld_sayHelloResponse'>
<part element='tns:sayHelloResponse'
name='sayHelloResponse'></part>
</message>
<portType name='HelloWorld'>
<operation name='sayHello' parameterOrder='sayHello'>
<input message='tns:HelloWorld_sayHello'></input>
<output
message='tns:HelloWorld_sayHelloResponse'></output>
</operation>
</portType>
<binding name='HelloWorldBinding' type='tns:HelloWorld'>
<soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http' />
<operation name='sayHello'>
<soap:operation soapAction='' />
<input>
<soap:body use='literal' />
</input>
<output>
<soap:body use='literal' />
</output>
</operation>
</binding>
<service name='HelloWorldService'>
<port binding='tns:HelloWorldBinding'
name='HelloWorldPort'>
<soap:address location='http://127.0.0.1:8080/ws/HelloWorld' />
</port>
</service>
</definitions>
And this is the pom.xml
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz</groupId>
<artifactId>ws</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ws Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-core</artifactId>
<version>3.1.2.GA</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>ws</finalName>
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
<artifactId>maven-jaxws-tools-plugin</artifactId>
<version>1.0.0.GA</version>
<configuration>
<wsdls>
<wsdl>${basedir}/src/main/resources/hello.wsdl</wsdl>
</wsdls>
<targetPackage>foo.bar</targetPackage>
<extension>true</extension>
</configuration>
<executions>
<execution>
<goals>
<goal>wsconsume</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<
url>http://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<
url>http://repository.jboss.org/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
Any1 who can help me out?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/573165#573165]
Start a new discussion in JBoss Web Services at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]