SOAP Headers

The Adapter for Web Services supports populating SOAP header values either statically or dynamically:

For example, if the SOAP Header field, BasicHttpBinding_CustomerService_CallContextValue_Company, is set to the value CEU, you can change that value to SUSB by doing one of the following:

Set Static SOAP Header Field values In The Edit Web Service Dialog Box

SOAP headers are associated with Web Service connections. If there is no Web Service connection, you must create one before you can define a SOAP header field.

To set a static value for a SOAP header field:

  1. In the Scribe Workbench, click View > Connections. The Connection Manager dialog box appears.
  2. Select the Web Service connection and click Edit. The Connection Settings dialog box appears.
  3. Click the Connection tab.
  4. Click Change Connection. The Connection Information dialog box appears.

    If you are modifying a connection that is not used in a DTS, click Connection.

  5. Verify Web Services is selected and click OK. The Web Service Connection Manager dialog box appears.
  6. Select the Web Service you want to edit and click Edit. The Edit Web Service dialog box appears.
  7. Click the Configuration tab.
  8. Expand the SOAP Headers node.

    The SOAP Header fields are listed under the expanded node. Example: BasicHttpBinding_CustomerService_CallContextValue_Company

    Each field name may contain the following components:

  9. Select the field whose value you want to set.

    The value appears in the Value field.

    Edit Web Service: Configuration tab

  10. Enter a value for this field in the Value text box.
  11. Click Save. You return to the Web Service Connection Manager dialog box.
  12. Click Close. You return to the Connection Information dialog box.
  13. Click Cancel. You return to the Connection Manager.
  14. If a Scribe Online message that the connection information has changed, do one of the following:
  15. Click Close.

Dynamically Set a SOAP Header From the command line

For Source or Target Web Service Connections, you can run Insight jobs from the command line using the /SA and /TA command line switches to specify the name of the SOAP Header.

Note: Command line switches are not supported for multiple targets. To use a target-related switch, you must define a connection named TARGET, otherwise the DTS does not run and an error message appears. Source-related switches are applied to the source connection as defined in the Connection Manager.

To dynamically set a SOAP header field from the command line, specify one of the following on the command line, replacing <soapheader> with the name of the SOAP header for this connection:

For more information about running a job from the command line and the command line switches, see the Command Line Switches topic in the Scribe Insight Help.

Dynamically Set a SOAP Header With An Integration Process

For Insight version 7.6.1 and later, the Scribe Adapter for Web Services enables you to pass a value, such as the Dynamics AX Company ID, into a SOAP Header. Instead of using the default Company assigned to the Web Service connection, you can use this feature with an Integration Process to dynamically set the company to which you want to connect.

When creating an IP for source or target Web Service connections, you can also specify these switches with %XPath in the DTS Parameter setting of the Integration Process.

For this example, we are using a Dynamics AX Web Service target connection. However, this feature is available for any Web Service source or target. Let’s say you have an Integration Process using a Dynamics AX Web Service Target Connection; you can use the Insight /TA command line switch with %XPath to specify the name of the SOAP Header to pass in, as follows.

To dynamically set a SOAP header value with an IP:

  1. When setting up Step 1 of an Integration Process, in the DTS parameters field, specify the following, where <soapheader> is the name of the SOAP header for this connection:

    /TA=<soapheader>

  2. To override the static company value in the Integration Process, enter the appropriate DTS parameter. For example, to change the Company ID from CEU to DAT:

    BasicHttpBinding_CustomerService_CallContextValue_Company=DAT

    Note: When you pass values via an Integration Process, do not use quotation marks.

  3. To dynamically change target companies, use the /TA parameter and %XPath functionality with a Source Connection that generates an XML Source Message with a field containing the Dynamics AX Company ID.

    For example, if a Dynamics CRM custom field, new_CompanyName, contains the Dynamics AX Company Name, specify the following DTS parameter on your Integration Process to set the company name:

    /TA=BasicHttpBinding_CustomerService_CallContextValue_Company=%XPath=//account/new_CompanyName

See Also

Creating a Web Service connection

Default values

Web Service variables

Running A Job From The Command Line

Command Line Switches