Buenos días es que estoy probando el web service para crear pacientes
con curl y cuando lo hago con la aplicacion en http me funciona bien,
pero con https, me genera el siguiente error:

Good morning is that I am testing the web service to create patients
with curl and when I do with my http application works well, but with
https, I generated the following error:

HTTP/1.1 401 Unauthorized
Date: Wed, 11 Jan 2012 21:44:17 GMT
Set-Cookie: JSESSIONID=6F00AF9BD465C40BD40FC5E7660B52CE; Path=/; Secure
WWW-Authenticate: Basic realm="OpenMRS at NEED-TO-CONFIGURE/ws/rest/"
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked

{"error":{"message":"User is not logged
in","code":"org.openmrs.aop.AuthorizationAdvice:115","detail":"org.openmrs.api.APIAuthenticationException:
Privileges required: [Edit Patients, Add Patients]\n\tat

volvi a intentar y me genero otro mensaje de error. Adjunto el mensaje de error.

I tried again and generates another error message. adjunct the error message.


*****
 echo '{
"preferredName":{
"identifier":"tbc123ezdr",
"identifierType":"8d79403a-c2cc-11de-8d13-0010c6dffd0f",
"location":"VitalBox"},
"preferredName":{
 "givenName":"Prueba-serWeb",
"familyName":"Programmer"},
"birthdate":"1900-08-26",
"gender":"M"
 }' | curl -i -u admin:ClaveAdmin -H "Content-type:
application/json" -X POST -d @-
https://myvitalbox.co/ws/rest/v1/patient



Gracias.


-- 
Mario Alberto Giraldo
Cel: (+ 57) 316 829 99 69
Tel: (+ 57 4) 460 07 27 Ext. 5557
VitalBox.co | MyVitalbox.co

_________________________________________

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

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]
{"error":{"message":"Unable to convert object into response content",
"code":"org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource:293",
"detail":"org.openmrs.module.webservices.rest.web.response.ConversionException: 
preferredIdentifier on class org.openmrs.Patient\n\tat 
org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:293)\n\tat
org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setConvertedProperties(BaseDelegatingResource.java:202)\n\tat
 
org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource.create(DelegatingCrudResource.java:87)\n\tat
 
org.openmrs.module.webservices.rest.web.v1_0.controller.BaseCrudController.create(BaseCrudController.java:84)\n\tat
 
sun.reflect.GeneratedMethodAccessor481.invoke(Unknown Source)\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.doPost(FrameworkServlet.java:560)\n\tat
 
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)\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.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)\n\tat
 
org.openmrs.module.logmanager.web.filter.RequestProviderFilter.doFilterInternal(RequestProviderFilter.java:36)\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.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n\tat
 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)\n\tat
 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)\n\tat 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)\n\tat 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)\n\tat 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)\n\tat
 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)\n\tat
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)\n\tat
 
java.lang.Thread.run(Thread.java:662)\n
Caused by: 
org.openmrs.module.webservices.rest.web.response.ConversionException: setting 
identifierType on class org.openmrs.PatientIdentifier\n\tat 
org.openmrs.module.webservices.rest.web.ConversionUtil.setConvertedProperty(ConversionUtil.java:91)\n\tat
 
org.openmrs.module.webservices.rest.web.ConversionUtil.setConvertedProperties(ConversionUtil.java:54)\n\tat
 
org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:190)\n\tat
 
org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:277)\n\t...
 62 more\n
Caused by: 
org.openmrs.module.webservices.rest.web.response.ConversionException: 
identifierType on class org.openmrs.PatientIdentifier\n\tat 
org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:293)\n\tat
 
org.openmrs.module.webservices.rest.web.ConversionUtil.setConvertedProperty(ConversionUtil.java:70)\n\t...
 65 more\n
Caused by: org.openmrs.api.APIAuthenticationException: Privileges required: 
[View Identifier Types]\n\tat 
org.openmrs.aop.AuthorizationAdvice.throwUnauthorized(AuthorizationAdvice.java:115)\n\tat
 
org.openmrs.aop.AuthorizationAdvice.before(AuthorizationAdvice.java:94)\n\tat 
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)\n\tat
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat
 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\n\tat
 
$Proxy267.getPatientIdentifierTypeByUuid(Unknown Source)\n\tat 
sun.reflect.GeneratedMethodAccessor501.invoke(Unknown Source)\n\tat 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat
 
java.lang.reflect.Method.invoke(Method.java:597)\n\tat 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)\n\tat
 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\n\tat
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\n\tat
 
org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)\n\tat
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat
 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)\n\tat
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat
 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\n\tat
 
$Proxy267.getPatientIdentifierTypeByUuid(Unknown Source)\n\tat 
org.openmrs.module.webservices.rest.web.v1_0.resource.PatientIdentifierTypeResource.getByUniqueId(PatientIdentifierTypeResource.java:92)\n\tat
 
org.openmrs.module.webservices.rest.web.v1_0.resource.PatientIdentifierTypeResource.getByUniqueId(PatientIdentifierTypeResource.java:35)\n\tat
 
org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:160)\n\tat
 
org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:289

Reply via email to