Call a Method from a WCF Service
To call a method from a Windows Communication Foundation (WCF) service, do the procedure in this topic.
Prerequisites
- A valid WCF Service.
Good to Know
- In some cases, the type of the object instance returned by a web method may need to implement the IConvertible interface in order for the web method to be used with the Web Service activity.
- Limitations
These technical limitations apply to Web Service and WCF support in process activities and lookups:
- Arrays of primitive data types.
Arrays of primitive data types — for example, string, Boolean, integer, decimal — are not supported as input or output data types because this interferes with the deserialization of the array object.
However this does work with an array of complex classes and custom classes or a list of primitive data types.
If you have a service that returns an array of primitive data types, these workarounds are suggested:
- Return a list objects instead of arrays — for example, List<string>, instead of string[]
- Create a custom class that encapsulates that property — for example, a class that has a property of type string.
- If you do not have control over the service, you can write a wrapper service that encapsulates the call to the underlying service and converts the array to a list object, or create a custom class that encapsulates that property.
- Dictionary objects.
Dictionary objects are not supported as input or output data type because XMLSerializer interferes with the deserialization of the dictionary object.
- Circular references.
Circular references are not supported in input and output objects — for example, if a class called Person contains a field of type Person that references the same class. Such a circular structure cannot be loaded in the XML Mapper.
- Nested WSDLs.
Web services with nested WSDLs are not supported. Consider making your service use single WSDL, or use the .Net Proxy activity.
- Arrays of primitive data types.
- In most text fields, you can use process data variables as an alternative to literal data values.
- You can configure whether this activity waits for other activities before it runs.
For more information, refer to How Do I Configure an Activity to Wait for Other Incoming Activities?
How to Start
- Open Process Builder.
For information about how to open this screen, refer to Process Builder.
- Do one of these:
- On the WCF Configuration screen, click WCF Configuration .
Procedure
- On the WCF Configuration screen, in the WCF Service field,
select the access token of the WCF service.
To create a new access token, click Create . For more information, refer to Access Token for WCF Service.
- In the Service Operation list, select your web method.
- To connect the request data from your process schema to the source system, complete this field
as necessary:
Field Name Definition Request Mapping
- Description:
- Connects the WCF service request to your process schema. This is mandatory only if the request passes data from the process schema to parameters in the service operation.
- To Open this Field:
-
- On the WCF Configuration screen, click the Request tab. You can not map the schema if the WCF service type is None.
- Allowed Values:
- Click the Schema Mapping button to open the
Schema Mapper screen.
Use this screen to connect the request to the data model for your process.
- Default Value:
- None
- Example:
- Refer to:
- To connect response data from the
WCF call to your
process,
do one of these.
- To connect the response to your process schema, complete this field
as necessary:
Field Name Definition Map Response to AgilePoint Schema
- Description:
- Specifies if the WCF service response connects to your process schema.
- To Open this Field:
-
- On the WCF Configuration screen, click the Response tab. You can not map the schema if the WCF service type is None.
- Allowed Values:
- Click the Schema Mapping button to open the
Schema Mapper screen.
Use this screen to connect the response to the data model for your process.
- Default Value:
- None
- Example:
- Refer to:
- To connect the response to a process data variable, complete this field
as necessary:
Field Name Definition Store the Response in Custom Attribute
- Description:
- Specifies the name of the process data variable that stores the response to a method call. The call must be a web service, Web Service Extension, WCF service, or web application.
- To Open this Field:
-
- On the WSE Configuration screen, click the Response tab. You can not map the schema if the web service type is None.
- Allowed Values:
- A process data variable.
- Default Value:
- None
- Accepts Variables:
- Yes
- Limitations:
-
- To connect the response to your process schema, complete this field
as necessary: