Hi Vijay/Kenneth,
I have run into this issue in general for years with web services (Axis, JAX-WS, BEA).
If you are trying to pass a collection through an interface check to see if it is supported.
My experience has been collections are not supported for interoperability reasons. Then you would need to look at arrays of objects rather than collections. They are interoperable and very fast to work with.
Also, make sure you use the java bean standard for complex objects for service interfaces.
Regards,
-Tony
Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM> wrote:
Forwarding it to JAXWS alias
Kenneth Clark wrote:
> I have a class with a Collection in it. And when I try to
> generate the jaxws artifacts I get the following error:
>
> Problem encountered during annotation processing;
> see stacktrace below for more information.
> java.lang.ClassCastException:
> com.sun.tools.apt.mirror.declaration.InterfaceDeclarationImpl
> at
> com.sun.tools.jxc.model.nav.APTNavigator.isOverriding(APTNavigator.java:260)
>
> at
> com.sun.tools.jxc.model.nav.APTNavigator.isOverriding(APTNavigator.java:49)
>
> at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findGetterSetterProperties(ClassInfoImpl.java:879)
>
> at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:263)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
>
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
>
> at java.util.AbstractList$Itr.next(AbstractList.java:422)
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
>
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
>
> at java.util.AbstractList$Itr.next(AbstractList.java:422)
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
> at
> com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
>
> at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
>
> at java.util.AbstractList$Itr.next(AbstractList.java:422)
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>
> at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
>
> at
> com.sun.tools.xjc.api.impl.j2s.JavaCompilerImpl.bind(JavaCompilerImpl.java:54)
>
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.completeModel(WebServiceAP.java:395)
>
> at
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:236)
>
> at
> com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
>
> at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
> at
> com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
> at com.sun.tools.apt.main.Main.compile(Main.java:1075)
> at com.sun.tools.apt.main.Main.compile(Main.java:938)
> at com.sun.tools.apt.Main.processing(Main.java:95)
> at com.sun.tools.apt.Main.process(Main.java:85)
> at com.sun.tools.apt.Main.process(Main.java:67)
> at
> com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
> at
> com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
> at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
> 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 com.sun.tools.ws.Invoker.main(Invoker.java:41)
> at com.sun.tools.ws.WsGen.main(WsGen.java:28)
>
> Does anyone have any ideas?
>
> Thanks
> Kenneth
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com