Interfaces and Operations

In the current implementation of the internal soapui object model, Interfaces in soapui correspond to SOAP/HTTP Bindings for a PortType. When importing a WSDL using one of the "Import WSDL .." project actions, the import proceeds as follows

  • The specified WSDL is loaded and searched for defined WSDL Services. If any services are are found, each of that services' ports' binding is imported as a seperate Interface into the soapui project (provided that it is a SOAP/HTTP binding). If no services are found, the importer searches for standalone SOAP/HTTP Bindings that are not bound to any service, theseare imported as seperate interfaces
  • For each imported Binding, its PortTypes Operations are added as Operations and a default request is created (if specified) from the operations request schema.
  • The name of the Bindings PortType is used as the Interface name in soapui

The reasons for mapping Interfaces to WSDL Bindings and not WSDL services directly are:

  • A WSDL Service can "implement" multiple bindings (through WSDL ports), each is imported as a seperate Interface into soapui
  • A Binding can be "implemented" by several WSDL Services (for example on different servers or as a part of a more complex service interface). soapui allows association of multiple service endpoints (see below) for a binding so it is easy to work with the same binding (ie Interface) without having to import each seperately.
  • PortTypes/Bindings can be defined without any referencing service, just like a java interface can be defined without an implementing class. It should still be possible to work with these from soapui

Interface Actions

The following actions are available from the interface nodes' right-button menu:

  • Service Endpoints : Opens a dialog for managing the available service endpoints for this interface (see below)
  • Update Definition : prompts from where to reload the definition for this interface. Updating will synchronize any changes in the underlying Binding/PortType as best as possible:
    • new operations are added as new Operations in the navigator
    • operations not available any more can either be mapped to new ones (if they were renamed) or removed. When removing operations, all test-requests associated with them will also be removed from their respective TestCases.
    This action is usefull in the following situations:
    • When the definition URL for a service/interface has changed (for example moved to another server)
    • When the definition itself has changed (for example new operations have been added or the associated XML Schema has been modified
    If there is no binding in the specified definition matching the previous binding for the selected interface (for example if the binding has been renamed) an error will be displayed.
  • Remove : prompts to remove the interface from its containing project. When removing an Interface, all test-requests associated with operations in that Interface will also be removed from their respective TestCases.

Interface Details Tab

The "Details" tab shown in the bottom-left shows the following values when a Interface node is selected in the navigation tree
  • Definition URL : the URL where the Interface is defined (ie from where it was imported)
  • Binding : The name of the WSDL Binding for the interface in {namespace}name format
  • PortType : The WSDL PortType that the Binding exposes.

Interface Desktop Pane

Double-clicking on an interface-node in the navigator loads the interfaces WSDL and all imported/included definition files (wsdls and xsds) and displays these in a window containing a tab for each file.

Currently the only functionality for finding your way around these tabs/files is manually and the Find-Dialog (Ctrl-F).

Service Endpoints

Selecting the "Service Endpoints" action from the interface context menu opens a dialog showing the available service endpoints for the interface. If the interface was imported from a WSDL Service, that services ports URL will be available in this list, but your are free to add/edit/remove as many service endpoints as you want. When deleting an endpoint, all requests that had that endpoint will have their endpoint set to null.

The Assign options prompts to assign the selected endpoint to requests, the following options are displayed:

  • - all requests - : will assign the selected endpoint to all requests for operations in the current interface.
  • - all requests with no endpoint - : will assign the selected endpoint to all requests for operations in the current interface that have no endpoint.
  • <endpoint> : will assign the selected endpoint to all requests for operations in the current interface that have this endpoint.

Assigning endpoints with this option will not assign to TestRequests, use the "Set TestCase Endpoint" action in the TestCase Editor for this instead.

When closing the dialog with the "Ok" button, the available endpoints will be selectable in associated operations requests/test-requests editor panes.

Operations

When adding an interface as described above, each of that interfaces operation is added as a node in the navigator named after the operation in the underlying PortType.

The following actions are available from the operation nodes' right-button menu:
  • New Request - creates a new Request for this operation from its wsdl/schema definition. soapui will prompt for a name and if optional schema elements should be created.
  • Relabel - changes the label of the operation in the navigator.

Operation Details Tab

The "Details" tab shown in the bottom-left shows the following values when a Operation node is selected in the navigation tree
  • SOAPAction : the SOAP Action specified for the operation in its sopa/http binding
  • Operation : The name of the operation in the underlying PortType


Next: Working with Requests