Or, when having "/services/*" and jaxrs:address "/", see if the initial
part of the @Path value on the root resource can be 'shifted' to
jaxrs:address, ex, the following:
CXFServlet: /services/*
jaxrs:address = "/"
@Path("customers")
public class Customers {
@GET
@Path("orders")
public Orders getOrders() {
}
}
can be changed to
CXFServlet: /services/*
jaxrs:address = "/customers"
@Path("/")
public class Customers {
@GET
@Path("orders")
public Orders getOrders() {
}
}
and the 3rd option (in addition to the above one and overriding the services
page address with the servlet-list-path) is not use "/services/*" servlet
pattern at all - if it makes sense for a given URI space
Cheers, Sergey
On Mon, Apr 18, 2011 at 8:15 AM, Sergey Beryozkin <[email protected]>wrote:
> Hi Benson, Dennis
>
> On Sun, Apr 17, 2011 at 12:41 PM, Benson Margulies
> <[email protected]>wrote:
>
>> Dennis,
>>
>> As I tried to explain, the whole business works fine if I use URLs of the
>> form:
>>
>> http://thehost/theservlet/services/services/theservice/themethod
>>
>
> There's no need to have "/services/services" in URIs, just have a "/*"
> servlet pattern and a jaxrs:server "/services" or
> "/services" and "/" - but in this latter case CXFServlet needs to be
> configured with the "service-list-path" parameter such as "/theservices",
> etc, so
>
> http://thehost/theservlet/theservices
>
> will give you the list of services.
>
> Cheers, Sergey
>
>>
>> I just found it esthetically annoying :-)
>>
>> --benson
>>
>>
>> On Sat, Apr 16, 2011 at 8:58 PM, Dennis Sosnoski <[email protected]>
>> wrote:
>> > If you have static content I'd think you'd need a real path for the
>> > servlet, not just /*. But using your servlet mapping /services/* did you
>> > try browsing to http://localhost/webapp/services/services? My point was
>> > that I'd found I needed the extra "/services" in the URL to get the
>> > service config page, and I thought it might be the same in your setup.
>> >
>> > - Dennis
>> >
>> >
>> > On 04/17/2011 11:15 AM, Benson Margulies wrote:
>> >> Dennis,
>> >>
>> >> All works fine if I configure address="/services" and go there.
>> >>
>> >> Since I have some static content, I'm a bit leary of /*, but should I
>> be?
>> >>
>> >>
>> >>
>> >> On Sat, Apr 16, 2011 at 5:46 PM, Dennis Sosnoski <[email protected]>
>> wrote:
>> >>> Try browsing to /services/services. I use <url-pattern>/*<url-pattern>
>> >>> with 2.3.3 to have the REST service accessed at
>> >>> http://host:port/war-name and find the services page shows up at
>> >>> http://host:port/war-name/services
>> >>>
>> >>> - Dennis
>> >>>
>> >>> Dennis M. Sosnoski
>> >>> Java SOA and Web Services Consulting <
>> http://www.sosnoski.com/consult.html>
>> >>> Axis2/CXF/Metro SOA and Web Services Training
>> >>> <http://www.sosnoski.com/training.html>
>> >>> Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>
>> >>>
>> >>>
>> >>> On 04/17/2011 09:02 AM, Benson Margulies wrote:
>> >>>> I configure my servlet mapping for '/services/*'.
>> >>>>
>> >>>> I then give a jaxrs:server an address='/'.
>> >>>>
>> >>>> So, I figure, since each of my service classes has an @Path, I'll
>> >>>> still get the CXF service listing at
>> http://localhost/webapp/services.
>> >>>> No Such Luck. Services work, but no service config page.
>> >>>>
>> >>>> Is this a reasonable thing to expect, or have I shaded it out?
>> >>>>
>> >
>>
>
>
>
--
Sergey Beryozkin
Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com