Configure a Web service activity
Use the following procedure to configure a Web service activity.
-
Add an activity to the map.
By default, the Configuration tab is open in the properties panel of the activity.
- Change the default Name of the activity to something meaningful.
- On the Type list, select .
-
Click
Configure for
Parameters. The
Configure web service activity dialog box is displayed.
A list of associated parameters appears.
-
If a web service call contains classes within classes, all available levels of classes appear.
-
If the classes are recursive, only three levels of classes appear.
-
If a web service call contains arrays within arrays, all available levels of arrays appear.
-
-
On the
Web service list, select the Web service.
You can whitelist a web service reference. If the "Allow all" system setting is clear (System>System settings>Whitelist), in the system settings is cleared, you can only use the whitelisted web service references. See Configure the server URLs and database connection strings.
The associated class and method of the Web service are populated in the Class and Method list.
- Map variables to the parameters using dynamic or static values. For more information see Web service activity mapping parameters.
- Click OK.
- Save the process map.
- Configure other properties for this activity. See Activity properties.
Additional information
When executing a Web service activity, a web service proxy is generated for the web service WSDL, and if an array of a complex type includes an element that is also an array of a complex type and for which only one element exists, errors may occur: For example:
- Unable to generate a temporary class (result=1).
- Error CS0029: Cannot implicitly convert type 'CustomTypeXXX' to 'CustomTypeXXX[]'
- Error CS0030: Cannot implicitly convert type 'CustomTypeXXX[]' to 'CustomTypeXXX'
Use either workaround to resolve these issues:
- Change the data type in the desired WSDL so that a second, optional element
is included in the definition. You can add the following element:
<xs:element min0ccurs="0" name="dummyElement"nillable="true"type="xs"string"/>
- Change the complex type in the desired WSDL so that the boundary attributes are part of the complex type instead of part of the element. That is, you can move the minOccurs and maxOccurs attributes to the complex type and then remove them from the element.
See also: Create a Web service reference.