Ask a Question

How could I transform a initial value to another value with code java in SOAPUI?

alfonsolft
Occasional Contributor

How could I transform a initial value to another value with code java in SOAPUI?

Hi

 

I have the answer of a REST service.  The following REST service uses as input an output of the first REST service parameter.  But the value needs to be calculated with a java progran . How could I do that?

 

java code to convert an initial value to another

 

import  xxxx.TOTPTokenGenerator;
public class Prueba {

    public static void main(String args[]) throws Exception {
    
 TOTPTokenGenerator generator = TOTPTokenGenerator.instancia();
 System.out.println(generator.getCode(args[0]));
      }
}

 

Thanks you

4 REPLIES 4
nmrao
Champion Level 3

Would you please elaborate a bit about your issue such that some one can understand and reproduce it to offer any kind of help. At the moment, the question is unclear.


Regards,
Rao.
alfonsolft
Occasional Contributor

 
Sorry for the bad description of what I want to do
 
I have the following code grovy
 
 
import  XXXXXX.totp.TOTPTokenGenerator;
def token = ${#TestCase#token};===> How I put he input value from Propiedades, the before step?
TOTPTokenGenerator generator = TOTPTokenGenerator.instancia();
generator.getCode(token);==> How I put the output to the next steep?
 
 
Thanks
 
 
nmrao
Champion Level 3

Please show the before step response.


Regards,
Rao.
alfonsolft
Occasional Contributor

Thanks nmrao,

 

Annexed the the before step response

 

cancel
Showing results for 
Search instead for 
Did you mean: