We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

SOAP web services for 3.6 and above - test

toskriptoskrip Posts: 279 ✭✭✭
edited September 2015 in Installation & Setup

I am currently testing OC 3.6 with web services as I am planning to migrate from 3.3 very soon. I just want to provide some info about changes for other users that also plan to upgrade:

1. web services in OC 3.6 have changed the default location of configuration files the same way as OC did some versions before. This means that after the deployment it creates a folder outside of tomcat webapps folder (named e.g. openclinica-ws.config).

this is where the modification on config file should be done

2. As always it is necessary to setup db attribute in datainfo.properties. OpenClinica DB name should be stated there.
3. The default value in org.quartz.threadPool.threadCount attribute in datainfo.properties should be changed to 0 (originally it is set to 1)

The services functionality should stay the same with one exception that is the dataImport service that introduces new Upsert feature and setup of form status after import. For more info please follow the documentation here:

The documentation claims that if none of these new options are used, the service will work as in the previous versions of OC. This is true, but please be aware of one change that can cause that applications using the import web services can stop working properly. Originally after the import, the response XML from the WS sent back the ws-client could be "Success" or "Fail". In the new version there is additional information (e.g. message about how many forms have been imported) in the result attribute so if your client code was using pure comparison against "Success" or "Fail" keywords to notify user about the result of service call it will stop working as the comparison will fail. The service will execute fine but the client can assume that something was wrong as it could not match the result value in response to predefined response codes.




  • kristiakkristiak Posts: 1,338 ✭✭✭
    via Email
    Hi Tomas,

    I guess this is why WS stopped working for us suddenly and I had to restart Tomcat to get it working again. I will change the value from 1 to 0 in item 3) in your list below.

    Thanks for the tip.

    Best regards

  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    Thanks heaps for the note about the return value. What is the effect of
    setting the thread count to 0?
  • toskriptoskrip Posts: 279 ✭✭✭
    There is a small comment in config that people can easily overlook:

    # threadCount should be set to zero on web services modules

    Quartz job scheduler is a component that allows to execute specific task in a background on a schedule bases (e.g. data exports). However web services are by its nature request/response based so there is no need to deal with scheduling. I suppose 0 number in thread count should disable the scheduler as no thread is available to execute any schedule jobs. Having 1 there is most likely have an effect that one thread is always available (but never used).

  • kristiakkristiak Posts: 1,338 ✭✭✭
    Now we have run into a problem I never seen before. In the large stroke studie that we run in collaboration with Edinburgh University we are trying to import data using WEB services and it works fine if we do import the data to the main study But as soon as we try to create a patient and import the data to a specific site it fails with the error message "Error message: You do not have sufficient privileges to proceed with this operation. " What can be wrong?
  • ebsebs Posts: 137 ✭✭
    Does the web service user require to be granted access at a site level in 3.6?
  • toskriptoskrip Posts: 279 ✭✭✭
    If you are importing data for site patient your user account need to have access to site... but this was true also in OC 3.3.

  • kristiakkristiak Posts: 1,338 ✭✭✭
    The WS user is a technical administrator with access to all sites, so that should not be a problem :)
  • toskriptoskrip Posts: 279 ✭✭✭
    Yeah but user needs to be assigned with role to a specific site. Because during import you specify Study Site OID and the service will check whether there is an association between user and site. Even if you assign user to parent study it is not enough. He has to be also assigned to the site.

  • kristiakkristiak Posts: 1,338 ✭✭✭
    The way this study is set up is that the randomization is done in Edinburgh in a WEB based system that immediately export the randomization data to OpenClinica. Are you saying that we need to have a specific user ID for each site for this export/import to work? We have 25 site. Is there a smarter way to do this. Back in 2012 we ran a small study 4 sites and imported data from a BYOD and I do not remember that we had these issues.
    I'm sure there must be a smart solution for this!???
  • toskriptoskrip Posts: 279 ✭✭✭
    When creating ODM XML structure for import you could try to use parent StudyOID instead of StudySiteOID in ClinicalData XML element and than import with user who has parent study lvl access. But I am not sure if this will work... (did not tried it myself).

    I don't think that giving the user who runs import jobs over web-services rights for each site is so much additional work. I know about this behavior so I setup appropriate rights during the study definition and afterward do not think about it any more.

    Basically have one system user who gets access to each site and use this system user for import over web services.

    Sorry right now I do not know about any other smarter/better way of dealing with this behavior.

This discussion has been closed.