You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anas Mughal <an...@gmail.com> on 2007/09/17 01:15:16 UTC
Parameter not passed
Could someone please guide me. I have modified the Version sample to
accept a parameter as follows:
public class AxisTest {
public String getVersion(String param1) throws Exception {
return "Hello I am Axis2 test service ," + param1 + ", " +
" My version is " +
org.apache.axis2.Version.getVersionText();
}
}
The parameter is passed in the URL as follows:
http://localhost:8080/axis2/services/AxisTest/getVersion?param1=Check
The parameter is not passed to the method. What do I need to do to
pass parameters?
I new to Axis2. I do appreciate your time to help me.
Best Regards.
--
Anas Mughal
Re: Parameter not passed
Posted by Charitha Kankanamge <ch...@wso2.com>.
Hey Anas,
There was an error in your services.xml. As you can see, there is a
space in the message receiver class definition. It is in between the
class=" and org.apache.axis2.*
(<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="
org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>)
I rearranged your services.xml by removing the preceding space and got
the results successfully. The modified service archive is attached here
with. Please deploy it and see.
regards
Charitha
Anas Mughal wrote:
> This is what I get in the browser window:
>
> <ns:getVersionResponse>
> <ns:return>
> Hello I am Axis2 test service ,null, My version is 1.3
> </ns:return>
> </ns:getVersionResponse>
>
>
> As you see, param1 shows up as null.
>
> My services.xml is defined as:
>
>
> <service name="AxisTest" scope="application">
>
> <description>
> This service is to get the running Axis version
> </description>
>
> <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>
>
> <parameter name="ServiceClass">sample.axisversion.AxisTest</parameter>
>
> </service>
>
>
> I really have to make this work to approve Axis2 for our project.
> Thank you very much for your help!!!
>
>
>
> On 9/17/07, *Deepal jayasinghe * <deepalk@gmail.com
> <ma...@gmail.com>> wrote:
>
>
> > Could someone please guide me. I have modified the Version
> sample to accept a parameter as follows:
> >
> >
> >
> > public class AxisTest {
> >
> >
> > public String getVersion(String param1) throws Exception {
> > return "Hello I am Axis2 test service ," + param1 + ", " +
> >
> > " My version is " +
> org.apache.axis2.Version.getVersionText();
> >
> > }
> > }
> >
> > The parameter is passed in the URL as follows:
> >
> http://localhost:8080/axis2/services/AxisTest/getVersion?param1=Check
> >
> >
> >
> > The parameter is not passed to the method. What do I need to do
> to pass parameters?
> What did you get in the response ? did you get a SOAP fault ?
>
> Thanks
> Deepal
> >
> >
> > I new to Axis2. I do appreciate your time to help me.
> >
> > Best Regards.
> > --
> > Anas Mughal
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
>
>
>
>
> --
> Anas Mughal
>
--
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070
A bug in the hand is better than one as yet undetected
Re: Parameter not passed
Posted by Anas Mughal <an...@gmail.com>.
This is what I get in the browser window:
<ns:getVersionResponse>
<ns:return>
Hello I am Axis2 test service ,null, My version is 1.3
</ns:return>
</ns:getVersionResponse>
As you see, param1 shows up as null.
My services.xml is defined as:
<service name="AxisTest" scope="application">
<description>
This service is to get the running Axis version
</description>
<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>
<parameter name="ServiceClass">sample.axisversion.AxisTest</parameter>
</service>
I really have to make this work to approve Axis2 for our project.
Thank you very much for your help!!!
On 9/17/07, Deepal jayasinghe <de...@gmail.com> wrote:
>
>
> > Could someone please guide me. I have modified the Version sample to
> accept a parameter as follows:
> >
> >
> >
> > public class AxisTest {
> >
> >
> > public String getVersion(String param1) throws Exception {
> > return "Hello I am Axis2 test service ," + param1 + ", " +
> >
> > " My version is " +
> org.apache.axis2.Version.getVersionText();
> >
> > }
> > }
> >
> > The parameter is passed in the URL as follows:
> > http://localhost:8080/axis2/services/AxisTest/getVersion?param1=Check
> >
> >
> >
> > The parameter is not passed to the method. What do I need to do to pass
> parameters?
> What did you get in the response ? did you get a SOAP fault ?
>
> Thanks
> Deepal
> >
> >
> > I new to Axis2. I do appreciate your time to help me.
> >
> > Best Regards.
> > --
> > Anas Mughal
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Anas Mughal
Re: Parameter not passed
Posted by Deepal jayasinghe <de...@gmail.com>.
> Could someone please guide me. I have modified the Version sample to accept a parameter as follows:
>
>
>
> public class AxisTest {
>
>
> public String getVersion(String param1) throws Exception {
> return "Hello I am Axis2 test service ," + param1 + ", " +
>
> " My version is " + org.apache.axis2.Version.getVersionText();
>
> }
> }
>
> The parameter is passed in the URL as follows:
> http://localhost:8080/axis2/services/AxisTest/getVersion?param1=Check
>
>
>
> The parameter is not passed to the method. What do I need to do to pass parameters?
What did you get in the response ? did you get a SOAP fault ?
Thanks
Deepal
>
>
> I new to Axis2. I do appreciate your time to help me.
>
> Best Regards.
> --
> Anas Mughal
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org