Forum Discussion

rah's avatar
rah
Occasional Contributor
15 years ago

missing package org.apache.xmlbeans when running a Test Case from java

I am trying to start to run a TestCase from java more or less like this

try {
WsdlProject project = new WsdlProject(testxml);
TestSuite testSuite = project.getTestSuiteByName(suitename);
TestCase testCase = testSuite.getTestCaseByName(testcase);

// create empty properties and run synchronously
TestRunner runner = testCase.run(new PropertiesMap(), false);
Assert.assertEquals(Status.FINISHED, runner.getStatus());

}
catch (XmlException e) {
Assert.fail("Could not start soapui");
}
catch (IOException e) {
Assert.fail("Could not start soapui");
}
catch (SoapUIException e) {
Assert.fail("Could not start soapui");
}

But I keep getting the following Exception: package org.apache.xmlbeans does not exist
    [javac] import org.apache.xmlbeans.XmlException;

what am I missing in my class path?

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Do you have the xmlpublic and xbean jars on the classpath? Really depending on what type of TestSteps you are using in your TestCase, you may need a lot of other dependencies as well so you might as well include everything in the soapUI libs folder.

    Regards,
    Dain
    eviware.com