Guillaume,

Did some more digging.    This is related to:
https://issues.apache.org/jira/browse/CXF-885


Basically, the "GetRemainingHits" is killing things.   As soon as CXF 
sees a method that is not wrapped/wrappable, CXF doesn't add any of the 
interceptors for the wrapped cases.   :-(    For JAX-WS, that would be 
OK as we just add the annotation that says "make everything bare" and 
we're OK.   The Dynamic client, on the other hand, doesn't have that 
ability.   This may be quite a bit of work to really fix.

One workaround that the groovy stuff COULD do is lookup the 
BindingOperationInfo object itself and pass that into the invoke method 
that takes it.   You can pass the "unwrapped" version in and it should 
work.   

Dan




On Monday 03 December 2007, Daniel Kulp wrote:
> Guillaume,
>
> I've honestly never seen that error before.   However, it MIGHT have
> something to do with wrapped/unwrapped styles internally.  
> Internally, it may be expecting it to be in "unwrapped" form, thus
> expecting 3 strings instead of a "GetTeamInfoByCity" object.
>
> Dan
>
> On Saturday 01 December 2007, tog wrote:
> > Hi all,
> >
> > Following the tread on the dynamic client, I was reading a post by
> > Glen (http://www.jroller.com/gmazza/date/20070929), when I decided
> > to give the NFL strike iron webservice a try with GroovyWS.
> > The fact is that both the web service and cxf are working ... so I
> > must be doing something wrong :-)
> > Here is the cryptic exception I got -- hope it will make sense to
> > one of you !
> >
> > Doing something similar for the Microsoft Terra webservice just
> > works fine.
> >
> > Any help appreciated
> >
> > Thanks
> > Tog
> >
> > PS: for those interested here is my code:
> >
> > import groovyx.net.ws.WSClient;
> >
> > def proxy = new
> > WSClient("http://sdpwsparam.strikeiron.com/sdpNFLTeams?WSDL";,
> > this.class.classLoader)
> >
> > def gtibc = proxy.create("com.strikeiron.GetTeamInfoByCity")
> > println gtibc.class.declaredFields
> >
> > gtibc.userID = "[EMAIL PROTECTED]"
> > gtibc.password = "mysecret"
> > gtibc.city = "New York"
> >
> > def result = proxy.GetTeamInfoByCity(gtibc)
> >
> >
> > Dec 1, 2007 3:21:11 PM org.apache.cxf.phase.PhaseInterceptorChain
> > doIntercept INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: Marshalling Error: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type. at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
> >av a:187) at
> > org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:51)
> > at
> > org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
> >rt s(AbstractOutDatabindingInterceptor.java:84) at
> > org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
> >nt erceptor.java:68) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
> >to rChain.java:207) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:180) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:200) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:186) at
> > groovyx.net.ws.WSClient.invokeMethod(WSClient.java:73) at
> > org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:10
> >2) at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79) at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scri
> >pt BytecodeAdapter.java:158) at nfl.run(nfl.groovy:12)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749) at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:589) at
> > org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:98
> >) at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79) at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.ja
> >va
> >
> >:374) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >: at
> >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:873)
> > at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:69)
> > at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scri
> >pt BytecodeAdapter.java:158) at nfl.main(nfl.groovy)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:873)
> > at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:69)
> > at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > groovy.lang.GroovyShell.runMainOrTestOrRunnable(GroovyShell.java:244
> >) at groovy.lang.GroovyShell.run(GroovyShell.java:218)
> >         at groovy.lang.GroovyShell.run(GroovyShell.java:147)
> >         at groovy.ui.GroovyMain.processOnce(GroovyMain.java:492)
> >         at groovy.ui.GroovyMain.run(GroovyMain.java:308)
> >         at groovy.ui.GroovyMain.process(GroovyMain.java:294)
> >         at groovy.ui.GroovyMain.processArgs(GroovyMain.java:111)
> >         at groovy.ui.GroovyMain.main(GroovyMain.java:92)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.jav
> >a: 101) at
> > org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
> > Caused by: javax.xml.bind.MarshalException
> >  - with linked exception:
> > [com.sun.istack.SAXException2: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type.] at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
> >:3 04) at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.ja
> >va
> >
> >:230) at
> >
> > javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarsha
> >ll erImpl.java:75) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecode
> >r. java:330) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
> >av a:167) ... 67 more
> > Caused by: com.sun.istack.SAXException2: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type. at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.
> >ja va:226) at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializ
> >er .java:641) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
> >en tBeanInfoImpl.java:115) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
> >en tBeanInfoImpl.java:149) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Elemen
> >tB eanInfoImpl.java:269) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
> >tB eanInfoImpl.java:276) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
> >tB eanInfoImpl.java:35) at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.
> >ja va:472) at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
> >:3 01) ... 71 more
> > org.apache.cxf.interceptor.Fault: Marshalling Error: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type. at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
> >av a:187) at
> > org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:51)
> > at
> > org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
> >rt s(AbstractOutDatabindingInterceptor.java:84) at
> > org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
> >nt erceptor.java:68) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
> >to rChain.java:207) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:180) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:200) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:186) at
> > groovyx.net.ws.WSClient.invokeMethod(WSClient.java:73) at
> > org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:10
> >2) at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79) at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scri
> >pt BytecodeAdapter.java:158) at nfl.run(nfl.groovy:12)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749) at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:589) at
> > org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:98
> >) at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79) at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.ja
> >va
> >
> >:374) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >: at
> >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:873)
> > at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:69)
> > at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scri
> >pt BytecodeAdapter.java:158) at nfl.main(nfl.groovy)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(Cache
> >dM ethod.java:107) at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
> >:1 27) at
> > org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMe
> >th od.java:18) at
> > org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClass
> >He lper.java:538) at
> > groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:873)
> > at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:69)
> > at
> > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper
> >.j ava:74) at
> > groovy.lang.GroovyShell.runMainOrTestOrRunnable(GroovyShell.java:244
> >) at groovy.lang.GroovyShell.run(GroovyShell.java:218)
> >         at groovy.lang.GroovyShell.run(GroovyShell.java:147)
> >         at groovy.ui.GroovyMain.processOnce(GroovyMain.java:492)
> >         at groovy.ui.GroovyMain.run(GroovyMain.java:308)
> >         at groovy.ui.GroovyMain.process(GroovyMain.java:294)
> >         at groovy.ui.GroovyMain.processArgs(GroovyMain.java:111)
> >         at groovy.ui.GroovyMain.main(GroovyMain.java:92)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> >.j ava:39) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> >ss orImpl.java:25) at
> > java.lang.reflect.Method.invoke(Method.java:585) at
> > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.jav
> >a: 101) at
> > org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
> > Caused by: javax.xml.bind.MarshalException
> >  - with linked exception:
> > [com.sun.istack.SAXException2: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type.] at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
> >:3 04) at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.ja
> >va
> >
> >:230) at
> >
> > javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarsha
> >ll erImpl.java:75) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecode
> >r. java:330) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
> >av a:167) ... 67 more
> > Caused by: com.sun.istack.SAXException2: Instance of
> > "com.strikeiron.GetTeamInfoByCity" is substituting
> > "java.lang.String", but "com.strikeiron.GetTeamInfoByCity" is bound
> > to an anonymous type. at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.
> >ja va:226) at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializ
> >er .java:641) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
> >en tBeanInfoImpl.java:115) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
> >en tBeanInfoImpl.java:149) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Elemen
> >tB eanInfoImpl.java:269) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
> >tB eanInfoImpl.java:276) at
> > com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
> >tB eanInfoImpl.java:35) at
> > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.
> >ja va:472) at
> > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
> >:3 01) ... 71 more



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to