Working with SOAP

This recipe focuses on the interaction between Orchestrator and a SOAP-based server. We will learn how to add a SOAP host to Orchestrator and execute SOAP operations.

Getting ready

We need a host that can present SOAP operations for Orchestrator to use. If you don't have a SOAP host that you can access, you can follow our example.

Orchestrator's SOAP API has been retired and is not available anymore.

To add a SOAP-based service to the Orchestrator host, we need its WSDL address.

For our example, we will use http://www.webservicex.net to test our SOAP plugin. The WSDL we will use is http://www.webservicex.net/globalweather.asmx?WSDL .

How to do it...

Again, this recipe is split into different parts.

Adding a new SOAP client

Before we can execute any SOAP operations, we need to add the SOAP interface of a host to Orchestrator:

  1. Open the Orchestrator Client and switch to Design mode.
  2. Make sure that you have imported the SSL certificate of the SOAP host (refer to the Important Orchestrator settings recipe in Chapter 1, Installing and Configuring Orchestrator).
  3. Start the workflow by navigating to Library | SOAP | Configuration | Add a SOAP host.
  4. Choose the name you want to save this SOAP host under.
  5. Enter the WSDL address, click Next.
  6. If you need to use a proxy to connect to the internet then fill it in now, or else click on Next.
  7. Choose None for Authentication type and click Next. The authentication method depends on the type of server and can be very different.
  8. For the Session mode, you won't have to choose anything as we choose no authentication. If you choose another SOAP service, you need to decide between using a Shared Session or Per User Session.
  9. Click on Submit to finalize.

Now we have access to all SOAP operations that are exposed:

Adding a new SOAP client

Invoking a SOAP request

We will now test out a SOAP request:

  1. Open the Orchestrator Client and run the workflow by navigating to Library | SOAP | Invoke a SOAP operation.
  2. Click on Operation and then select from the inventory an operation, such as GetCitiesByCountry.
  3. Click on Next and then replace the parameter1 with a state, such as Germany.
  4. Click on Submit. When the workflow has finished, check out the logs:

    Invoking a SOAP request

Generating a new SOAP workflow

To invoke a SOAP operation, we will create a new workflow:

  1. Open the Orchestrator Client and run the workflow by navigating to Library | SOAP | Generate a new workflow from a SOAP operation.
  2. Click on Operation and select a workflow, such as GetWeather. Click on Next.
  3. Choose a name for the new workflow as well as a folder where the new workflow should be located.
  4. As the format, you can just use the default.
  5. After clicking on Submit, a new workflow will be created in the folder you specified. The in-parameters and out-parameters for the workflow are aligned to the inputs and outputs of the SOAP operation.
  6. You can now run this workflow. The workflow will invoke the SOAP operation on the SOAP host. The return values will be returned in properties.

How it works...

SOAP (Simple Object Access Protocol) is a common way to access automation or scripting services via a network. A SOAP service advertises what scripts can be run on the SOAP host and what variables are needed to run it on its WSDL interface.

We used the Digest authentication, which provides an encrypted authentication. The other authentication types are basic (no encryption) and NTLM. NTLM (NT LAN Manager) provides encryption using the Window Security Support Provider (SSPI) framework. If you want to use NTLM, the SOAP host you're connecting to must be able to understand and use it (this is not the case with Orchestrator). Additionally, you also need to provide additional information in the configuration workflow. You need to specify the NTLM domain and, additionally, maybe a NTLM workstation.

If your Orchestrator is SSO-configured, we have to use shared sessions, as we already discussed in the Working with PowerShell recipe.

A typical SOAP-Orchestrator integration is with Microsoft SCOM or SCVMM.

Most generated workflows require a bit of aftercare. A typical example is that a password is handled as a string not a SecureString. Refer to the How it works... section in the Working with PowerShell recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset