Forum Discussion

dhiresh's avatar
dhiresh
New Contributor
15 years ago

SOAPUI execution from Java

Hi All,

I have created a SOAP project, added test suite, added test case, added test step. I used the java jars from eviware3.6.1 (/bin and /lab) folders. Using the API I am using the SOAP methods in the following manner :
public class SoapExecution {
public SoapExecution() {
super();
}
public void testTestCaseRunner() throws Exception {String projectFile = System.getProperty("user.dir")
+ "\\src\\com\\soapautomation\\resources\\SOAP_Project.xml";
if (!new File(projectFile).exists())
throw new Exception("soapUI project file [" + projectFile
+ "] not found");

WsdlProject project = new WsdlProject(projectFile);
WsdlTestSuite inboundTestSuite = project.getTestSuiteByName("InboundTestSuite");
WsdlTestCase getEventTestCase = inboundTestSuite.getTestCaseByName("TestCase 1");
WsdlTestStep putEventTestStep = getEventTestCase.getTestStepByName("PutEvent");
WsdlTestCaseRunner runPutEvent = new WsdlTestCaseRunner(getEventTestCase, new StringToObjectMap());
TestStepResult eventResult = runPutEvent.runTestStep(putEventTestStep);
WsdlTestRequestStepResult eventWSDL = (WsdlTestRequestStepResult) eventResult;
}
}

I am getting a proper response from the above code, but the control goes to an uncaught exception. The daemon thread keeps on running. Can any anybody help me out on how to end the process once the SOAP execution is done.
Let me know what other methods can be used to make it an async call if required.

Thanks in Advance
Dhiresh

2 Replies

  • dhiresh's avatar
    dhiresh
    New Contributor
    Hi All,

    I havent got any reply .
    I am using Soap Java Api for firing the requests. The execution is fine.. but the program doesnt end. It seems a thread is not getting killed.


    Please provide any feedback ASAP.
    If anyone has any queries do let me know.....
  • I'm having the same problems with loads of unterminated threads from each execution, and in the end memory leaks.

    /Preben