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 Sarath Kamisetty <sa...@gmail.com> on 2008/08/06 05:52:41 UTC
How do I pass arguments to a method when the service is accessed using a URL ?
Hi,
I have a simple service that has two methods - listOps and concatStrs,
that are published using WSDL. listOps() methods doesn't take any
arguments so if I access it from browser like
http://localhost:8080/axis/services/myService?method=listOps it works
just fine. But concatStrs() takes two string arguments so to invoke
this how do I pass the arguments in the URL ? In the WSDL those
arguments have names as well like below:
<message name="concatStrsRequest">
<part name="Str1" type="xsd:string"/>
<part name="Str2" type="xsd:string"/>
</message>
I am not sure how to encode these in the URL. Can you please help ?
Thanks,
Sarath
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: How do I pass arguments to a method when the service is accessed using a URL ?
Posted by Sarath Kamisetty <sa...@gmail.com>.
Hi,
I am using Axis 1.4 and I tried
http://localhost:8080/axis/services/myService/method=concatStrs?Str1=valueOfString1&Str2=valueOfString2
but that doesn't work. What is equivalent of this for Axis 1.4
Thanks,
Sarath
On Tue, Aug 5, 2008 at 9:34 PM, keith chapman <ke...@gmail.com> wrote:
> Hi Sarath,
>
> Are you using axis2? If its so in the first case the operation can be
> accessed at http://localhost:8080/axis/services/myService/listOps and in the
> second case at
> http://localhost:8080/axis/services/myService/concatStrs?Str1=valueOfString1&Str2=valueOfString2
>
> As you are using WSDL deployment if you wish to yu can even take complete
> control of the above URL and have something like
> http://localhost:8080/axis/services/myService/concat?firstString=valueOfString1&secondString=valueOfString2
>
> Thanks,
> Keith.
>
> On Wed, Aug 6, 2008 at 9:22 AM, Sarath Kamisetty
> <sa...@gmail.com> wrote:
>>
>> Hi,
>>
>> I have a simple service that has two methods - listOps and concatStrs,
>> that are published using WSDL. listOps() methods doesn't take any
>> arguments so if I access it from browser like
>> http://localhost:8080/axis/services/myService?method=listOps it works
>> just fine. But concatStrs() takes two string arguments so to invoke
>> this how do I pass the arguments in the URL ? In the WSDL those
>> arguments have names as well like below:
>>
>> <message name="concatStrsRequest">
>> <part name="Str1" type="xsd:string"/>
>> <part name="Str2" type="xsd:string"/>
>> </message>
>>
>> I am not sure how to encode these in the URL. Can you please help ?
>>
>> Thanks,
>> Sarath
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: How do I pass arguments to a method when the service is accessed using a URL ?
Posted by keith chapman <ke...@gmail.com>.
Hi Sarath,
Are you using axis2? If its so in the first case the operation can be
accessed at http://localhost:8080/axis/services/myService/listOps and in the
second case at
http://localhost:8080/axis/services/myService/concatStrs?Str1=valueOfString1&Str2=valueOfString2
As you are using WSDL deployment if you wish to yu can even take complete
control of the above URL and have something like
http://localhost:8080/axis/services/myService/concat?firstString=valueOfString1&secondString=valueOfString2
Thanks,
Keith.
On Wed, Aug 6, 2008 at 9:22 AM, Sarath Kamisetty <sarath.kamisetty@gmail.com
> wrote:
> Hi,
>
> I have a simple service that has two methods - listOps and concatStrs,
> that are published using WSDL. listOps() methods doesn't take any
> arguments so if I access it from browser like
> http://localhost:8080/axis/services/myService?method=listOps it works
> just fine. But concatStrs() takes two string arguments so to invoke
> this how do I pass the arguments in the URL ? In the WSDL those
> arguments have names as well like below:
>
> <message name="concatStrsRequest">
> <part name="Str1" type="xsd:string"/>
> <part name="Str2" type="xsd:string"/>
> </message>
>
> I am not sure how to encode these in the URL. Can you please help ?
>
> Thanks,
> Sarath
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org