cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Commented: (CXF-2076) InstantiationException trying to create wrapper object when using xmlbeans databinding
Date Sat, 07 Mar 2009 02:12:56 GMT


Daniel Kulp commented on CXF-2076:

[20:51] <dkulp> There are two ways to approach it.
[20:52] <dkulp> 1) Make sure the code generators ONLY generate BARE mode with XMLBeans.
[20:52] <dkulp> Which I'd be OK with.
[20:52] <willem> dkulp: Do I need to change the template file to get the xmlbeans artifacts
work out of box?
[20:53] <dkulp> 2) Add some methods to AbstractDataBinding for creating and filling
in the wrappers. 
[20:53] <dkulp> (2) would be a bit complex.
[20:53] <dkulp> You shouldn't.
[20:54] <willem> dkulp: I didn't do any tools or binding relates work before. Can you
show me some examples?
[20:55] <dkulp> Hmm......
[20:57] <dkulp> Long time since I looked into some of the databinding code.
[20:58] <dkulp> Looking at the code, to force bare mode, you MAY just need to change
the getWrappedElementType method of the XMLBeansToolingDataBinding to return null.
[20:58] <willem> OK, I just want to a find a generatic way to fix this xmlbean issue.
1) will let xmlbean's not support wrapper any more, am I right?
[20:59] <dkulp> Right.
[20:59] <willem> 1) just be a short time solution.
[21:01] <dkulp> Well, supporting the wrapper types in a generic fasion would require
major re-architectingg of the databinding.
[21:01] <dkulp> Which would be a 3.0 level thing.
[21:01] <dkulp> Actually, the other thing you can try:
[21:02] <willem> Please shot.
[21:02] <dkulp> In WrapperClassOutInterceptor, check if the databinding class name contains
[21:02] <dkulp> If not, skip.
[21:02] <willem> Yes, this is other way to do it.
[21:02] <dkulp> Actually, in the JAXWSServiceFactory, if the databinding isn't jaxb,
don't even add the wrapepr class in/out interceptors
[21:04] <willem> So the wrapper class will only work for JAXB. The user will not be
[21:04] <dkulp> Maybe.  
[21:04] <dkulp> I DON'T know if XMLBeans will tollerate parsing from the child elements
or not.

> InstantiationException trying to create wrapper object when using xmlbeans databinding
> --------------------------------------------------------------------------------------
>                 Key: CXF-2076
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.1.4
>         Environment: 2.1.4, trunk
>            Reporter: Dave Stanley
>         Attachments: cxf_xmlbeans.tar.gz, cxf_xmlbeans_sample.patch
> 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(
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> 	at $Proxy69.sayHi(Unknown Source)
> 	at demo.hw.client.Client.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.codehaus.mojo.exec.ExecJavaMojo$
> 	at
> Caused by: org.apache.cxf.interceptor.Fault: org.apache.helloWorldSoapHttp.types.SayHiDocument
> 	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(
> 	... 14 more
> Caused by: java.lang.InstantiationException: org.apache.helloWorldSoapHttp.types.SayHiDocument
> 	at java.lang.Class.newInstance0(
> 	at java.lang.Class.newInstance(
> 	at org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(
> 	... 15 more

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

View raw message