Call a Method from a WCF Service

To call a method from a Windows Communication Foundation (WCF) service, do the procedure in this topic.

Figure: WCF Configuration screen

WCF Configuration screen

Video: Show Data from a Web Service on an eForm

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.

  • 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?

  • Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, in the Activity Library, open the Web Services Web Services icon tab.
      2. On the Web Services Web Services icon tab, drag the WCF WCF icon activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.
  3. On the WCF Configuration screen, click WCF Configuration WCF Configuration icon.

Procedure

  1. 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 Add Token Add Token icon. For more information, refer to Access Token for WCF Service.

  2. In the Service Operation list, select your web method.
  3. To connect the request data from your schema to the source system, complete this field as necessary:
    Field Name Definition

    Request Mapping

    Function:
    Connects the WCF service request to your schema. This is mandatory only if the request passes data from the process schema to parameters in the service operation.
    To Open this Field:
    1. On the WCF Configuration screen, click the Request tab. You can not map the schema if the WCF service type is None.
    Accepted Values:
    Click the Schema Mapping Schema Mapping icon button to open the Schema Mapper.

    Use this screen to connect the request to the data model for your process.

    Default Value:
    None
    Example:
    Refer to:
    Limitations:

    Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

  4. 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

      Function:
      Specifies if the WCF service response connects to your schema.
      To Open this Field:
      1. On the WCF Configuration screen, click the Response tab. You can not map the schema if the WCF service type is None.
      Accepted Values:
      Click the Schema Mapping Schema Mapping icon button to open the Schema Mapper.

      Use this screen to connect the response to the data model for your process.

      Default Value:
      None
      Example:
      Refer to:
      Limitations:

      Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

    • To connect the response to a process data variable, complete this field as necessary:
      Field Name Definition

      Store the Response in Custom Attribute

      Function:
      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:
      1. On the WSE Configuration screen, click the Response tab. You can not map the schema if the web service type is None.
      Accepted Values:
      A process data variable.
      Default Value:
      None
      Accepts Process Data Variables:
      Yes
      Limitations:

      Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?