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

Calling web services from Mirth Connect

Hi Everyone,
I am using Mirth Connect to call the OpenClinica web services. I have got this working and it works well, but I had to make two changes in order to get it working and I am wondering whether this is because of an issue with Mirth Connect or whether the OpenClinica web services are not configured 100% correctly - or I misunderstand something.
In the studySubject.xsd and event.xsd schema files there is an "import" statement to import the beans.xsd file. Mirth complains that it can't find the beans.xsd file. If I replace the "import" statement with the beans.xsd contents then this problem is fixed.
When I originally ran the web service I got an error saying that "/ws/studySubject/v1" cannot be found. If I edit the ws-servlet-config.xml file and fully qualify the "locationUri" then this problem is fixed. e.g.
As I said, I have got this working and it is great, but I am confused as to which piece of the jigsaw is not configured correctly. It would be nice not to have to make, and remember, these modifications.
Many thanks for any insight into this,
Cheers
Scott

Comments

  • Tom HickersonTom Hickerson Posts: 449
    Hi Scott,

    Thanks for your questions. I am looking up the reasons for this, as I’ve been having thoughts about how to change this as well. Reason #1 I am still figuring out, but #2 I have pretty much solved. If you change the line in your web.xml file from this:


    ws
    org.springframework.ws.transport.http.MessageDispatcherServlet

    contextConfigLocation
    /WEB-INF/ws-servlet-config.xml



    To this:


    ws
    org.springframework.ws.transport.http.MessageDispatcherServlet

    contextConfigLocation
    /WEB-INF/ws-servlet-config.xml


    transformWsdlLocations
    true



    You will be able to fully qualify the locationUri. This will eventually be committed to the code, and released with version 3.1. I’ll keep looking for solutions to #1 below.

    Hope that helps, Tom
    Sent: Friday, May 20, 2011 2:17 PM
    To: [email protected]
    Subject: [Developers] Calling web services from Mirth Connect

    Hi Everyone,
    I am using Mirth Connect to call the OpenClinica web services. I have got this working and it works well, but I had to make two changes in order to get it working and I am wondering whether this is because of an issue with Mirth Connect or whether the OpenClinica web services are not configured 100% correctly - or I misunderstand something.
    In the studySubject.xsd and event.xsd schema files there is an "import" statement to import the beans.xsd file. Mirth complains that it can't find the beans.xsd file. If I replace the "import" statement with the beans.xsd contents then this problem is fixed.
    When I originally ran the web service I got an error saying that "/ws/studySubject/v1" cannot be found. If I edit the ws-servlet-config.xml file and fully qualify the "locationUri" then this problem is fixed. e.g.
    As I said, I have got this working and it is great, but I am confused as to which piece of the jigsaw is not configured correctly. It would be nice not to have to make, and remember, these modifications.
    Many thanks for any insight into this,
    Cheers
    Scott
  • GerbenRienkGerbenRienk Posts: 809 ✭✭✭
    Hi Scott,

    You are correct in your findings and this was mentioned about a year ago, see for example
    https://community.openclinica.com/wiki-page-soap-services
    and
    https://community.openclinica.com/fw-revised-oc-web-services-no-more-beansxsd-missing
    With the last mail there was also a zip with Dieter Menne’s corrected web-services and if you’re interested I can send you these, but maybe it’s better to wait for 3.1, because the web-services are in general better. I tested the 3.1 beta 4 and most of them gave correct results and accepted data (but not all).
    All the best,

    Gerben Rienk


    Van: [email protected] [mailto:[email protected]] Namens Scott Rodger
    Verzonden: vrijdag 20 mei 2011 13:17
    Aan: [email protected]
    Onderwerp: [Developers] Calling web services from Mirth Connect

    Hi Everyone,
    I am using Mirth Connect to call the OpenClinica web services. I have got this working and it works well, but I had to make two changes in order to get it working and I am wondering whether this is because of an issue with Mirth Connect or whether the OpenClinica web services are not configured 100% correctly - or I misunderstand something.
    In the studySubject.xsd and event.xsd schema files there is an "import" statement to import the beans.xsd file. Mirth complains that it can't find the beans.xsd file. If I replace the "import" statement with the beans.xsd contents then this problem is fixed.
    When I originally ran the web service I got an error saying that "/ws/studySubject/v1" cannot be found. If I edit the ws-servlet-config.xml file and fully qualify the "locationUri" then this problem is fixed. e.g.
    As I said, I have got this working and it is great, but I am confused as to which piece of the jigsaw is not configured correctly. It would be nice not to have to make, and remember, these modifications.
    Many thanks for any insight into this,
    Cheers
    Scott
  • mdeatmdeat Posts: 9
    Many thanks Tom, that worked for #2 and I no longer need to fully qualify the locationUri.
    Cheers
    scott
    On 20/05/2011 19:14, Tom Hickerson wrote:
    >
    > Hi Scott,
    >
    >
    >
    > Thanks for your questions. I am looking up the reasons for this, as I’ve been having thoughts about how to change this as well. Reason #1 I am still figuring out, but #2 I have pretty much solved. If you change the line in your web.xml file from this:
    >
    >
    >
    >
    >
    > ws
    >
    > org.springframework.ws.transport.http.MessageDispatcherServlet
    >
    >
    >
    > contextConfigLocation
    >
    > /WEB-INF/ws-servlet-config.xml
    >
    >
    >
    >
    >
    >
    >
    > To this:
    >
    >
    >
    >
    >
    > ws
    >
    > org.springframework.ws.transport.http.MessageDispatcherServlet
    >
    >
    >
    > contextConfigLocation
    >
    > /WEB-INF/ws-servlet-config.xml
    >
    >
    >
    >
    >
    > transformWsdlLocations
    >
    > true
    >
    >
    >
    >
    >
    >
    >
    > You will be able to fully qualify the locationUri. This will eventually be committed to the code, and released with version 3.1. I’ll keep looking for solutions to #1 below.
    >
    >
    >
    > Hope that helps, Tom
    >
    >
    >
    >
    > Sent: Friday, May 20, 2011 2:17 PM
    > To: [email protected]
    > Subject: [Developers] Calling web services from Mirth Connect
    >
    >
    >
    > Hi Everyone,
    > I am using Mirth Connect to call the OpenClinica web services. I have got this working and it works well, but I had to make two changes in order to get it working and I am wondering whether this is because of an issue with Mirth Connect or whether the OpenClinica web services are not configured 100% correctly - or I misunderstand something.
    >
    > In the studySubject.xsd and event.xsd schema files there is an "import" statement to import the beans.xsd file. Mirth complains that it can't find the beans.xsd file. If I replace the "import" statement with the beans.xsd contents then this problem is fixed.
    > When I originally ran the web service I got an error saying that "/ws/studySubject/v1" cannot be found. If I edit the ws-servlet-config.xml file and fully qualify the "locationUri" then this problem is fixed. e.g.
    >
    > As I said, I have got this working and it is great, but I am confused as to which piece of the jigsaw is not configured correctly. It would be nice not to have to make, and remember, these modifications.
    >
    > Many thanks for any insight into this,
    > Cheers
    > Scott
    >
    >
This discussion has been closed.