I am new to Axis2. I am trying to send a parameter in the URL as a REST call. However, I am unable to figure out why my server-side function does not get the parameter. I keep on getting null. I have not touched the axis2.xml file. The service is showing up fine in the list of services page. Here is the URL that I am using to call the service:
http://localhost:8080/axis2/services/AxisTest/getVersion?param1=Check Here is what I see in the browser: <ns:getVersionResponse xmlns:ns="http://axisversion.sample"> <ns:return>Hello I am Axis2 test service ,null, My version is 1.3</ns:return> </ns:getVersionResponse> Here is my service: package sample.axisversion; import org.apache.axis2.context.ServiceContext; import org.apache.axis2.context.OperationContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class AxisTest { public String getVersion(String param1) throws Exception { System.out.println("param1: " + param1 + "=\n"); return "Hello I am Axis2 test service ," + param1 + ", " + " My version is " + org.apache.axis2.Version.getVersionText (); } } Here is the services.xml contents: <service name="AxisTest" scope="application"> <description> This service is to get the running Axis version </description> <parameter name="ServiceClass">sample.axisversion.AxisTest</parameter> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class=" org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/> <messageReceiver mep=" http://www.w3.org/2004/08/wsdl/in-out" class=" org.apache.axis2.rpc.receivers.RPCMessageReceiver"/> </messageReceivers> <!-- <operation name="getVersion"> <messageReceiver class=" org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </operation> --> </service> I am running axis2 version 1.3 inside Tomcat 6.0. Thank you very much in advance. -- Anas Mughal
