How to create a custom Webform handler to submit to a SOAP API I have a Webform that when submitted needs to be posted to a SOAP web service. I have search for a bit of direction but I can't seem to find anything about SOAP and Drupal 8/Webform. Can anyone point me in the right direction to create a custom handler to submit to SOAP. 

I'm using Drupal 8.6.16 and Webform 8.x-5.2
In your custom module add a folder src/Plugin/WebformHandler and create a file Subscription.php. Add the following code:

&lt;?php
namespace Drupal\&lt;mycustommodule&gt;\Plugin\WebformHandler;

use Drupal\Core\Form\FormStateInterface;
use Drupal\webform\Plugin\WebformHandlerBase;
use Drupal\webform\webformSubmissionInterface;

/**
 * Form submission handler.
 *
 * @WebformHandler(
 *   id = "subscription",
 *   label = @Translation("Subscription"),
 *   category = @Translation("Form Handler"),
 *   description = @Translation("Administers subscriptions via SOAP"),
 *   cardinality = \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_SINGLE,
 *   results = \Drupal\webform\Plugin\WebformHandlerInterface::RESULTS_PROCESSED,
 * )
 */

class Subscription extends WebformHandlerBase {

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [];
  }

  const SOAP_URL = 'x'; // url of soap call here

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &amp;$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) {

    // The data to send to the API
    $values = $webform_submission-&gt;getData();
    $email = strtolower($values['e_mail']);
    $first_name = $values['first_name'];
    $last_name = $values['last_name'];

    // Add your SOAP Call here
    $client = new SoapClient(self::SOAP_URL);
    // .. Go on here
  }
}


Enable the module and clear cache. Now, in your webform backend, go to settings and then emails / handlers (/admin/structure/webform/manage//handlers). Add your handler here. For a little more detail and instructions, see: https://stefvanlooveren.me/blog/how-create-mailchimp-subscription-drupal-8-webform-module