If following the ws security the following additional

  • No School
  • AA 1
  • seeannloh
  • 64

This preview shows page 49 - 52 out of 64 pages.

If following the WS-Security the following additional Code Options are required: External References Microsoft.Web.Services3.dll Namespace Imports Microsoft.Web.Services3.Design Microsoft.Web.Services3.Messaging Microsoft.Web.Services3 Microsoft.Web.Services3.Security.Tokens
Image of page 49
Commercial in Confidence Page 50 of 64 2. Select the Global Code tab and click Check Code. If any errors are reported, these must be resolved before continuing. Setup the Global Code to use an Environment Variable for the URL To allow future modification of the web service URL, the constructor of the Service1 class is going to be modified to use the value specified in a Blue Prism Environment Variable. 1. Within the Global Code of the Business Object, at the top of the existing code, add a member variable: VB.NET Private mWebService As Service1 C# private Service1 mWebService; 2. Locate the Service1 class constructor within the code and add a URL string parameter. Typically located by searching for: VB.NET Public Sub New () The modified constructor should resemble the following: Public Sub New(ByVal url As String) MyBase.New() Me.Url = url End Sub C# public Service1() The modified constructor should resemble the following: public Service1(string url) : base() { this.Url = url; } 3. Select Process Area > Environment Variables and create a new environment variable using the Blue Prism System Manager. 4. Click the add variable link and give the environment variable a name, a type of text, and the value of the URL as it appeared in the code originally. 5. Within the initialize page of the Business Object create a data item that uses the newly created environment variable. The name of the data item must exactly match the name of the environment variable. 6. Choose environment variable from the exposure type drop down within the data item properties. 7. Within the Initialise page, add a code stage with a single input called 'Url' of type text, which will be populated using a Blue Prism environment variable. The code to be added to this code stage is: VB.NET mWebService = New Service1(Url) C# mWebService = new Service1(Url); The code stage should be linked to the start and end stages of the initialize page.
Image of page 50
Commercial in Confidence Page 51 of 64 Generate a Wrapper Code Stage In order to allow Blue Prism processes to use the web service a code stage wrapper is required. This will involve creating a new Action within the Business Object. Writing wrapper code stages requires bespoke implementation and is dependent on the action of the web service that needs to be invoked. This section provides an overview of what needs to be achieved, but the examples will need to be modified to meet the specific requirements of the web service action. The actions required to generate the wrapper code stage include: 1. Create a new Action page within the Business Object 2. Define the appropriate input and output parameters for the object Action based on those required for the web service action.
Image of page 51
Image of page 52

You've reached the end of your free preview.

Want to read all 64 pages?

  • Fall '19
  • Blue Prism Web Services

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture