Custom Factories

Print
User Rating:  / 4
Rate this article: PoorBest 

Overview

soapUI 4.0 introduces an extensive factory-based extension mechanism allowing you to add a large number of custom objects to soapUI, including TestSteps, Assertions, Editor Views, etc.To add a custom factory to soapUI you need to:

  1. Implement the desired factory interface and related classes
  2. Package the implementation in a jar file that you put in the soapUI\bin\ext folder
  3. Create an xml configuration file named XXX-factories.xml that registers the factory with soapUI
  4. Save the configuration file in a folder named "factories" in the soapUI\bin folder
  5. (Re)start soapUI

Here comes a list of all available factory extension points together with links to the corresponding javadoc

Configuration

As mentioned above you will need to create an xml configuration file for registering your custom factories. A sample file is as follows:

<soapui-factories>
   <factory id="..." factoryType="..." factoryClass="..."/>
   <factory id="..." factoryType="..." factoryClass="..."/>
</soapui-factories>

The following attributes are required for each factory element:

For example

<soapui-factories>

   <factory id="FileTransport" factoryType="com.eviware.soapui.impl.wsdl.submit.RequestTransportFactory" 
   factoryClass="com.mycorp.soapui.factories.FileTransportFactory"/>

   <factory id="MyEditor" factoryType="com.eviware.soapui.support.editor.registry.EditorViewFactory" 
   factoryClass="com.mycorp.soapui.factories.CustomRequestEditor"/>

</soapui-factories>

would register a custom RequestTransport and a custom Request Editor.

Be sure to save the file in the soapUI\bin\factories folder (create it if missing) and restart soapUI to active your custom factories.