Yes, 0.8 from the module repo. I searched Jira for any related ticket
regarding the cohort search, but couldn't find any, therefore my
posting.
I can build the module from the sources, no problem. Probably need to
do that anyway, as I need to get program members, not cohort members,
so I will need to extend it anyway for our custom usage, (or using the
other alpha module you pointed at in the dev list, either way).

- Mathias


On Mon, May 14, 2012 at 11:01 PM, Darius Jazayeri
<[email protected]> wrote:
> Are you using the version of RESTWS that's in the module repo (i.e. 0.8)?
> Because there's been a lot of bugfixing since then. Are you in a position to
> build that module from source, until we get 1.0 released?
>
> -Darius
>
> On Sun, May 13, 2012 at 9:02 PM, Mathias Lin | Meta Healthcare
> <[email protected]> wrote:
>>
>> I try to get the members of the cohort via web services, following the
>> API resources in the wiki, but it fails.
>> $ curl -i -u "admin:Admin123"
>>
>> http://localhost:8080/openmrs183/ws/rest/v1/cohort/7f077157-ab26-45cd-9bfd-e8911157e230/member
>> (other web services calls, like finding a cohort by UUID or by query
>> 'q' works fine; but finding cohort members doesn't work for me).
>> Error log as below.
>>
>>
>> Related to that:
>> I found that the syntax in the API call mentioned in the ticket
>> https://tickets.openmrs.org/browse/RESTWS-140
>> curl -i -u admin:test
>>
>> http://localhost:8080/openmrs/ws/rest/cohort/0bbc73bd-0986-4581-9d3a-87cdeea13251/members
>> differs from the one in the wiki.
>> (no /v1 in the url, and it's 'members' instead of 'member' at the
>> end). Does this just relate to a newer REST web services module other
>> than the one in the module repository (version 0.8.21639)?
>>
>>
>> btw: I plan to display patients of a certain cohort (or actually even
>> better, if possible, who are enrolled in a certain program ('saved
>> search'), which is dynamic, while a saved cohort is fixed) in the
>> role-based homepage, using the respective module. I thought of using
>> the web services API for that. Or is there another approach that would
>> be simpler (DWR?).
>>
>>
>> Cohort query works fine:
>>
>> curl -i -u "admin:Admin123"
>> http://localhost:8080/openmrs183/ws/rest/v1/cohort?q=
>> HTTP/1.1 200 OK
>> Server: Apache-Coyote/1.1
>> Set-Cookie: JSESSIONID=120FB4A6A045AD550E0FD1600C1CFD65; Path=/openmrs183
>> ETag: "0ab50a58f7149ca8ba4dd9a2430146b11"
>> Content-Type: application/json;charset=UTF-8
>> Content-Length: 190
>> Date: Mon, 14 May 2012 03:58:42 GMT
>> {"results":[{"uuid":"7f077157-ab26-45cd-9bfd-e8911157e230","display":"HIV
>> Cohort","links":[{"uri":"NEED-TO-CONFIGURE/ws/rest/v1/cohort/7f077157-
>>
>>
>> Cohort search by UUID works fine:
>>
>> curl -i -u "admin:Admin123"
>>
>> http://localhost:8080/openmrs183/ws/rest/v1/cohort/7f077157-ab26-45cd-9bfd-e8911157e230
>> HTTP/1.1 200 OK
>> Server: Apache-Coyote/1.1
>> Set-Cookie: JSESSIONID=74A35274221FDDC76A6A251FFDCAB59B; Path=/openmrs183
>> ETag: "075426985fcf5609a7e22896e3caf2bfc"
>> Content-Type: application/json;charset=UTF-8
>> Content-Length: 334
>> Date: Mon, 14 May 2012 03:58:52 GMT
>>
>> {"uuid":"7f077157-ab26-45cd-9bfd-e8911157e230","name":"HIV
>> Cohort","description":"HIV
>>
>> Cohort","voided":false,"memberIds":[3],"links":[{"uri":"NEED-TO-CONFIGURE/ws/rest/v1/cohort/7f077157-ab26-45cd-9bfd-e8911157e230","rel":"self"},{"uri":"NEED-TO-CONFIGURE/ws/rest/v1/cohort/7f077157-ab26-45cd-9bfd-e8911157e230?v=full","rel":"full"}]}
>>
>>
>> Cohort member search by cohort UUID fails:
>> Isn't it the cohort UUID that I need to use in the API call url (as
>> per wiki: GET /ws/rest/v1/cohort/{parentUuid}/member)?
>>
>> curl -i -u "admin:Admin123" http://localhost:8080/ourl -i -u
>> "admin:Admin123"
>>
>> http://localhost:8080/openmrs183/ws/rest/v1/cohort/7f077157-ab26-45cd-9bfd-e8911157e230/member
>> HTTP/1.1 404 Not Found
>> Server: Apache-Coyote/1.1
>> Set-Cookie: JSESSIONID=F1FDE6D2A210EB34999EC4DFF1D28C4F; Path=/openmrs183
>> Content-Type: application/json;charset=UTF-8
>> Content-Length: 6115
>> Date: Mon, 14 May 2012 03:59:11 GMT
>>
>> {"error":{"message":"Resource does not exist. Please check
>> documentation for implemented resources and their
>>
>> paths","code":"org.openmrs.module.webservices.rest.web.v1_0.controller.BaseRestController:93","detail":"org.openmrs.module.webservices.rest.web.response.UnknownResourceException\n\tat
>>
>> org.openmrs.module.webservices.rest.web.v1_0.controller.BaseRestController.handleUnknownResource(BaseRestController.java:93)\n\tat
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat
>> java.lang.reflect.Method.invoke(Method.java:597)\n\tat
>>
>> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)\n\tat
>>
>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)\n\tat
>>
>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)\n\tat
>>
>> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)\n\tat
>>
>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)\n\tat
>>
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)\n\tat
>>
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)\n\tat
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)\n\tat
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:65)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)\n\tat
>>
>> org.openmrs.module.xforms.web.XformsFilter.doFilter(XformsFilter.java:60)\n\tat
>>
>> org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74)\n\tat
>>
>> org.openmrs.module.webservices.rest.web.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:100)\n\tat
>>
>> org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74)\n\tat
>>
>> org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:58)\n\tat
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n\tat
>>
>> org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74)\n\tat
>>
>> org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)\n\tat
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)\n\tat
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>> org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>> org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>> org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)\n\tat
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)\n\tat
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)\n\tat
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)\n\tat
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)\n\tat
>>
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)\n\tat
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n\tat
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)\n\tat
>>
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)\n\tat
>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)\n\tat
>>
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)\n\tat
>> java.lang.Thread.run(Thread.java:680)\n"}}
>>
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to
>> [email protected] with "SIGNOFF openmrs-implement-l" in the  body
>> (not the subject) of your e-mail.
>>
>> [mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]
>
>
> ________________________________
> Click here to unsubscribe from OpenMRS Implementers' mailing list

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  body 
(not the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to