cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arik Gorelik (JIRA)" <>
Subject [jira] Created: (CXF-2451) Unable to call no-arg methods when using implicit headers - getting params [null]
Date Mon, 28 Sep 2009 17:59:15 GMT
Unable to call no-arg methods when using implicit headers - getting params [null]

                 Key: CXF-2451
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.2.3
         Environment: ALL
            Reporter: Arik Gorelik


I am a developer using CXF 2.2.3. I am currently running into an issue when trying to call
a NO-ARG method getFoo() 
while using implicit headers defined ONLY at the wsdl:binding section. 
Each header has a SEPARATE wsdl:message defined and headers elements are NOT part of the getFooRequest
The generated code looks correct (using wsdl2java); however, invoking the method results in
the error message in the following soap fault message:

         <faultstring>wrong number of arguments while invoking public throws
with params [null].</faultstring>

Here is the stack trace:

WARNING: Application has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: wrong number of arguments while invoking public throws
with params [null].
	at org.apache.cxf.service.invoker.AbstractInvoker.createFault(
	at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
	at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$
	at java.util.concurrent.Executors$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(
	at org.apache.cxf.transport.servlet.ServletDestination.invoke(
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
	at org.apache.cxf.transport.servlet.ServletController.invoke(
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(
	at javax.servlet.http.HttpServlet.service(
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
	... 33 more

Request is:

<soapenv:Envelope xmlns:soapenv="" xmlns:v29="">

Generated code is:

    @WebResult(name = "response", targetNamespace = "http://test/services/v29")
    @RequestWrapper(localName = "getFoo", targetNamespace = "",
className = "")
    @ResponseWrapper(localName = "getFooResponse", targetNamespace = "",
className = "")
    @WebMethod(action = "")
    public getFo() throws TestException;

Here is there wsdl:binding for the operation

		<wsdl:operation name="getFoo">
			<soap:operation soapAction="" />
			<wsdl:input name="getFooRequest">
				<soap:header part="testHeader1" message="tns:testHeader1" use="literal" />
				<soap:header part="testHeader2" message="tns:testHeader2" use="literal" />
				<soap:body use="literal" parts="parameters" />
			<wsdl:output name="getFooResponse">
				<soap:body use="literal" />
			<wsdl:fault name="TestException">
				<soap:fault name="TestException" use="literal" />

Here are the wsdl:message for the operation from above:

	<wsdl:message name="testHeader1">
		<wsdl:part element="impl:testHeader1" name="testHeader1" />

	<wsdl:message name="testHeader2">
		<wsdl:part element="impl:testHeader2" name="testHeader2" />


	<wsdl:message name="getFooRequest">
		<wsdl:part element="impl:getFoo" name="parameters" />

	<wsdl:message name="getFooResponse">
		<wsdl:part element="impl:getFooResponse" name="parameters" />

If I remove the implicit headers, the generated code is the same and I am able to invoke the
method with the same request. Please help. I hope I provided all the required information.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message