You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Florent Guillaume <fg...@nuxeo.com> on 2009/12/24 15:23:41 UTC

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

I've fixed this in a different manner, please test.

Florent

On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
> I added a binding for object by path
>
> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>
>  @GET
>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>    @Path("path/{path:.*}")
>    public Response doGetObjectByPath(
>            @PathParam("path") List<PathSegment> pathList) {
>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>        return getAbderaEntry(skipSegments);
>    }
>
> But the TCK test ObjectByPath fails because URI template in
> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
> works for jax-rs but not for CMISServlet
>
> so chemistry-tests test fails.
>
>
> Does anybody know how to fix this?
>
> Chears
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
> Yes, im sure. I use jaxrs and configure it with spring and deploy on
> Apache tomcat 6.x
>
> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
>
> Is it possible that Tomcat has problems with %2F ? I ve no idea.
> GetObjectByPath in Abderaresource is never called.

Ok I've tracked this down and it's indeed a Tomcat problem. Tomcat
since 6.0.10 by default forbids any URL containing a %2F (for some
dubious security reasons to be robust against broken proxies).

To allow them you have to start your Tomcat with:
  -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

See http://tomcat.apache.org/security-6.html#Fixed%20in%20Apache%20Tomcat%206.0.10
for more.

But this is going to be a big gotcha for a lot of application servers
using Tomcat...

Florent

-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
I've changed the path-based URI template syntax, see
https://issues.apache.org/jira/browse/CMIS-97
So now you can use without fear of Tomcat problems:
  http://.../cmis/object?path={path}&...

Florent

On Mon, Jan 11, 2010 at 9:58 AM, Flo <en...@googlemail.com> wrote:
> Yes, eaven with last update. I will try out something I saw with
> alfrseco for path access like {jax-rs base}/folder1/folder2/doc1/path
> as another option to get access by path ( {path:.*}/path}. maybe this
> works. Thanks
>
> On Sat, Jan 9, 2010 at 7:43 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> Even with latest updated code?
>> Anyway it's too problematic to ask people running Chemistry server
>> code to use -Dsomething at Tomcat startup, so I'll change Chemistry to
>> use .../object?path={path} for path-based addressing.


-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Yes, eaven with last update. I will try out something I saw with
alfrseco for path access like {jax-rs base}/folder1/folder2/doc1/path
as another option to get access by path ( {path:.*}/path}. maybe this
works. Thanks

On Sat, Jan 9, 2010 at 7:43 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> Even with latest updated code?
> Anyway it's too problematic to ask people running Chemistry server
> code to use -Dsomething at Tomcat startup, so I'll change Chemistry to
> use .../object?path={path} for path-based addressing.
>
> It's less elegant but then again there's no way to advertise clean
> path building like http://host/cmis/path/folder1/folder2/foo — they
> just can't be constructed using CMIS 1.0 URI templates, which MUST be
> encoded. Which doesn't prevent us from accepting them however.
>
> Florent
>
>
> On Fri, Jan 8, 2010 at 7:56 PM, Flo <en...@googlemail.com> wrote:
>> Ok. When I run tomcat with
>> -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
>> only the first %2F in
>> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
>> makes problems. Thats why TCK fails
>>
>>
>> On Fri, Jan 8, 2010 at 7:41 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>> No, somethin/%2Fsomething and somethin//something are different URLs.
>>>
>>> And in the CMIS spec, there's a URI template for "objectbypath" where,
>>> by definition of URI templates, you *have* to encode slashes
>>> (according to RFC 3986). So you'll always end up with %2F in some
>>> URLs.
>>>
>>> Florent
>>>
>>> On Fri, Jan 8, 2010 at 7:06 PM, Flo <en...@googlemail.com> wrote:
>>>> Thanks for that. But I think it's a Bad request from the TCK because
>>>> somethin/%2Fsomething is somethin//something thats one slash too
>>>> mutch. so it will not success if I start apache with the allow encode
>>>> %2F option.
>>>>
>>>> Regards Florian
>>>>
>>>> On Fri, Jan 8, 2010 at 6:16 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>>> When I say I use CXF 2.2.2 it's actually inside unit tests, so the
>>>>> servlet container used is not Tomcat but an embedded Jetty, which
>>>>> doesn't have any problem with %2F.
>>>>>
>>>>> Florent
>>>>>
>>>>> On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
>>>>>> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
>>>>>> in browser or via curl it's ok. strange.
>>>>>>
>>>>>> Florian Roth
>>>>>>
>>>>>> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>>>>> That's very strange, it works well for me with the JAX-RS
>>>>>>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>>>>>>> your JAX-RS implementation (which is it?) fails. And I just tested
>>>>>>> with RESTEasy 1.0.2 and it fails as well.
>>>>>>>
>>>>>>> I'll investigate -- but you're right this must have something to do
>>>>>>> with the path percent-decoding.
>>>>>>>
>>>>>>> Florent
>>>>>>>
>>>>>>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>>>>>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>>>>>>> Apache tomcat 6.x
>>>>>>>>
>>>>>>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>>>>>>> GetObjectByPath in Abderaresource is never called.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Florent Guillaume, Director of R&D, Nuxeo
>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
Even with latest updated code?
Anyway it's too problematic to ask people running Chemistry server
code to use -Dsomething at Tomcat startup, so I'll change Chemistry to
use .../object?path={path} for path-based addressing.

It's less elegant but then again there's no way to advertise clean
path building like http://host/cmis/path/folder1/folder2/foo — they
just can't be constructed using CMIS 1.0 URI templates, which MUST be
encoded. Which doesn't prevent us from accepting them however.

Florent


On Fri, Jan 8, 2010 at 7:56 PM, Flo <en...@googlemail.com> wrote:
> Ok. When I run tomcat with
> -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
> only the first %2F in
> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
> makes problems. Thats why TCK fails
>
>
> On Fri, Jan 8, 2010 at 7:41 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> No, somethin/%2Fsomething and somethin//something are different URLs.
>>
>> And in the CMIS spec, there's a URI template for "objectbypath" where,
>> by definition of URI templates, you *have* to encode slashes
>> (according to RFC 3986). So you'll always end up with %2F in some
>> URLs.
>>
>> Florent
>>
>> On Fri, Jan 8, 2010 at 7:06 PM, Flo <en...@googlemail.com> wrote:
>>> Thanks for that. But I think it's a Bad request from the TCK because
>>> somethin/%2Fsomething is somethin//something thats one slash too
>>> mutch. so it will not success if I start apache with the allow encode
>>> %2F option.
>>>
>>> Regards Florian
>>>
>>> On Fri, Jan 8, 2010 at 6:16 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>> When I say I use CXF 2.2.2 it's actually inside unit tests, so the
>>>> servlet container used is not Tomcat but an embedded Jetty, which
>>>> doesn't have any problem with %2F.
>>>>
>>>> Florent
>>>>
>>>> On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
>>>>> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
>>>>> in browser or via curl it's ok. strange.
>>>>>
>>>>> Florian Roth
>>>>>
>>>>> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>>>> That's very strange, it works well for me with the JAX-RS
>>>>>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>>>>>> your JAX-RS implementation (which is it?) fails. And I just tested
>>>>>> with RESTEasy 1.0.2 and it fails as well.
>>>>>>
>>>>>> I'll investigate -- but you're right this must have something to do
>>>>>> with the path percent-decoding.
>>>>>>
>>>>>> Florent
>>>>>>
>>>>>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>>>>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>>>>>> Apache tomcat 6.x
>>>>>>>
>>>>>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>>>>>> GetObjectByPath in Abderaresource is never called.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>
>>>
>>
>>
>>
>> --
>> Florent Guillaume, Director of R&D, Nuxeo
>> Open Source, Java EE based, Enterprise Content Management (ECM)
>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Ok. When I run tomcat with
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
only the first %2F in
http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
makes problems. Thats why TCK fails


On Fri, Jan 8, 2010 at 7:41 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> No, somethin/%2Fsomething and somethin//something are different URLs.
>
> And in the CMIS spec, there's a URI template for "objectbypath" where,
> by definition of URI templates, you *have* to encode slashes
> (according to RFC 3986). So you'll always end up with %2F in some
> URLs.
>
> Florent
>
> On Fri, Jan 8, 2010 at 7:06 PM, Flo <en...@googlemail.com> wrote:
>> Thanks for that. But I think it's a Bad request from the TCK because
>> somethin/%2Fsomething is somethin//something thats one slash too
>> mutch. so it will not success if I start apache with the allow encode
>> %2F option.
>>
>> Regards Florian
>>
>> On Fri, Jan 8, 2010 at 6:16 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>> When I say I use CXF 2.2.2 it's actually inside unit tests, so the
>>> servlet container used is not Tomcat but an embedded Jetty, which
>>> doesn't have any problem with %2F.
>>>
>>> Florent
>>>
>>> On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
>>>> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
>>>> in browser or via curl it's ok. strange.
>>>>
>>>> Florian Roth
>>>>
>>>> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>>> That's very strange, it works well for me with the JAX-RS
>>>>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>>>>> your JAX-RS implementation (which is it?) fails. And I just tested
>>>>> with RESTEasy 1.0.2 and it fails as well.
>>>>>
>>>>> I'll investigate -- but you're right this must have something to do
>>>>> with the path percent-decoding.
>>>>>
>>>>> Florent
>>>>>
>>>>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>>>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>>>>> Apache tomcat 6.x
>>>>>>
>>>>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>>>>> GetObjectByPath in Abderaresource is never called.
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Florent Guillaume, Director of R&D, Nuxeo
>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
No, somethin/%2Fsomething and somethin//something are different URLs.

And in the CMIS spec, there's a URI template for "objectbypath" where,
by definition of URI templates, you *have* to encode slashes
(according to RFC 3986). So you'll always end up with %2F in some
URLs.

Florent

On Fri, Jan 8, 2010 at 7:06 PM, Flo <en...@googlemail.com> wrote:
> Thanks for that. But I think it's a Bad request from the TCK because
> somethin/%2Fsomething is somethin//something thats one slash too
> mutch. so it will not success if I start apache with the allow encode
> %2F option.
>
> Regards Florian
>
> On Fri, Jan 8, 2010 at 6:16 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> When I say I use CXF 2.2.2 it's actually inside unit tests, so the
>> servlet container used is not Tomcat but an embedded Jetty, which
>> doesn't have any problem with %2F.
>>
>> Florent
>>
>> On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
>>> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
>>> in browser or via curl it's ok. strange.
>>>
>>> Florian Roth
>>>
>>> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>> That's very strange, it works well for me with the JAX-RS
>>>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>>>> your JAX-RS implementation (which is it?) fails. And I just tested
>>>> with RESTEasy 1.0.2 and it fails as well.
>>>>
>>>> I'll investigate -- but you're right this must have something to do
>>>> with the path percent-decoding.
>>>>
>>>> Florent
>>>>
>>>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>>>> Apache tomcat 6.x
>>>>>
>>>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>>>> GetObjectByPath in Abderaresource is never called.
>>>>>
>>>>
>>>>
>>>> --
>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>
>>>
>>
>>
>>
>> --
>> Florent Guillaume, Director of R&D, Nuxeo
>> Open Source, Java EE based, Enterprise Content Management (ECM)
>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Thanks for that. But I think it's a Bad request from the TCK because
somethin/%2Fsomething is somethin//something thats one slash too
mutch. so it will not success if I start apache with the allow encode
%2F option.

Regards Florian

On Fri, Jan 8, 2010 at 6:16 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> When I say I use CXF 2.2.2 it's actually inside unit tests, so the
> servlet container used is not Tomcat but an embedded Jetty, which
> doesn't have any problem with %2F.
>
> Florent
>
> On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
>> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
>> in browser or via curl it's ok. strange.
>>
>> Florian Roth
>>
>> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>> That's very strange, it works well for me with the JAX-RS
>>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>>> your JAX-RS implementation (which is it?) fails. And I just tested
>>> with RESTEasy 1.0.2 and it fails as well.
>>>
>>> I'll investigate -- but you're right this must have something to do
>>> with the path percent-decoding.
>>>
>>> Florent
>>>
>>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>>> Apache tomcat 6.x
>>>>
>>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>>> GetObjectByPath in Abderaresource is never called.
>>>>
>>>
>>>
>>> --
>>> Florent Guillaume, Director of R&D, Nuxeo
>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
When I say I use CXF 2.2.2 it's actually inside unit tests, so the
servlet container used is not Tomcat but an embedded Jetty, which
doesn't have any problem with %2F.

Florent

On Fri, Jan 8, 2010 at 6:02 PM, Flo <en...@googlemail.com> wrote:
> I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
> in browser or via curl it's ok. strange.
>
> Florian Roth
>
> On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> That's very strange, it works well for me with the JAX-RS
>> implementation from CXF 2.2.2 (used in unit tests), but apparently
>> your JAX-RS implementation (which is it?) fails. And I just tested
>> with RESTEasy 1.0.2 and it fails as well.
>>
>> I'll investigate -- but you're right this must have something to do
>> with the path percent-decoding.
>>
>> Florent
>>
>> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>>> Apache tomcat 6.x
>>>
>>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>>> GetObjectByPath in Abderaresource is never called.
>>>
>>
>>
>> --
>> Florent Guillaume, Director of R&D, Nuxeo
>> Open Source, Java EE based, Enterprise Content Management (ECM)
>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
I use jax-rs cxf 2.2.2 as well. If I type the path without the %2F's
in browser or via curl it's ok. strange.

Florian Roth

On Fri, Jan 8, 2010 at 5:18 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> That's very strange, it works well for me with the JAX-RS
> implementation from CXF 2.2.2 (used in unit tests), but apparently
> your JAX-RS implementation (which is it?) fails. And I just tested
> with RESTEasy 1.0.2 and it fails as well.
>
> I'll investigate -- but you're right this must have something to do
> with the path percent-decoding.
>
> Florent
>
> On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
>> Yes, im sure. I use jaxrs and configure it with spring and deploy on
>> Apache tomcat 6.x
>>
>> Is it possible that Tomcat has problems with %2F ? I ve no idea.
>> GetObjectByPath in Abderaresource is never called.
>>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
That's very strange, it works well for me with the JAX-RS
implementation from CXF 2.2.2 (used in unit tests), but apparently
your JAX-RS implementation (which is it?) fails. And I just tested
with RESTEasy 1.0.2 and it fails as well.

I'll investigate -- but you're right this must have something to do
with the path percent-decoding.

Florent

On Fri, Jan 8, 2010 at 3:35 PM, Flo <en...@googlemail.com> wrote:
> Yes, im sure. I use jaxrs and configure it with spring and deploy on
> Apache tomcat 6.x
>
> Is it possible that Tomcat has problems with %2F ? I ve no idea.
> GetObjectByPath in Abderaresource is never called.
>


-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Yes, im sure. I use jaxrs and configure it with spring and deploy on
Apache tomcat 6.x

<jaxrs:server id="cmis" address="/">
		<jaxrs:serviceBeans>
			<ref bean="abderaResource" />
			<description>cmis service</description>
		</jaxrs:serviceBeans>
		<jaxrs:providers>
			<ref bean="abderaResponseProvider" />
			<description>cmis provider</description>
		</jaxrs:providers>
	</jaxrs:server>

	<bean id="abderaResource"
		class="org.apache.chemistry.atompub.server.jaxrs.AbderaResource">
		<constructor-arg ref="repoJcrFactory" />
	</bean>
	<bean id="abderaResponseProvider"
		class="org.apache.chemistry.atompub.server.jaxrs.AbderaResponseProvider" />

Is it possible that Tomcat has problems with %2F ? I ve no idea.
GetObjectByPath in Abderaresource is never called.


On Fri, Jan 8, 2010 at 3:26 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> It works in my testing. Are you sure you're using the JAX-RS bindings?
> Could you paste the code you use to start the server?
>
> Florent
>
> On Tue, Jan 5, 2010 at 12:40 PM, Flo <en...@googlemail.com> wrote:
>> Problem is, that if I set a breakpoint in
>> AbderaResource.doGetObjectByPath(...) it's never reached. So I get a
>> 400. Im running Abdera jaxrs server and test with the TCK. The request
>> url from TCK is
>> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
>> . The url until path is ok.
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
It works in my testing. Are you sure you're using the JAX-RS bindings?
Could you paste the code you use to start the server?

Florent

On Tue, Jan 5, 2010 at 12:40 PM, Flo <en...@googlemail.com> wrote:
> Problem is, that if I set a breakpoint in
> AbderaResource.doGetObjectByPath(...) it's never reached. So I get a
> 400. Im running Abdera jaxrs server and test with the TCK. The request
> url from TCK is
> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
> . The url until path is ok.


-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Problem is, that if I set a breakpoint in
AbderaResource.doGetObjectByPath(...) it's never reached. So I get a
400. Im running Abdera jaxrs server and test with the TCK. The request
url from TCK is
http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
. The url until path is ok.


On Mon, Jan 4, 2010 at 6:38 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> Strange, this works for me.
> What server code are you testing this with?
> Can you breakpoint in AbderaResource.getRequestContext and check that
> rpath ends with "cmis"?
> Can you check that CMISObjectsCollection.getEntry(String resourceName,
> RequestContext request, SPI spi) correctly gets the path?
>
> Florent
>
>
>
> On Mon, Jan 4, 2010 at 6:19 PM, Flo <en...@googlemail.com> wrote:
>> Hi,
>>
>> im confused. Still got trace this with TCK testGetObjectByPath:
>>
>> java.lang.AssertionError: Request status for
>> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
>> expected:<200> but was:<400>
>>        at org.junit.Assert.fail(Assert.java:92)
>>        at org.junit.Assert.failNotEquals(Assert.java:689)
>>        at org.junit.Assert.assertEquals(Assert.java:127)
>>        at org.junit.Assert.assertEquals(Assert.java:514)
>>        at org.apache.chemistry.tck.atompub.client.CMISClient.executeRequest(CMISClient.java:411)
>>        at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:273)
>>        at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:268)
>>        at org.apache.chemistry.tck.atompub.test.spec.GetTest.testObjectByPath(GetTest.java:129)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at junit.framework.TestCase.runTest(TestCase.java:168)
>>        at junit.framework.TestCase.runBare(TestCase.java:134)
>>        at junit.framework.TestResult$1.protect(TestResult.java:110)
>>        at junit.framework.TestResult.runProtected(TestResult.java:128)
>>        at junit.framework.TestResult.run(TestResult.java:113)
>>        at junit.framework.TestCase.run(TestCase.java:124)
>>        at org.apache.chemistry.tck.atompub.TCKTest.run(TCKTest.java:107)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>        at junit.framework.TestSuite.run(TestSuite.java:227)
>>        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
>>        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>>        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>>
>>
>> Best Regards
>>
>> On Mon, Jan 4, 2010 at 2:48 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>> Ok I now understand what you mean, and I just fixed it.
>>> I've also updated MainServlet to easily run a standalone server using
>>> JAX-RS bindings (pass it --jaxrs), so that running the TCK with that
>>> is easier.
>>>
>>> Florent
>>>
>>> On Mon, Jan 4, 2010 at 12:19 PM, Flo <en...@googlemail.com> wrote:
>>>> Hi,
>>>>
>>>> the problem is that the jax-rs @GET methode with
>>>> @PATH("path/{path:.*}") will not be called by the GetObjectByPath test
>>>> in tck because TCK gets path URI Template from CMISProvider with
>>>> "path/{path}" so it does not hook. It hooks if you change path uri
>>>> templeat uin CMISProvider to path/{path:.*} but then it wont work for
>>>> the CMISServlet tests in chemistry-test. Thats what I wanted to say.
>>>>
>>>> Chears and happy new years
>>>>
>>>> On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>>> I've fixed this in a different manner, please test.
>>>>>
>>>>> Florent
>>>>>
>>>>> On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
>>>>>> I added a binding for object by path
>>>>>>
>>>>>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>>>>>>
>>>>>>  @GET
>>>>>>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>>>>>>    @Path("path/{path:.*}")
>>>>>>    public Response doGetObjectByPath(
>>>>>>            @PathParam("path") List<PathSegment> pathList) {
>>>>>>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>>>>>>        return getAbderaEntry(skipSegments);
>>>>>>    }
>>>>>>
>>>>>> But the TCK test ObjectByPath fails because URI template in
>>>>>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
>>>>>> works for jax-rs but not for CMISServlet
>>>>>>
>>>>>> so chemistry-tests test fails.
>>>>>>
>>>>>>
>>>>>> Does anybody know how to fix this?
>>>>>>
>>>>>> Chears
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Florent Guillaume, Director of R&D, Nuxeo
>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
Strange, this works for me.
What server code are you testing this with?
Can you breakpoint in AbderaResource.getRequestContext and check that
rpath ends with "cmis"?
Can you check that CMISObjectsCollection.getEntry(String resourceName,
RequestContext request, SPI spi) correctly gets the path?

Florent



On Mon, Jan 4, 2010 at 6:19 PM, Flo <en...@googlemail.com> wrote:
> Hi,
>
> im confused. Still got trace this with TCK testGetObjectByPath:
>
> java.lang.AssertionError: Request status for
> http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
> expected:<200> but was:<400>
>        at org.junit.Assert.fail(Assert.java:92)
>        at org.junit.Assert.failNotEquals(Assert.java:689)
>        at org.junit.Assert.assertEquals(Assert.java:127)
>        at org.junit.Assert.assertEquals(Assert.java:514)
>        at org.apache.chemistry.tck.atompub.client.CMISClient.executeRequest(CMISClient.java:411)
>        at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:273)
>        at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:268)
>        at org.apache.chemistry.tck.atompub.test.spec.GetTest.testObjectByPath(GetTest.java:129)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at junit.framework.TestCase.runTest(TestCase.java:168)
>        at junit.framework.TestCase.runBare(TestCase.java:134)
>        at junit.framework.TestResult$1.protect(TestResult.java:110)
>        at junit.framework.TestResult.runProtected(TestResult.java:128)
>        at junit.framework.TestResult.run(TestResult.java:113)
>        at junit.framework.TestCase.run(TestCase.java:124)
>        at org.apache.chemistry.tck.atompub.TCKTest.run(TCKTest.java:107)
>        at junit.framework.TestSuite.runTest(TestSuite.java:232)
>        at junit.framework.TestSuite.run(TestSuite.java:227)
>        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
>        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>
>
> Best Regards
>
> On Mon, Jan 4, 2010 at 2:48 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> Ok I now understand what you mean, and I just fixed it.
>> I've also updated MainServlet to easily run a standalone server using
>> JAX-RS bindings (pass it --jaxrs), so that running the TCK with that
>> is easier.
>>
>> Florent
>>
>> On Mon, Jan 4, 2010 at 12:19 PM, Flo <en...@googlemail.com> wrote:
>>> Hi,
>>>
>>> the problem is that the jax-rs @GET methode with
>>> @PATH("path/{path:.*}") will not be called by the GetObjectByPath test
>>> in tck because TCK gets path URI Template from CMISProvider with
>>> "path/{path}" so it does not hook. It hooks if you change path uri
>>> templeat uin CMISProvider to path/{path:.*} but then it wont work for
>>> the CMISServlet tests in chemistry-test. Thats what I wanted to say.
>>>
>>> Chears and happy new years
>>>
>>> On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>>> I've fixed this in a different manner, please test.
>>>>
>>>> Florent
>>>>
>>>> On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
>>>>> I added a binding for object by path
>>>>>
>>>>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>>>>>
>>>>>  @GET
>>>>>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>>>>>    @Path("path/{path:.*}")
>>>>>    public Response doGetObjectByPath(
>>>>>            @PathParam("path") List<PathSegment> pathList) {
>>>>>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>>>>>        return getAbderaEntry(skipSegments);
>>>>>    }
>>>>>
>>>>> But the TCK test ObjectByPath fails because URI template in
>>>>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
>>>>> works for jax-rs but not for CMISServlet
>>>>>
>>>>> so chemistry-tests test fails.
>>>>>
>>>>>
>>>>> Does anybody know how to fix this?
>>>>>
>>>>> Chears
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Florent Guillaume, Director of R&D, Nuxeo
>>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>>
>>>
>>
>>
>>
>> --
>> Florent Guillaume, Director of R&D, Nuxeo
>> Open Source, Java EE based, Enterprise Content Management (ECM)
>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Hi,

im confused. Still got trace this with TCK testGetObjectByPath:

java.lang.AssertionError: Request status for
http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath
expected:<200> but was:<400>
	at org.junit.Assert.fail(Assert.java:92)
	at org.junit.Assert.failNotEquals(Assert.java:689)
	at org.junit.Assert.assertEquals(Assert.java:127)
	at org.junit.Assert.assertEquals(Assert.java:514)
	at org.apache.chemistry.tck.atompub.client.CMISClient.executeRequest(CMISClient.java:411)
	at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:273)
	at org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:268)
	at org.apache.chemistry.tck.atompub.test.spec.GetTest.testObjectByPath(GetTest.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at org.apache.chemistry.tck.atompub.TCKTest.run(TCKTest.java:107)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)


Best Regards

On Mon, Jan 4, 2010 at 2:48 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> Ok I now understand what you mean, and I just fixed it.
> I've also updated MainServlet to easily run a standalone server using
> JAX-RS bindings (pass it --jaxrs), so that running the TCK with that
> is easier.
>
> Florent
>
> On Mon, Jan 4, 2010 at 12:19 PM, Flo <en...@googlemail.com> wrote:
>> Hi,
>>
>> the problem is that the jax-rs @GET methode with
>> @PATH("path/{path:.*}") will not be called by the GetObjectByPath test
>> in tck because TCK gets path URI Template from CMISProvider with
>> "path/{path}" so it does not hook. It hooks if you change path uri
>> templeat uin CMISProvider to path/{path:.*} but then it wont work for
>> the CMISServlet tests in chemistry-test. Thats what I wanted to say.
>>
>> Chears and happy new years
>>
>> On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>>> I've fixed this in a different manner, please test.
>>>
>>> Florent
>>>
>>> On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
>>>> I added a binding for object by path
>>>>
>>>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>>>>
>>>>  @GET
>>>>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>>>>    @Path("path/{path:.*}")
>>>>    public Response doGetObjectByPath(
>>>>            @PathParam("path") List<PathSegment> pathList) {
>>>>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>>>>        return getAbderaEntry(skipSegments);
>>>>    }
>>>>
>>>> But the TCK test ObjectByPath fails because URI template in
>>>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
>>>> works for jax-rs but not for CMISServlet
>>>>
>>>> so chemistry-tests test fails.
>>>>
>>>>
>>>> Does anybody know how to fix this?
>>>>
>>>> Chears
>>>>
>>>
>>>
>>>
>>> --
>>> Florent Guillaume, Director of R&D, Nuxeo
>>> Open Source, Java EE based, Enterprise Content Management (ECM)
>>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>>
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Florent Guillaume <fg...@nuxeo.com>.
Ok I now understand what you mean, and I just fixed it.
I've also updated MainServlet to easily run a standalone server using
JAX-RS bindings (pass it --jaxrs), so that running the TCK with that
is easier.

Florent

On Mon, Jan 4, 2010 at 12:19 PM, Flo <en...@googlemail.com> wrote:
> Hi,
>
> the problem is that the jax-rs @GET methode with
> @PATH("path/{path:.*}") will not be called by the GetObjectByPath test
> in tck because TCK gets path URI Template from CMISProvider with
> "path/{path}" so it does not hook. It hooks if you change path uri
> templeat uin CMISProvider to path/{path:.*} but then it wont work for
> the CMISServlet tests in chemistry-test. Thats what I wanted to say.
>
> Chears and happy new years
>
> On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
>> I've fixed this in a different manner, please test.
>>
>> Florent
>>
>> On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
>>> I added a binding for object by path
>>>
>>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>>>
>>>  @GET
>>>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>>>    @Path("path/{path:.*}")
>>>    public Response doGetObjectByPath(
>>>            @PathParam("path") List<PathSegment> pathList) {
>>>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>>>        return getAbderaEntry(skipSegments);
>>>    }
>>>
>>> But the TCK test ObjectByPath fails because URI template in
>>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
>>> works for jax-rs but not for CMISServlet
>>>
>>> so chemistry-tests test fails.
>>>
>>>
>>> Does anybody know how to fix this?
>>>
>>> Chears
>>>
>>
>>
>>
>> --
>> Florent Guillaume, Director of R&D, Nuxeo
>> Open Source, Java EE based, Enterprise Content Management (ECM)
>> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: UriTemplate for AtomPubCMIS.URITMPL_OBJECT_BY_PATH does not work for jax-rs binding

Posted by Flo <en...@googlemail.com>.
Hi,

the problem is that the jax-rs @GET methode with
@PATH("path/{path:.*}") will not be called by the GetObjectByPath test
in tck because TCK gets path URI Template from CMISProvider with
"path/{path}" so it does not hook. It hooks if you change path uri
templeat uin CMISProvider to path/{path:.*} but then it wont work for
the CMISServlet tests in chemistry-test. Thats what I wanted to say.

Chears and happy new years

On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <fg...@nuxeo.com> wrote:
> I've fixed this in a different manner, please test.
>
> Florent
>
> On Wed, Dec 16, 2009 at 4:00 PM, Flo <en...@googlemail.com> wrote:
>> I added a binding for object by path
>>
>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH
>>
>>  @GET
>>    @Produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY)
>>    @Path("path/{path:.*}")
>>    public Response doGetObjectByPath(
>>            @PathParam("path") List<PathSegment> pathList) {
>>        int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1;
>>        return getAbderaEntry(skipSegments);
>>    }
>>
>> But the TCK test ObjectByPath fails because URI template in
>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it
>> works for jax-rs but not for CMISServlet
>>
>> so chemistry-tests test fails.
>>
>>
>> Does anybody know how to fix this?
>>
>> Chears
>>
>
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>