Forum Discussion
SmartBear_Suppo
Alumni
16 years agoHello,
Sorry that the Javadoc isn't very well documented. I hate to say this, but the easiest way to integrate soapUI with your own Java code is to read the soapUI source code. Here're the relevant parts from HttpRequestStepFactory.createNewTestStep():
Maybe you can modify this and replace the dialog values with your own? Good luck!
Regards,
Dain
eviware.com
Sorry that the Javadoc isn't very well documented. I hate to say this, but the easiest way to integrate soapUI with your own Java code is to read the soapUI source code. Here're the relevant parts from HttpRequestStepFactory.createNewTestStep():
XmlBeansRestParamsTestPropertyHolder params = new XmlBeansRestParamsTestPropertyHolder( testCase, RestParametersConfig.Factory.newInstance() );
...
HttpRequestConfig httpRequest = HttpRequestConfig.Factory.newInstance();
httpRequest.setEndpoint( dialog.getValue( Form.ENDPOINT ) );
httpRequest.setMethod( dialog.getValue( Form.HTTPMETHOD ) );
new XmlBeansRestParamsTestPropertyHolder( testCase, httpRequest.addNewParameters() ).addParameters( params );
TestStepConfig testStep = TestStepConfig.Factory.newInstance();
testStep.setType( HTTPREQUEST_TYPE );
testStep.setConfig( httpRequest );
testStep.setName( dialog.getValue( Form.STEPNAME ) );
return testStep;
Maybe you can modify this and replace the dialog values with your own? Good luck!
Regards,
Dain
eviware.com