title: Axis2 Web service POST request not working in Linux - wrong number of arguments
body: <p>All,<br>
  I am working with <code>Axis2</code> Web services. The services are bundled as <code>.aar file</code> and deployed in <code>WSO2 Application Server(AS)</code>. I am able to deploy the generated .aar in WSO2 AS running in <code>Windows environment</code> as well as <code>Linux environment</code>.<br>
  The problem is,<br>
  When I try to access the POST service hosted in both the environment(Windows &amp; Linux), I am <code>getting response in Windows while getting the following error in the Linux</code> environment.  </p>
  
  <pre><code>java.lang.IllegalArgumentException: wrong number of arguments
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:178)
   at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
   at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
   at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
   at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)
   at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:219)
   at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:679)
  TID: [0] [ESB] [2013-07-02 04:18:22,576] ERROR {org.apache.synapse.transport.passthru.ServerWorker} -  Error processing POST request for : /services/MyService/postRequest {org.apache.synapse.transport.passthru.ServerWorker}
  org.apache.axis2.AxisFault: wrong number of arguments
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:211)
   at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
   at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
   at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)
   at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:219)
   at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:679)
  Caused by: java.lang.IllegalArgumentException: wrong number of arguments
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:178)
   at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
   ... 9 more.  
  </code></pre>
  
  <p>The following are the input I have given:  </p>
  
  <pre><code>URI:  
  
       https://localhost:8243/services/MyService/postRequest  
  
  Input XML:  
  
  &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.sample.vijay.com"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;ser:postRequest&gt;
           &lt;ser:paramOne&gt;Hello&lt;/ser:paramOne&gt;
           &lt;ser:paramTwo&gt;All&lt;/ser:paramTwo&gt;
           &lt;ser:paramThree&gt;This is POST request&lt;/ser:paramThree&gt;
        &lt;/ser:postRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>When I try to access the above service using rest client in <code>Windows machine</code>(Chrome Browser -> cREST plugin), it returns me expected result.<br>
  But when I try the same request with same URI in <code>Linux environment</code>(host address alone changed to Linux IP), ended up in above error(Wondering What might be the problem).   </p>
  
  <pre><code>Do I need to change any configuration in Linux machine or WSO2 Application Server in Linux machine? 
  </code></pre>
  
  <p><strong>Note:</strong><br>
  When I change the URI to <code>https://localhost:8243/services/MyService</code>, its working fine in Linux as well as Windows. But my requirement is to have the web method name(<code>/postRequest here</code>) in the URI.<br>
  Please help me resolving this strange issue.<br>
  Thanks in Advance.  </p>
  
  <p><strong>Edit:</strong>  </p>
  
  <p>My services.xml is:  </p>
  
  <pre><code>&lt;serviceGroup name="AxisServices"&gt;
      &lt;service name="MyService"&gt;
          &lt;description&gt;
              Please Type your service description here
          &lt;/description&gt;
          &lt;messageReceivers&gt;
              &lt;messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
                  class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"&gt;&lt;/messageReceiver&gt;
              &lt;messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"&gt;&lt;/messageReceiver&gt;
          &lt;/messageReceivers&gt;
          &lt;parameter name="ServiceClass" locked="false"&gt;com.vijay.sample.service.MyService&lt;/parameter&gt;
      &lt;/service&gt;
  </code></pre>
  
  <p>
        </p>
  
  <p>My Java class:  </p>
  
  <pre><code>package com.vijay.sample.service;
  
  public class MyService {
  
      public String postRequest(String paramOne, String paramTwo, String paramThree) {
  
          // Logic here
          return "Success";
      }
  }
  </code></pre>