Contributions
Settings in Java API
Hi: I am trying to set the WSDL settings using the SOAPUI Java API to populate sample requests with example data and I have the following so far. Do I need to pass the settingz object to something else to pick up the changes? project = new WsdlProject(projectFilePath); ifaces = project.importWsdl(wsdlFileName, true); SettingsImpl settings = new SettingsImpl(); settings.setBoolean(WsdlSettings.XML_GENERATION_TYPE_EXAMPLE_VALUE, true); op = (WsdlOperation) ifaces[0].getOperationByName(operationName); String data = op.createRequest(true); The data string has the request xml, but does not have example values in them. what else should I be doing? Thanks in advance!1.3KViews0likes1Comment- 792Views0likes0Comments
How to add a new Xpath Match assertion in Java
Hello: I am having a bit of trouble setting the content for the xpath match assertion. I have the following so far. WsdlOperation operation = (WsdlOperation) iface.getOperationByName(operationName); WsdlTestCase tc = testSuite.addNewTestCase("TestCase"); TestStepConfig config = WsdlTestRequestStepFactory.createConfig(operation, "TestStep1"); WsdlTestRequestStep ts = (WsdlTestRequestStep) tc.addTestStep(config); TestAssertion ta = ts.addAssertion( "XPath Match" ); I need to set the xpath expression to: declare namespace ns='http://www.somecompany.com; //code='123' How do I set the expression in the TestAssertion? I did not find any methods to do this. Thanks much!2.2KViews0likes2Comments- 880Views0likes0Comments
SOAP Response Assertion to a TestStep using Java API?
How can I add a SOAPResponseAssertion to a TestStep using Java API? I am able to create the testcase and teststep programmatically using the following. WsdlProject project = new WsdlProject(projectFilePath); WsdlTestSuite testSuite = project.addNewTestSuite("TestSuite"); WsdlTestCase tc = testSuite.addNewTestCase("TestCase" + (i+1)); TestStepConfig config = WsdlTestRequestStepFactory.createConfig(operation, "TestStep1"); WsdlTestStep ts = tc.addTestStep(config); How do I now add a SOAP Response assertion? Thanks much in advance!2.3KViews0likes1CommentsoapUI Pro license validation error using Java API
I am trying to create the soapUI Pro DataSource Test Step via the Java API and I keep getting an error about license validation. Should I be putting the license file somewhere specific? Thanks! 10:21:24,698 ERROR [SoapUI] An error occured [java.lang.NullPointerException], see error log for details java.lang.NullPointerException at com.eviware.soapui.SoapUIPro.validateLicense(SourceFile:357) at com.eviware.soapui.impl.wsdl.teststeps.registry.DataSourceStepFactory.createNewTestStep(SourceFile:37) at com.omx.esb.test.SOAPUIUtil.createProject(SOAPUIUtil.java:50) at com.omx.esb.test.TestMain.main(TestMain.java:32)2.4KViews0likes2Comments