Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

I need to pass jython code to java

rmiranda
rmiranda Posts: 2

I have doubts when passing this jython code to java code in Extension Tool

"def ObtieneXML(input,context):
entrada = context.getValue("Generated Data Source","DNI");
entrada = entrada.strip();
context.setValue("DNI2",entrada);
context.getValue("DNI2");"

if someone knows how to pass that code to java, please help.

Tagged:

Best Answer

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭
    Answer ✓

    I see your script using the "context" object which is a java object of type com.parasoft.api.ScriptingContext. What is not working for you? Are you seeing a particular error that you do not understand?

Answers

  • rmiranda
    rmiranda Posts: 2

    hi benken_parasoft,
    I was able to solve it, the problem was that I couldn't connect it to the data sources, in java.