You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dave Stanley (JIRA)" <ji...@apache.org> on 2009/02/27 23:05:12 UTC

[jira] Updated: (CXF-2076) InstantiationException trying to create wrapper object when using xmlbeans databinding

     [ https://issues.apache.org/jira/browse/CXF-2076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Stanley updated CXF-2076:
------------------------------

    Description: 
I have modified the wsdl_first sample to use the xmlbeans databinding.  Xmlbeans is generating both an interface and a concrete type for each of the types defined in my wsdl. This is causing a problem with CXF as its using the interface rather than the impl to instantiate request and response wrapper classes. 

This results in the stack below which shows the InstantiationException.  Note the type is org.apache.helloWorldSoapHttp.types.SayHiDocument - I think it should be .. org.apache.helloWorldSoapHttp.types.impl.SayHiDocumentImpl ?

INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:116)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:123)
	at $Proxy69.sayHi(Unknown Source)
	at demo.hw.client.Client.main(Client.java:71)
	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:585)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:312)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:102)
	... 14 more
Caused by: java.lang.InstantiationException: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at java.lang.Class.newInstance0(Class.java:335)
	at java.lang.Class.newInstance(Class.java:303)
	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:277)
	... 15 more


  was:
I have modified the wsdl_first sample to use the xmlbeans databinding.  Xmlbeans is generating both an interface and a concrete type for each of the types defined in my wsdl. This is causing a problem with CXF as its using the interface rather than the impl to instantiate request and response wrapper classes. 

This results in the stack below which shows the InstantiationException.  Note the type is org.apache.helloWorldSoapHttp.types.SayHiDocument - I think it should be .. org.apache.helloWorldSoapHttp.types.impl.SayHiDocumentImpl ?

{code}
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:116)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:123)
	at $Proxy69.sayHi(Unknown Source)
	at demo.hw.client.Client.main(Client.java:71)
	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:585)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:312)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:102)
	... 14 more
Caused by: java.lang.InstantiationException: org.apache.helloWorldSoapHttp.types.SayHiDocument
	at java.lang.Class.newInstance0(Class.java:335)
	at java.lang.Class.newInstance(Class.java:303)
	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:277)
	... 15 more
{code}



> InstantiationException trying to create wrapper object when using xmlbeans databinding
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-2076
>                 URL: https://issues.apache.org/jira/browse/CXF-2076
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.1.4
>         Environment: 2.1.4, trunk
>            Reporter: Dave Stanley
>
> I have modified the wsdl_first sample to use the xmlbeans databinding.  Xmlbeans is generating both an interface and a concrete type for each of the types defined in my wsdl. This is causing a problem with CXF as its using the interface rather than the impl to instantiate request and response wrapper classes. 
> This results in the stack below which shows the InstantiationException.  Note the type is org.apache.helloWorldSoapHttp.types.SayHiDocument - I think it should be .. org.apache.helloWorldSoapHttp.types.impl.SayHiDocumentImpl ?
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:116)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:123)
> 	at $Proxy69.sayHi(Unknown Source)
> 	at demo.hw.client.Client.main(Client.java:71)
> 	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:585)
> 	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
> 	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:312)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:102)
> 	... 14 more
> Caused by: java.lang.InstantiationException: org.apache.helloWorldSoapHttp.types.SayHiDocument
> 	at java.lang.Class.newInstance0(Class.java:335)
> 	at java.lang.Class.newInstance(Class.java:303)
> 	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:277)
> 	... 15 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.