cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RayKnight <raylynn.kni...@lexisnexis.com>
Subject Re: How to avoid to generate hard coded wsdl file reference - wsdl2java
Date Wed, 11 Mar 2009 15:26:00 GMT


dkulp wrote:
> 
> On Tue March 10 2009 3:10:20 pm RayKnight wrote:
>> Using CXF 2.1.4 and the maven plugin for wsdl2java I add the wsdlLocation
>> flag with a value of META-INF/wsdl.  This causes a BUILD ERROR with a
>> java.lang.NullPointerException.  Removing the wsdlLocation flag and the
>> client builds correctly.  I also tried using a value of
>> META-INF/wsdl/BpsReport.wsdl which results in the same error.  Is there a
>> bug in 2.1.4 that causes this?  Or am I missing something here?
>>
> 
> Can you show your plugin config as well as the stack trace on the 
> NullPointerException?
> 
> Thanks!
> Dan
> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

Plug config is as follows:



&lt;plugin&gt;
    &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
    &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.1.4&lt;/version&gt;
    &lt;executions&gt;
        &lt;execution&gt;
	    &lt;id&gt;generate-sources&lt;/id&gt;
	    &lt;phase&gt;generate-sources&lt;/phase&gt;
	    &lt;configuration&gt;
		  &lt;sourceRoot&gt;${project.build.outputDirectory}&lt;/sourceRoot&gt;
		  &lt;wsdlOptions&gt;
			&lt;wsdlOption&gt;
				&lt;wsdl&gt;${basedir}/src/main/resources/BpsReport.wsdl&lt;/wsdl&gt;
				&lt;dataBinding&gt;xmlbeans&lt;/dataBinding&gt;
				&lt;wsdlLocation&gt;META-INF/wsdl&lt;/wsdlLocation&gt;
				&lt;extraargs&gt;
        				&lt;extraarg&gt;-client&lt;/extraarg&gt;
        				&lt;extraarg&gt;-verbose&lt;/extraarg&gt;
        				&lt;extraarg&gt;-p&lt;/extraarg&gt;
        			
&lt;extraarg&gt;com.seisint.webservices.wsAccurint&lt;/extraarg&gt;
        			&lt;/extraargs&gt;
			&lt;/wsdlOption&gt;
		  &lt;/wsdlOptions&gt;
	    &lt;/configuration&gt;
	    &lt;goals&gt;
		&lt;goal&gt;wsdl2java&lt;/goal&gt;
	    &lt;/goals&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;



Ouput from mvn -X install


[DEBUG] Calling wsdl2java with args: [-verbose, -d, C:\Documents and
Settings\euyqd30\Workspaces\MyEclipse
7.0\cds-accurint-bpsreport-ws-client\target\classes, -db, xmlbeans, -client,
-p, com.seisint.webservices.wsAccurint, -wsdlLocation, META-INF/wsdl,
file:/C:/Documents%20and%20Settings/euyqd30/Workspaces/MyEclipse%207.0/cds-accurint-bpsreport-ws-client/src/main/resources/BpsReport.wsdl]
Loading FrontEnd jaxws ...
Loading DataBinding xmlbeans ...
wsdl2java -verbose -d C:\Documents and Settings\euyqd30\Workspaces\MyEclipse
7.0\cds-accurint-bpsreport-ws-client\target\classes -db xmlbeans -client -p
com.seisint.webservices.wsAccurint -wsdlLocation META-INF/wsdl
file:/C:/Documents%20and%20Settings/euyqd30/Workspaces/MyEclipse%207.0/cds-accurint-bpsreport-ws-client/src/main/resources/BpsReport.wsdl
wsdl2java - Apache CXF 2.1.4

Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@1d9e5ad:
display name [org.apache.cxf.bus.spring.BusApplicationContext@1d9e5ad];
startup date [Wed Mar 11 11:16:45 EDT 2009]; root of context hierarchy
Mar 11, 2009 11:16:45 AM org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
INFO: Bean factory for application context
[org.apache.cxf.bus.spring.BusApplicationContext@1d9e5ad]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@1412b61
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
Mar 11, 2009 11:16:45 AM
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1412b61:
defining beans
[cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry];
root of factory hierarchy
Mar 11, 2009 11:16:47 AM
org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing org.apache.cxf.bus.spring.BusApplicationContext@1d9e5ad:
display name [org.apache.cxf.bus.spring.BusApplicationContext@1d9e5ad];
startup date [Wed Mar 11 11:16:45 EDT 2009]; root of context hierarchy
Mar 11, 2009 11:16:47 AM
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
INFO: Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1412b61:
defining beans
[cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry];
root of factory hierarchy
[DEBUG] 
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(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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.xmlbeans.impl.schema.StscState.addError(StscState.java:387)
	at
org.apache.cxf.xmlbeans.tools.XMLBeansToolingDataBinding.loadTypeSystem(XMLBeansToolingDataBinding.java:259)
	at
org.apache.cxf.xmlbeans.tools.XMLBeansToolingDataBinding.initialize(XMLBeansToolingDataBinding.java:100)
	at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:536)
	at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:187)
	at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
	... 22 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] java.lang.NullPointerException

[INFO]
------------------------------------------------------------------------

-- 
View this message in context: http://www.nabble.com/How-to-avoid-to-generate-hard-coded-wsdl-file-reference---wsdl2java-tp22349214p22457536.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message