cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Problem with creating a WSDL from a Schema
Date Fri, 08 Oct 2010 14:07:48 GMT

No idea.  That exception is coming from down deep in JAXB.  Thus, it's 
something related to the JAXB things, but I really wouldn't know where to 
start looking.  :-(

You could try updating to CXF 2.2.10 (or 11 which is being voted on now) which 
included a much newer version of JAXB.   That may help.

Dan


On Thursday 07 October 2010 11:20:18 am Shurgin,Gary wrote:
> I have a process that uses a schema for input/output for a JMS client.
> 
> I need to expose a Web interface for this service.
> 
> 
> 
> The project is built using maven, and is controlled with mule and uses a
> tomcat wrapper.
> 
> 
> 
> I have created an interface that encapsulates the schema as follows:
> 
> 
> 
> @WebService
> 
> public interface MyService {
> 
> 
> 
>     @WebMethod
> 
>     @WebResult(name="result)
> 
>     MyResult process (
> 
>             @WebParam(name="request ") MyRequest request );
> 
> }
> 
> 
> 
> Where MyResult and MyRequest are defined in a schema, and JAXB classes
> are available.
> 
> 
> 
> cxfVersion=2.2.6
> 
> 
> 
>         <plugin>
> 
>             <groupId>org.apache.cxf</groupId>
> 
>             <artifactId>cxf-java2ws-plugin</artifactId>
> 
>             <version>${cxfVersion}</version>
> 
>             <dependencies>
> 
>                 <dependency>
> 
>                     <groupId>org.apache.cxf</groupId>
> 
>                     <artifactId>cxf-rt-frontend-jaxws</artifactId>
> 
>                     <version>${cxfVersion}</version>
> 
>                 </dependency>
> 
>                 <dependency>
> 
>                     <groupId>org.apache.cxf</groupId>
> 
>                     <artifactId>cxf-rt-frontend-simple</artifactId>
> 
>                     <version>${cxfVersion}</version>
> 
>                 </dependency>
> 
>             </dependencies>
> 
>             <executions>
> 
>                 <execution>
> 
>                     <id>process-classes</id>
> 
>                     <phase>process-classes</phase>
> 
>                     <configuration>
> 
>                         <className>org.oclc.wsdl.MyService</className>
> 
>                         <genWsdl>true</genWsdl>
> 
>                         <verbose>true</verbose>
> 
>                     </configuration>
> 
>                     <goals>
> 
>                         <goal>java2ws</goal>
> 
>                     </goals>
> 
>                 </execution>
> 
>             </executions>
> 
>         </plugin>
> 
> 
> 
> I am getting the following error and stack trace:
> 
> 
> 
> 
> 
> java.lang.RuntimeException: java.lang.IllegalArgumentException: argument
> contains null
> 
>         at
> org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
> viceFactory.java:41)
> 
>         at
> org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(Jav
> aToWSDLProcessor.java:128)
> 
>         at
> org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSConta
> iner.java:109)
> 
>         at
> org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer
> .java:75)
> 
>         at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
> 103)
> 
>         at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
> 58)
> 
>         at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
> 40)
> 
>         at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:77)
> 
>         at
> org.apache.cxf.maven_plugin.Java2WSMojo.processJavaClass(Java2WSMojo.jav
> a:265)
> 
>         at
> org.apache.cxf.maven_plugin.Java2WSMojo.execute(Java2WSMojo.java:154)
> 
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:451)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:558)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> ycle(DefaultLifecycleExecutor.java:499)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
> ifecycleExecutor.java:478)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Failures(DefaultLifecycleExecutor.java:330)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:291)
> 
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:142)
> 
>         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> 
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> 
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.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: java.lang.IllegalArgumentException: argument contains null
> 
>         at com.sun.xml.txw2.Document.writeValue(Document.java:125)
> 
>         at com.sun.xml.txw2.Document.writeValue(Document.java:129)
> 
>         at com.sun.xml.txw2.StartTag.addAttribute(StartTag.java:115)
> 
>         at
> com.sun.xml.txw2.ContainerElement._attribute(ContainerElement.java:298)
> 
>         at
> com.sun.xml.txw2.ContainerElement.addAttribute(ContainerElement.java:155
> )
> 
>         at
> com.sun.xml.txw2.ContainerElement.invoke(ContainerElement.java:129)
> 
>         at $Proxy50.base(Unknown Source)
> 
>         at
> com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeClass(Xm
> lSchemaGenerator.java:914)
> 
>         at
> com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTo(XmlSc
> hemaGenerator.java:668)
> 
>         at
> com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.access$700(Xm
> lSchemaGenerator.java:493)
> 
>         at
> com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator.write(XmlSchemaGenerato
> r.java:475)
> 
>         at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.generateSchema(JAXBContextIm
> pl.java:822)
> 
>         at
> org.apache.cxf.jaxb.JAXBUtils.generateJaxbSchemas(JAXBUtils.java:699)
> 
>         at
> org.apache.cxf.jaxb.JAXBDataBinding.generateJaxbSchemas(JAXBDataBinding.
> java:445)
> 
>         at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:372)
> 
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> FromClass(ReflectionServiceFactoryBean.java:467)
> 
>         at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromCla
> ss(JaxWsServiceFactoryBean.java:550)
> 
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> rviceModel(ReflectionServiceFactoryBean.java:530)
> 
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> ctionServiceFactoryBean.java:278)
> 
>         at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> FactoryBean.java:178)
> 
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> AbstractWSDLBasedEndpointFactory.java:100)
> 
>         at
> org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
> viceFactory.java:39)
> 
>         ... 27 more
> 
> 
> 
> What argument is missing, and what value should it contain?
> 
> 
> 
> Thanks
> 
> Gary Shurgin
> 
> OCLC, Inc.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message