CXF wsdl2java maven plugin with xmlbeans databinding problem
marcelcasado Feb 23, 2009 11:59 PMHi,
I've been trying to create a web service implementation wsdl first approach using maven "cxf-codegen-plugin" (2.1.4) with xmlbeans databinding (required).
I also must use a xsdconfig file to customize the schema binding to java classes due some compilation errors on the binding java classes due the schema.
So at this point I'm not sure if I have to use a combination of the "xmlbeans-maven-plugin" first to create the java bindings from my schema so I can set up the xsdconfig file location and then use "cxf-codegen-plugin" with xmlbeans databinding and -keep to generate the service stubs from the WSDL or if I can get all done only using "cxf-codegen-plugin" with xmlbeans databinding in which case I don't know how to get my xsdconfig set up.
So trying to use both plugins working together to get the job done I 'm getting an exception when the ""cxf-codegen-plugin" with xmlbeans databinding kicks in after the bindings has been generated by the "xmlbeans-maven-plugin".
Configuring mojo 'org.codehaus.mojo:xmlbeans-maven-plugin:2.3.2:xmlbeans' -->
(f) catalogLocation = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/catalog/resolver-catalog.xml
(f) classGenerationDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/generated/classes
(f) defaultXmlConfigDir = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/xsdconfig
(f) generatedSchemaDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/xmlbeans-xsds
(f) project = MavenProject: org.apache.servicemix.samples.cxf-wsdl-first:wsdl-first-cxfse-su:3.4.0.1-fuse @ /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml
(f) schemaDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources
(f) sourceGenerationDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/jaxws
(f) staleFile = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/generated-sources/xmlbeans/.staleFlag
(f) xmlConfigs = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/schemas/schemaConfig/XsdConfig.xml
xmlbeans:xmlbeans {execution: default}
The schema Directory is /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources
The schema Directory is /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources
Creating a list of config files.
looking for resolver catalog at /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/catalog/resolver-catalog.xml
Comparing to xsd's modification time.
Comparing to wsdl's modification time.
All schema objects are up to date.
Configuring mojo 'org.apache.cxf:cxf-codegen-plugin:2.1.4:wsdl2java' -->
(f) classesDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/classes
(f) markerDirectory = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/cxf-codegen-plugin-markers
(f) project = MavenProject: org.apache.servicemix.samples.cxf-wsdl-first:wsdl-first-cxfse-su:3.4.0.1-fuse @ /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml
(f) sourceRoot = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/jaxws
(f) testWsdlRoot = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/test/resources/wsdl
(f) useCompileClasspath = false
(s) wsdl = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/wcs1_1_2.wsdl
(f) wsdlOptions = [Lorg.apache.cxf.maven_plugin.WsdlOption;@bc9d1a
(f) wsdlRoot = /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/wsdl
cxf-codegen:wsdl2java {execution: default}
.......
Calling wsdl2java with args: -verbose, -d, /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/jaxws, -db, xmlbeans, -classdir, /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/generated/classes, -keep, -impl, file:/Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/wcs1_1_2.wsdl
Feb 23, 2009 8:23:04 PM org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding jaxb
Feb 23, 2009 8:23:04 PM org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default frontend jaxws
Loading FrontEnd jaxws ...
Loading DataBinding xmlbeans ...
wsdl2java -verbose -d /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/jaxws -db xmlbeans -classdir /Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/target/generated/classes -keep -impl file:/Users/marcel/fuse_wcs/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/wcs1_1_2.wsdl
wsdl2java - Apache CXF 2.1.4
...
org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:240)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:360)
at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:257)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:589)
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.NullPointerException
at org.apache.cxf.xmlbeans.tools.XMLBeansToolingDataBinding.getType(XMLBeansToolingDataBinding.java:120)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ProcessorUtil.getType(ProcessorUtil.java:83)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.processFault(FaultProcessor.java:124)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.process(FaultProcessor.java:54)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:67)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:143)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:197)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
... 22 more
I'm trying to attach a zip file (fuse esb cxf-wsdl-first adapted with my wsdl and schemas ) but it's complaining is too large so I'm just attaching the pom.xml, the wsdl.
Any help will be greatly appreciated since I tried everything and I'm stuck without any idea what is wrong.
Thanks,
-Marcel
-
wcsAll.xsd 896 bytes
-
wcs1_1_2.wsdl 4.2 KB
-
pom.xml 7.6 KB