The SOAP Client tool sends messages to SOAP servers. 

It can be used to test a Web service, test the communication between the client and server, and check the content of the SOAP messages. You can use the SOAP Client tool to test services with or without a WSDL. This tool is the foundation of most SOA functional test cases.

If you have access to a WSDL, you may want to use the New Test Suite Wizard to automatically generate SOAP Client tests for the service you want to test. For information on this functionality, see Automatic Creation of Test Suites - Overview.

In addition, you can configure SOAtest to report or manipulate the results of any SOAP Client test by adding an appropriate “output” tool. For information on this functionality, see Adding Test Outputs.

To send a message using the SOAP Client tool, you need to specify the message and how to send it by setting parameters in the tool’s configuration panel.

Information on how to configure the different options of the SOAP Client tool can be found in the following subsections:

WSDL Options

Specifying options in the WSDL tab allows you to populate the Request tab with items that make it easier for you to specify the request message. You can specify the following WSDL settings:

The WSDL tab allows you to specify the following WSDL settings:

  • Resource Mode: Specifies WSDL URI or Schema URL mode.
  • WSDL URI: Describes the WSDL URI where this Web service can be accessed. You can either enter a value or click the Browse button. If you do not have a WSDL, you can leave this field empty.
  • Schema URL: Describes the Schema URL where this Web service can be accessed. You can either enter a value or click the Browse button. If you do not have a schema, you can leave this field empty.
  • Constrain to WSDL: (Constrain to Schema if Schema resource mode is selected) Determines whether certain parameters of the messaging tool obtain their values from the WSDL (or Schema) rather than from manual entry.  If this option is enabled, certain parameters (e.g. router endpoint, SOAP action, SOAP body and header parameters) are disabled and get their values from the WSDL. If this option is disabled, the Refresh WSDL (Refresh Schema) button will also be disabled.
  • WSDL Documentation: (Automatically completed if available): Describes the Web service at the given WSDL URI.

Request Options

The Request tab allows you to configure the request that you want the tool to send.

From the Request tab of the SOAP Client tool, you can select input modes from the Views drop-down list. The SOAP Client tool shares these options with the Messaging Client tool and Message Stub tool. For more information on these shared options, see Views/Input Modes Overview.

Transport Options

The Transport options allow you to determine whether the client sends requests using HTTP 1.0, HTTP 1.1, JMS, SonicMQ, WebSphere MQ, RMI, SMTP, TIBCO, .NET WCF HTTP, or .NET WCF TCP protocols. To configure the properties of each protocol, select the appropriate protocol from the Transport drop-down list within the Transport tab of the SOAP Client tool.

Copying and Pasting Transport Settings Across Tools

You can copy transport settings from one tool to another.

  1. Select the left-pane setting categories that you want to copy.
  2. Right-click the selection and choose Copy.
  3. Open the same interface for the destination tool.
  4. Right-click in the configuration panel and choose Paste.

For more information, see the following sections:

Attachment Options

The Attachment tab allows you to send either Binary or XML attachments without scripting. To send an attachment, perform the following from the Attachment tab:

  1. Click the Add button. An XML Attachment entry displays in the Attachment table.
  2. Double-click the XML Attachment entry. An Edit Attachments dialog displays.
  3. In the Edit Attachments dialog, select either XML or Binary from the Mode drop-down menu.
  4. Configure the attachment:
    • The following option is available for XML Mode:
      • Views: Select the desired view from the drop-down menu and configure accordingly. Options are Literal XML, Form XML, Scripted XML, and Form Input.
    • The following options are available for Binary Mode:
      • Base 64 Encoding: Enables Base 64 Encoding to encode the binary value.
      • Data Source Column: Select to send values from a data source column.
      • File: Select to send values from a file. Choose the desired file by clicking the Browse button. Check the Persist as Relative Path option if you want the path to this file to be saved as a path that is relative to the current configuration file.
      • Text: Select to send a text value.
      • Content type: Specify the content type. Click the Edit Headers button if you want to add, modify, or delete attachment headers.

WS-Policy Options

The WS-Policy tab is used to keep track of which web services policy the tool is using. It also allows you to switch between policies and update the attached tools based on that policy. 

Update WS-Policy

  1. Enable the Constrain to policies defined in WSDL to enable controls for updating policy configurations.
  2. Click on the EndpointOperation, or Message tab and attach the new policies from your WSDL. The result will be the union of all the alternatives chosen for each subject.
  3. Click Update policy configuration to remove the current policy configuration and add the newly chosen policy configuration.

Misc Options

The following options are available in the Misc tab of the SOAP Client tool:

  • Notes: Attach additional information about the purpose for using the SOAP Client in this field.
  • Valid HTTP Response Codes: The conventional range of valid HTTP response codes is 200-299. You can choose Fixed from the drop-down menu and enter a specific response code, range of codes, or a comma-separated list of codes that indicate a valid HTTP response, e.g., 302 or 500-599. You can also choose Scripted from the drop-down menu to enter a script that programmatically specifies the valid HTTP response code(s). 
  • Timeout after (seconds): Specifies the length of delay (in seconds) after which your FTP, telnet, or HTTP requests should be timed out. The Default setting corresponds to the timeout set in the Preferences panel. The Custom setting allows you to enter a timeout. A non-positive timeout value can be entered to specify an infinite timeout.

    • Fail the test on Timeout: Select this option to fail the tool on the specified timeout.
    • Pass the test only if a Timeout occurred: Select this option to pass the tool if the specified timeout occurred (i.e. tool did not finish execution within the specified time).
  • Attachment Encapsulation Format: Specifies whether to use the Default or Custom encapsulation format. The Default option specifies whatever is chosen as the Attachment Encapsulation Format in the Misc tab of the system preferences (for more information, see SOAP Settings). The Custom option allows you to choose MIME, DIME, MTOMAlways, or MTOM Optional. For more details, see Working with Attachments.

  • SOAP Version: Select Custom from the drop-down menu and select either SOAP 1.1 or SOAP 1.2. The default value is SOAP 1.1.
  • Outgoing Message Encoding: Allows you to choose the encoding for outgoing messages. You can choose any Character Encoding you wish from the Preferences panel to read and write files, but the Outgoing Message Encoding provides additional flexibility so you can set a different charset encoding for the SOAP request from the global setting.
  • Style/Use: (Options are disabled if the Constrain request  to WSDL check box is selected in the WSDL tab) These options allow you to select the body style and encoding of the SOAP message:
    • Body Style: Select either document or rpc.
    • Use: Select either encoded or literal.
    • Encoding Style URI: (Automatically completed if available) Lists the encoding style URI used to send requests.
    • Target Object URI: Specifies the target object URI.

Related Tutorials

The following tutorial lessons demonstrate how to use this tool:

  • No labels