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:
tworkbench C:\Users\myname\Desktop\CustomerQuery.dts /TA=BasicHttpBinding_CustomerService_CallContextValue_Company="SUSB" /RS
/TA=BasicHttpBinding_CustomerService_CallContextValue_Company=SUSB
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:
If you are modifying a connection that is not used in a DTS, click Connection.
The SOAP Header fields are listed under the expanded node. Example: BasicHttpBinding_CustomerService_CallContextValue_Company
Each field name may contain the following components:
The value appears in the Value field.
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.
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:
/TA=<soapheader>
BasicHttpBinding_CustomerService_CallContextValue_Company=DAT
Note: When you pass values via an Integration Process, do not use quotation marks.
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
Running A Job From The Command Line