I have created an interface and implementation class, with that i created the
WSDL using java2WSDL then i was manually added the implicit soap header to
the WSDL(Two headers).Also included the wsdl location in the
cxf.config.xml.. I have deployed the war in the JBOSS, still now no
probs....but when i try to hit a service in server it fails to send a
response.I got the following error...
wrong number of arguments while invoking public com.cxf.sample.api.Employee
com.cxf.sample.service.EmployeeService.getEmployeeDetails(long) with params
[1, null, null].
at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:121)
at
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.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(ServiceInvokerInterceptor.java:56)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I don't know why it has been throwing..Eventhough i was written a
ObjectFactory with that two soap headers...Whether i need to write any
interceptors to process this otherwise need to specify any binding to that
headers...
Andrew Clegg wrote:
>
> 2008/12/1 ysahuly <[EMAIL PROTECTED]>:
>> I have an implementation class and an WSDL. Is there any possibility to
>> configure the WSDL to the corresponding class.Not using the normal two
>> approaches i.e WSDL first or JAVA first. I have both the class and WSDL,
>> only thing is i need to configure it. If possibility is available means
>> then
>> how can i specify my databinding...
>
> Well, if you haven't written your implementation class with databound
> parameter objects in mind, it may be easier to generate a lightweight
> implementation class from the WSDL using normal WSDL-first methods,
> which acts as a facade or wrapper for the class you already have. This
> would receive the incoming data in JAXB-generated objects (or whatever
> databinding strategy you use) and then call the appropriate methods on
> the original class.
>
> Once this works, and your tests are all passing, then you could
> perhaps think about refactoring -- merge the logic in the original
> class into the wrapper, and drop the original class. Or you may decide
> you like the separation as it is.
>
> There may be other ways to do it (annotations?) but this is how I
> would go about it...
>
> Andrew.
>
>
--
View this message in context:
http://www.nabble.com/How-to-configure-WSDL-in-java-tp20774500p20816472.html
Sent from the cxf-user mailing list archive at Nabble.com.