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

How to authenticate OpenClinica Web Service

Hi All,
We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url,
http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,




soapenv:Sender


The security token could not be authenticated or authorized; nested exception is:
org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
org.springframework.security.authentication.BadCredentialsException: Bad credentials




We are adding the following soap header in the payload,



root
openclinica



Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
Any help will be very much appreciated!!!!!
Thanks,
Deb
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com

Comments

  • tboardmantboardman Posts: 2
    Hello
    You need to send the SHA-1 HASH of the password, I found this guide on getting started useful http://www.trialdatasolutions.com/tds/howto/wssetup.jsp
    Thanks
    Tim Boardman
    -----Original Message-----
    Sent: 24 July 2012 10:51
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service
    Hi All,
    We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url, http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
    But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,




    soapenv:Sender


    The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials




    We are adding the following soap header in the payload,



    root
    openclinica



    Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
    Any help will be very much appreciated!!!!!
    Thanks,
    Deb
    Please do not print this email unless it is absolutely necessary.
    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
    www.wipro.com
  • Hi Timothy,
    Thanks for the input. As a crude way of fixing error I copied the encoded password from the DB and it worked for the StudyManagementService. But as mentioned in the URL provided by you, I tried to list down all the existing studies, I used the below mentioned payload. But surprisingly in spite of getting the list of studies existing in OpenClinica I got the following error.






    root
    a3adf26e70b8d8ab53da3d36b159ccb341d014e6




    ?









    soapenv:Receiver


    Could not access envelope: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header; nested exception is org.apache.axiom.soap.SOAPProcessingException: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header





    I was hitting the following URL: http://localhost:8080/OpenClinica-ws/ws/study/v1/studyWsdl.wsdl

    Does anybody have any clue about this kind of errors?

    Thanks ,
    Deb

    -----Original Message-----
    Sent: Tuesday, July 24, 2012 3:51 PM
    To: [email protected]
    Subject: Re: [Developers] How to authenticate OpenClinica Web Service

    Hello
    You need to send the SHA-1 HASH of the password, I found this guide on getting started useful http://www.trialdatasolutions.com/tds/howto/wssetup.jsp
    Thanks
    Tim Boardman

    -----Original Message-----
    Sent: 24 July 2012 10:51
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi All,
    We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url, http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
    But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,





    soapenv:Sender


    The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials





    We are adding the following soap header in the payload,




    root
    openclinica




    Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
    Any help will be very much appreciated!!!!!

    Thanks,
    Deb


    Please do not print this email unless it is absolutely necessary.

    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

    www.wipro.com
  • Hi Timothy,
    Thanks for the input. As a crude way of fixing error I copied the encoded password from the DB and it worked for the StudyManagementService. But as mentioned in the URL provided by you, I tried to list down all the existing studies, I used the below mentioned payload. But surprisingly in spite of getting the list of studies existing in OpenClinica I got the following error.






    root
    a3adf26e70b8d8ab53da3d36b159ccb341d014e6




    ?








    soapenv:Receiver


    Could not access envelope: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header; nested exception is org.apache.axiom.soap.SOAPProcessingException: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header





    I was hitting the following URL: http://localhost:8080/OpenClinica-ws/ws/study/v1/studyWsdl.wsdl

    Does anybody have any clue about this kind of errors?

    Thanks ,
    Deb

    -----Original Message-----
    Sent: Tuesday, July 24, 2012 3:51 PM
    To: [email protected]
    Subject: Re: [Developers] How to authenticate OpenClinica Web Service

    Hello
    You need to send the SHA-1 HASH of the password, I found this guide on getting started useful http://www.trialdatasolutions.com/tds/howto/wssetup.jsp
    Thanks
    Tim Boardman

    -----Original Message-----
    Sent: 24 July 2012 10:51
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi All,
    We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url, http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
    But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,





    soapenv:Sender


    The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials





    We are adding the following soap header in the payload,




    root
    openclinica




    Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
    Any help will be very much appreciated!!!!!

    Thanks,
    Deb

    Please do not print this email unless it is absolutely necessary.
    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
    www.wipro.com
  • jjahrjjahr Posts: 41
    Hi Deb,

    I know very little about how web services actually work, and so I have no idea if this will actually help you, but your script is missing a xmlns:soapenc attribute that our functioning request has. Here is the request we use:





    mirth
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx








    If I remember correctly, the ? in your request needs to be changed as well. It has been a while since I have really played with these, so don’t quote me on that =) Hope this helps.

    Joe
    Sent: Tuesday, July 24, 2012 7:54 AM
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi Timothy,
    Thanks for the input. As a crude way of fixing error I copied the encoded password from the DB and it worked for the StudyManagementService. But as mentioned in the URL provided by you, I tried to list down all the existing studies, I used the below mentioned payload. But surprisingly in spite of getting the list of studies existing in OpenClinica I got the following error.






    root
    a3adf26e70b8d8ab53da3d36b159ccb341d014e6




    ?








    soapenv:Receiver


    Could not access envelope: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header; nested exception is org.apache.axiom.soap.SOAPProcessingException: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header





    I was hitting the following URL: http://localhost:8080/OpenClinica-ws/ws/study/v1/studyWsdl.wsdl

    Does anybody have any clue about this kind of errors?

    Thanks ,
    Deb

    -----Original Message-----
    Sent: Tuesday, July 24, 2012 3:51 PM
    To: [email protected]
    Subject: Re: [Developers] How to authenticate OpenClinica Web Service

    Hello
    You need to send the SHA-1 HASH of the password, I found this guide on getting started useful http://www.trialdatasolutions.com/tds/howto/wssetup.jsp
    Thanks
    Tim Boardman

    -----Original Message-----
    Sent: 24 July 2012 10:51
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi All,
    We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url, http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
    But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,





    soapenv:Sender


    The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials





    We are adding the following soap header in the payload,




    root
    openclinica




    Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
    Any help will be very much appreciated!!!!!

    Thanks,
    Deb

    Please do not print this email unless it is absolutely necessary.
    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
    www.wipro.com
    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
  • Hi All,
    Today I could finally resolve the error.
    This error was caused because of the SOAP version mismatch.
    I was invoking the webservice deployed as part of the caBIG WAR file. As I analyzed the ws-servlet-config.xml file part of the WAR, I found that it enforces SOAP 1.2. The StudyManagement and other services which are only available in caBIG webservice comply with SOAP 1.2 hence they work fine in this war.
    But other OpenClinica provided default web services are complying with SOAP 1.1. That’s why invocation of the common webservices deployed as part of caBIG WAR throws error.
    As a workaround I deployed both the WARs in tomcat by changing the web application name.
    Now StudyManagement and other caBIG web services get served by openclinica-ws-ca.war and common web services get served by openclinica-ws.war.

    Thank you all for your help.

    Thanks,
    Deb
    Sent: Tuesday, July 24, 2012 8:52 PM
    To: [email protected]
    Subject: Re: [Developers] How to authenticate OpenClinica Web Service

    Hi Deb,

    I know very little about how web services actually work, and so I have no idea if this will actually help you, but your script is missing a xmlns:soapenc attribute that our functioning request has. Here is the request we use:





    mirth
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx








    If I remember correctly, the ? in your request needs to be changed as well. It has been a while since I have really played with these, so don’t quote me on that =) Hope this helps.

    Joe
    Sent: Tuesday, July 24, 2012 7:54 AM
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi Timothy,
    Thanks for the input. As a crude way of fixing error I copied the encoded password from the DB and it worked for the StudyManagementService. But as mentioned in the URL provided by you, I tried to list down all the existing studies, I used the below mentioned payload. But surprisingly in spite of getting the list of studies existing in OpenClinica I got the following error.






    root
    a3adf26e70b8d8ab53da3d36b159ccb341d014e6




    ?








    soapenv:Receiver


    Could not access envelope: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header; nested exception is org.apache.axiom.soap.SOAPProcessingException: Disallowed element found inside Envelope : {http://schemas.xmlsoap.org/soap/envelope/}Header





    I was hitting the following URL: http://localhost:8080/OpenClinica-ws/ws/study/v1/studyWsdl.wsdl

    Does anybody have any clue about this kind of errors?

    Thanks ,
    Deb

    -----Original Message-----
    Sent: Tuesday, July 24, 2012 3:51 PM
    To: [email protected]
    Subject: Re: [Developers] How to authenticate OpenClinica Web Service

    Hello
    You need to send the SHA-1 HASH of the password, I found this guide on getting started useful http://www.trialdatasolutions.com/tds/howto/wssetup.jsp
    Thanks
    Tim Boardman

    -----Original Message-----
    Sent: 24 July 2012 10:51
    To: [email protected]
    Subject: [Developers] How to authenticate OpenClinica Web Service

    Hi All,
    We have installed Openclinica CaBig webservice WAR in tomcat server, we are able to get the WSDL for StudManagement from the following url, http://server:post/OpenClinica-ws/ws/StudyManagementService.wsdl
    But whenever we are trying to invoke that service using the SOAP UI we are getting the following error,





    soapenv:Sender


    The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials; nested exception is org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is:
    org.springframework.security.authentication.BadCredentialsException: Bad credentials





    We are adding the following soap header in the payload,




    root
    openclinica




    Can anyone guide us to debug this issue? DO we need to encrypt the password for the webservice? If we need to encrypt then using which algo do we need to encrypt?
    Any help will be very much appreciated!!!!!

    Thanks,
    Deb

    Please do not print this email unless it is absolutely necessary.
    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
    www.wipro.com
    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
    Please do not print this email unless it is absolutely necessary.
    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
    www.wipro.com
This discussion has been closed.