The Invoke Web Service Activity is provided if more control and flexibility is needed than what is possible using the Call Web Service Directly Activity; which is an easier and simpler method of calling a web service. Before the Invoke Web Service Activity can be used a reference to the web service must be ’added’ in to VSTA by right clicking over a project reference folder and selecting Add Web Reference…. The following window should appear:
Once the required URL has been entered, the available web services will be visible in the box to the right. After naming the web reference, click Add Reference to register the service to the VSTA project. The web service can now be used from the workflow.
|NOTE Once a reference to the web service has been added to the VSTA project it is possible, and may suit requirements, to use a CodeActivity to call the web service.|
The following window, will show when you drop the Invoke Web Service Activity into the workflow. The window can also be accessed from the URL property by clicking the … button:
The web service class you named in VSTA should be in the drop down list. Once selected, the URL will be chosen automatically.
Set the MethodName property to the desired web service method, and if needed set the Invoked and Invoking handler methods. The Invoking method is called before the web service call, and the Invokedmethod after the call.