REST Web Services API

Assallam! I am using OpenMRS Version: 1.9.7 Build 60bd9b

I want to use this api in this version but it is not available in it. How Can I use it? I am already using radiology module which is compatible with 1.9.0 to 1.9.7 versions only. PLEASE help… my system is working good with 1.9.7, if I use api of 1.9.10 then it may cause issues ?

Did you try platform 1.9.11? It is a maintenance release and hence not expected to have breaking changes.

you are talking about 1.9.11 for radiology module ? or you are telling me I can access rest web service with this 1.9.11 or both ?

Am telling you to try it out and see what happens. :slight_smile:

ok, I try will let you know as well.

1.9.10 is the last version. see image what kind of error is this? how can I solve this I am using 1.9.7 version

this is the error java.lang.ClassCastException: org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.OrderResource1_8 cannot be cast to org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.OrderResource1_10 org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.DrugOrderSubclassHandler1_10.getCreatableProperties(DrugOrderSubclassHandler1_10.java:123) org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.AddPaths(SwaggerSpecificationCreator.java:202) org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.BuildJSON(SwaggerSpecificationCreator.java:68) org.openmrs.module.webservices.rest.web.controller.SwaggerSpecificationController.getSwaggerSpecification(SwaggerSpecificationController.java:69) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:65) org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:59) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76) org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58) org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:111) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

Try restart tomcat and tell us if you still get this error.

As @dkayiwa mentioned try restarting the server. Don’t forget to check whether all modules have successfully started from the administration window. :slight_smile:

no it is not working @dkayiwa , still same error.

@dkayiwa Brother, I am not stick to 1.9.7 , I need Rest api module and Radiology module in openmrs. please recommend me that version in which both work. I want to use api module for its api documentation. please guide me

@judeniroshan yes module (REST WEB SERVICES) load success fully but … get same error., IS this java error i am using 32bit 6_u45 jre

i have changed the privileges still the same error, also changed the jre to 7 still erro. can you provide me radiology module in any 2.X version?

@ivange94 is has lots of radiology module experience and hence can will be of help.

1 Like

ok, I am waiting.

@gulraiz I read all the messages. Still don’t fully understand your problem. Can you clarify to me what you want?

@ivange94 I need a radiology module that work fine with latest version of openmrs and I have to communicate openmrs with dcm4chee. Sir, PLEASE help me.

As far as I know the latest versions of the radiology module are not supported for production use with the latest versions of OpenMRS.

See this:

1 Like

sir, is there any way I can access rest web service api of openmrs 1.9.0 to 1.9.7 . I need them.

@darius @dkayiwa @ivange94 sir, now i am using openmrs version 1.9.10 which is rest web service api requirement. but still i am facing same issue not able to genreate the swagger document. get error HTTP Status 500 -. i am using apache 6.0.29 java 6_u45 openmrs 1.9.10 Rest Web Services 2.13.e3a897 Settings

Error page Error CODE java.lang.ClassCastException: org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.OrderResource1_8 cannot be cast to org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.OrderResource1_10 org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.DrugOrderSubclassHandler1_10.getCreatableProperties(DrugOrderSubclassHandler1_10.java:123) org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.AddPaths(SwaggerSpecificationCreator.java:202) org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.BuildJSON(SwaggerSpecificationCreator.java:68) org.openmrs.module.webservices.rest.web.controller.SwaggerSpecificationController.getSwaggerSpecification(SwaggerSpecificationController.java:69) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:61) org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:55) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:107) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

for REST webservice verison 2.18.X … i have no error. but …

When i use this link … openmrs logo comes and in the center and keep rotating…!

http://localhost:8080/openmrs/module/webservices/rest/apiDocs.htm

Do I forget some settings to do ? PLEASE guide me