Forum Discussion

harinadha's avatar
harinadha
Occasional Contributor
9 years ago

Groovy to handle WSS Outgoing/Incoming requests

How to handle WSS for Outgoing/Incoming requests using Groovy script? as I have a groovy code which creates the SOAP Project based on the WSDL and creates test operation  available in the WSDL dynamically over the run time..

 

Now I need to Associate the WSS information for the project and use that WSS for every test operation over the runtime..

 

Any thoughts?

  • nmrao's avatar
    nmrao
    Champion Level 3
    May be you can set the preferences one time and these are saved in soapui-settings.xml file. And use this fixed soapui-settings.xml everywhere when soapui/testrunner is invoked. Does it work for you?
    • harinadha's avatar
      harinadha
      Occasional Contributor

      I am using the below snippet to create entity in keystores.

       

      import com.eviware.soapui.settings.SSLSettings
      import com.eviware.soapui.SoapUI
      //Set
      SoapUI.settings.setString (SSLSettings.KEYSTORE, pathToKeystore)
      SoapUI.settings.setString (SSLSettings.KEYSTORE_PASSWORD, keystorePassword)
      // get

      SoapUI.settings.getString (SSLSettings.KEYSTORE, "Test SSL")

       

       

      however, entity is not created successfully, and code is does not through any issues.

       

      requirement is to create keystores with .jks file and use the same file while sending the request to server..

       

      Any thoughts / workarounds.

      • nmrao's avatar
        nmrao
        Champion Level 3
        Is it a different question for the original topic?