Forum Discussion

ME_Bank_Support's avatar
ME_Bank_Support
Occasional Contributor
12 years ago

How to access external Jar files through SoapUI Pro

Hello

I got a Java key store Utility which generated a hash password for any given string. the following are the Jar files

Below are list of jar files to be used.
1. jksgenerator.jar (for key store generation)
2. security.jar (for encrypt/decrypt the password)
3. commons-codec-1.6.jar (security.jar is dependant)

This is the utility used to encrypt and decrypt the required clear text in any application.

Usage of security.jar in PEGA

Use TDesSecUtil utility to encrypt and decrypt as mentioned below.

Get the instance of the TDesSecUtil like below

TDesSecUtil secUtil = TDesSecUtil.getInstance();

Use the instance of the TDesSecUtil for encryption and decryption as below.

secUtil.encrypt("123456789")
secUtil.decrypt("hhXMHgOVosJ3PDyLEkPCVg==")

I want use this above utility in SoapUI. I got a test suit in SoapUI which need this Sec Utility.

where i need to keep this Jar files in SoapUI
How to call this functions in SoapUI
Do i need to create a WSDL to use the above Functions Encrypt and decrypt as operations.
Can some explain me in detail how can i acheive this.

6 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Please copy your jar files under SOAPUI_HOME/bin/ext, then restart soapui. Make sure you have the same java version that is compatible with your libraries.

    You can use groovy script to call those methods supported by the libraries.
  • ME_Bank_Support's avatar
    ME_Bank_Support
    Occasional Contributor
    nmrao wrote:
    Please copy your jar files under SOAPUI_HOME/bin/ext, then restart soapui. Make sure you have the same java version that is compatible with your libraries.

    You can use groovy script to call those methods supported by the libraries.


    Thanks for your prompt response. Do you have any sample Scripts that i can have a look or if You have done any thing similar can you be able to tell me which methods i need to use .
  • Hi,

    If you have copied the jar file you want to use in the SOAPUI_HOME/bin/ext directory and restart SoapUI Pro you should be able to use the classes and methods in the jar file as usual doing Groovy coding. We do not support custom code solutions, therefore it is up to the user to know how to use the methods and classes in their libraries.

    I have a jar file just for an example (the source is included in the jar file) which I can not attach to this forum because the extension .jar is not allowed. Open a ticket at http://www.soapui.org/Support/support-overview.html to get this jar fie. Copy this jar file in SOAPUI_HOME/bin/ext directory and restart SoapUI Pro. Then create a Groovy script test step and add the following code to invoke the class and use one of its methods as an example.


    Test t = new Test("joe","smoe");
    log.info t.concat()



    Regards,
    Marcus
    SmartBear Support
  • ME_Bank_Support's avatar
    ME_Bank_Support
    Occasional Contributor
    SmartBear Support wrote:
    Hi,

    If you have copied the jar file you want to use in the SOAPUI_HOME/bin/ext directory and restart SoapUI Pro you should be able to use the classes and methods in the jar file as usual doing Groovy coding. We do not support custom code solutions, therefore it is up to the user to know how to use the methods and classes in their libraries.

    I have a jar file just for an example (the source is included in the jar file) which I can not attach to this forum because the extension .jar is not allowed. Open a ticket at http://www.soapui.org/Support/support-overview.html to get this jar fie. Copy this jar file in SOAPUI_HOME/bin/ext directory and restart SoapUI Pro. Then create a Groovy script test step and add the following code to invoke the class and use one of its methods as an example.


    Test t = new Test("joe","smoe");
    log.info t.concat()



    Regards,
    Marcus
    SmartBear Support




    Please find the case number. Case #00029496

    Thank you for submitting your question to us. Case #00029496: "sample Jar file" has been created and a SoupUI SmartBear Software Customer Care Engineer will respond to you within 1 business day.

    Please note: As of February 10th, we have migrated to a new Case Management system so things will look a little different. This new platform supports new functionality that we'll make available to you throughout the year. You will see the first example of this by end of Q2 when we launch a full-featured customer portal where you can list and manage all your cases. Additionally for your convenience, we'll give you access to a robust knowledgebase where all the latest support information can be found.

    Best Regards,
    SmartBear Customer Support


    Case Thread ID: ref:_00D708FQP._50070ajaJB:ref
  • Hi,

    I have replied to the ticket you opened and attached the jar file.



    Regards,
    Marcus
    SmartBear Support