On Thu, Jan 14, 2010 at 9:18 AM, Barrie Treloar <baerr...@gmail.com> wrote: > On Thu, Jan 14, 2010 at 9:16 AM, Barrie Treloar <baerr...@gmail.com> wrote: >> I'll also double check the sample directory... > > No samples use simple:client. > > The java_first_pojo uses simple:server and the Client class uses the > ClientProxyFactoryBean. > I'll give that a go as well. >
I have jax-ws working by creating a copy of the plain java interface and annotating the new version. I then create the implementation and delegate the methods to my pojo service. I thought I would try to expose via simple:server the same pojo. When I use the simple java interface I get the same ClassCastException: $Proxy50 as the Spring simple:client gives. The first time though I mistakenly used the jax-ws annotated interface with the ClientProxyFactoryBean but at least this gets past the proxy class cast exception: 14/01/2010 09:27:02 org.apache.cxf.service.factory.ReflectionServiceFactoryBean checkServiceClassAnnotations WARNING: A JAX-WS Annotation was found on fqn.web.MyService while using the Simple frontend. For better results, use the JAX-WS frontend. 14/01/2010 09:27:02 org.apache.cxf.phase.PhaseInterceptorChain doIntercept WARNING: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Marshalling Error: fqn.MyParameter is not known to this context Reading http://cxf.apache.org/docs/simple-frontend.html I also note right at the bottom the Well-Known Issue: There is a known issue for the JAXB data binding with POJO, please see Dan Kulp's comment in https://issues.apache.org/jira/browse/CXF-897 . If you want to use JAXB binding you should use the JAX-WS Frontend. Mixing Simple Frontend and JAXB binding leads to problems. The article A simple JAX-WS service shows a code first JAX-WS service that is almost as easy to use as the Simple Frontend. I wonder if this marhsalling error is related to the known-issue. I'm pretty clueluess in this area, but I believe the best practice is to work with a wsdl first. What I was hoping to do was to hack a proof of concept together with java first and then create a first pass wsdl via java2wsdl and then hand customize anything. (All to save some effort). Since I'm having so much trouble perhaps I should bite the bullet and hand build the wsdl file.