Try adding more information to the @WebService annotations on BOTH the SEI 
interface and the impl.  In particular, make sure there are targetNamespace 
attributes on both.   Also, make sure the endpointInterface attribute is 
specified on the impl.   

Dan

On Thursday 18 December 2008 11:18:52 am Vassilis Virvilis wrote:
> Hi everybody,
>
> I have a terrible problem trying to make jaxws annotations to work. Some
> background: I am deploying wars in tomcat in debian stable using cxf 2.1.3
> and java 1.5.x
>
> The same service works like a charm if deployed with the simple frontend.
> Unfortunately we now require proper argument names instead of arg0, arg1 to
> be visible in the wsdl. So I am trying to deploy the class as a jaxws
> service.
>
> The first problem is that my FOOService becomes FOOServiceService if I
> don't specify the serviceName in the SEI but maybe this is intentional.
>
> Then i am getting an exception if I try to call a method with parameters.
> This happens also from a java client (simple frontend) and from soappy
> (python).
>
> If I remove the WebParam annotation the java client works but soappy gives
> the same error.
>
> So is this a problem in my end?
>
> Please help I am desperate....
>
> -------------------------------------
>
> The steps I followed:
>
> I annotated the SEI
>
> package com.xxx.iface.FOOService
>
> @WebService(serviceName="FOOService")
> public interface FOOService {
>     public String[] getBibliography(@WebParam(name="name") String name,
> @WebParam(name="type") String type, @WebParam(name="max_results") int
> max_results //public String[] getBibliography(String name, String type, int
> max_results);
>
>     public String[] getAvailableTypes();
> }
>
> I annotated the implementation
>
> package com.xxx.impl.FOOService
>
> @WebService
> public class FOOService implements com.xxx.iface.FOOService {
> ....
>     public String[] getBibliography(String name, String type, int
> max_results){ ...
>     }
> }
>
> I use the following configuration
>         <bean id="FOOService" class="com.xxx.impl.FOOService">
>         </bean>
>
>         <jaxws:endpoint id="FOO" implementor="#FOOService"
> implementorClass="com.xxx.FOOService" address="/FOOService">
> <jaxws:serviceFactory>
>                         <ref FOOn="jaxws-and-aegis-service-factory" />
>                 </jaxws:serviceFactory>
>         </jaxws:endpoint>
>
>
> and I get the following exception in my tomcat
>
> INFO: Application has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: null while invoking public abstract
> java.lang.String[]
> com.xxx.iface.FOOService.getBibliography(java.lang.String,java.lang.String,
>int) with params [null, null, null]. at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>java:121) at
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMe
>thodInvoker.java:83) at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:
>113) at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:54)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:
>68) at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerIn
>terceptor.java:56) at
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.ja
>va:37) at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceI
>nvokerInterceptor.java:92) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:220) at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO
>bserver.java:78) at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinati
>on.java:92) at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servle
>tController.java:285) at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController
>.java:168) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl
>et.java:175) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServl
>et.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at
> java.security.AccessController.doPrivileged(Native Method) at
> javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:1
>61) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>nFilterChain.java:245) at
> org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterC
>hain.java:177) at
> org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChai
>n.java:156) at java.security.AccessController.doPrivileged(Native Method) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>hain.java:152) at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
>ava:213) at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
>ava:178) at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
>6) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10
>5) at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
>a:107) at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697
>) at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.jav
>a:889) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
>va:684) at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.IllegalArgumentException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractIn
>voker.java:136) at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:
>82) ... 41 more
> Dec 18, 2008 5:54:34 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept



-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog

Reply via email to