axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Grieshop <jer...@omnibond.com>
Subject Re: RESTLocation Help
Date Mon, 22 Aug 2011 14:47:24 GMT
Thanks, Nandika, but it's not quite what I'm looking for, though.  In his
example, he knows ahead of time what the urls look like.  I do not know how
deep the urls will be.  For example, I could configure services.xml for:

  ls
  ls/{path1}
  ls/{path1}/{path2}
  ls/{path1}/{path2}/{path3}
  . . .

And there would always be some limit, n, by which the URL can no longer
exceed.  Moreover, I'd have to make each of the "n" RESTLocations be in "n"
separate "<operation>" elements.  Not very ideal.  What I'd like to do is
something like:

    <operation name="ls">
            <parameter name="RESTMethod">GET</parameter>
            <parameter name="RESTLocation">ls/{*}</parameter>
    </operation>


Where, any URI starting with "/ls/" would match my handler and I could be
invoked.  This would handle such URI's as:

  /ls/my
  /ls/my/folder
  /ls/my/folder/path
  . . .

-Jeremy

On Fri, Aug 19, 2011 at 2:30 AM, Nandika Jayawardana <jayawark@gmail.com>wrote:

> Following blog post by dimuthu describes how to configure rest with
> Axis2/C.
>
> http://www.dimuthu.org/blog/2008/10/18/write-restful-services-in-c/
>
> Regards
> Nandika
>
>
> On Thu, Aug 18, 2011 at 10:34 PM, Jeremy Grieshop <jeremy@omnibond.com>wrote:
>
>> Hi, just joined the list and have a question about the RESTLocation
>> parameter.
>>
>> I have an application in which I need to service REST requests to URI's
>> that
>> may or may not be predictable.  For example,
>>
>>  GET /axis2/services/myservice/some/path/unknown
>>
>> My handler needs to be invoked and process the uri "/some/path/unknown".
>>  This path cannot be configured ahead of time in my services.xml.  Is
>> there
>> a pattern I can use for the RESTLocation that will allow me to be mapped
>> for
>> all and any URI's?
>>
>> Thanks!
>> -Jeremy
>
>
>

Mime
View raw message