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

com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source

Hi All,

I am getting this response when I try to use web services: "com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source". I have tried both StudySubject and Study services, from both SoapUI and .NET code, for two OpenClinica instances. I am thinking there is a problem with my computer. Is there a way to find an OC-ws log that has more details about this exception?



  • mvirtosumvirtosu Posts: 276 ✭✭
    edited June 2016
    I have changed the log level for Openclinica-ws to "debug" but still cannot see any useful information other than what the web service returns.

    Can anyone see anything wrong with my SOAP request below:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://openclinica.org/ws/studySubject/v1" xmlns:bean="http://openclinica.org/ws/beans"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-27777511" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>importaccount</wsse:Username> <wsse:Password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"> password</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <v1:listAllByStudyRequest> <bean:studyRef> <bean:identifier>unique_identifier</bean:identifier> </bean:studyRef> </v1:listAllByStudyRequest> </soapenv:Body> </soapenv:Envelope>

    Thanks in advance for any ideas you may provide!

  • toskriptoskrip Posts: 271 ✭✭✭

    how does your environment look like? which version of OC (and OC-ws)? Which version of tomcat and java? Using http or https? Direct access to OC server or via some sort of reverse proxy?

    Is it new installation or have you ever used web services on your OC servers before?

  • mvirtosumvirtosu Posts: 276 ✭✭
    We have a Windows Enterprise edition of OpenClinica, version 3.7. I think OC-ws is also 3.7. We are using the standard Tomcat (I think version 7) and Java versions. Using https only. I am not aware of any reverse proxy.

    I have used web services before.

    Thanks for your response!

  • ColinSuttonColinSutton Posts: 30
    via Email
    Check that the java version is the same on the client and the server.
  • mvirtosumvirtosu Posts: 276 ✭✭

    I have installed the latest Java version (8u91) on my computer and on the OC server, but I am now getting the following message: "There was no endpoint listening at https://myserver/OpenClinica-ws/ws/studySubject/v1 that could accept the message.". We don't have Tomcat Manager installed on that OC server, is there another way to see if OpenClinica-ws are running? The https://myserver/OpenClinica-ws and https://myserver/OpenClinica-ws/ws/studySubject/v1/studyWsdl.wsdl are pulling up in a web browser, by the way.


  • mvirtosumvirtosu Posts: 276 ✭✭
    And one more weird thing: even though the client said nobody was listening, I can see the following in the catalina log with the correct timestamp:

    Jun 27, 2016 2:20:11 PM com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
    SEVERE: SAAJ0511: Unable to create envelope from given source
  • mvirtosumvirtosu Posts: 276 ✭✭

    Is it the Java or Java SDK version that matters?


  • Colin_SuttonColin_Sutton Posts: 15
    Whichever the applications are running under on the server: usually where JAVA-HOME points to.
  • mvirtosumvirtosu Posts: 276 ✭✭
    Thanks for that information!
Sign In or Register to comment.