PHPackages                             php-soap-backports/ext-soap-engine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-soap-backports/ext-soap-engine

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-soap-backports/ext-soap-engine
==================================

An ext-soap engine implementation back-porting to PHP 7.1

v1.4.0(3y ago)02.8kMITPHPPHP &gt;=7.1

Since Dec 20Pushed 3y agoCompare

[ Source](https://github.com/php-soap-backports/ext-soap-engine)[ Packagist](https://packagist.org/packages/php-soap-backports/ext-soap-engine)[ Fund](https://opencollective.com/php-soap-backports)[ RSS](/packages/php-soap-backports-ext-soap-engine/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Ext-SOAP powered SOAP engine
============================

[](#ext-soap-powered-soap-engine)

This package is a [SOAP engine backport](https://github.com/php-soap-backport/engine) that leverages the built-in functions from PHP's `ext-soap` extension compatible for php 7.1.

It basically flips the `SoapClient` inside out: All the built-in functions for encoding, decoding and HTTP transport can be used in a standalone way.

If your package contains a `SoapClient`, you might consider using this package as an alternative:

- It gives you full control over the HTTP layer.
- It validates the `$options` you pass to the `SoapClient` and gives you meaningful errors.
- It transforms the types and methods into real objects so that you can actually use that information.
- It makes it possible to use the encoding / decoding logic without doing any SOAP calls to a server.
- ...

Want to help out? 💚
===================

[](#want-to-help-out-)

- [Become a Sponsor of Project author](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#sponsor)
- [Become a Sponsor of Backport author](https://github.com/php-soap-backports/.github/blob/main/HELPING_OUT.md#sponsor)
- [Contribute to project](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#contribute)
- [Contribute to backport project](https://github.com/php-soap-backports/.github/blob/main/HELPING_OUT.md#contribute)

Installation
============

[](#installation)

```
composer install php-soap-backports/ext-soap-engine
```

Example usage:
--------------

[](#example-usage)

This example contains an advanced setup for creating a flexible ext-soap based engine. It shows you the main components that you can use for configuring PHP's `SoapClient` and to transform it into a SOAP engine:

```
use Soap\Engine\SimpleEngine;
use Soap\ExtSoapEngine\AbusedClient;
use Soap\ExtSoapEngine\Configuration\ClassMap\ClassMapCollection;
use Soap\ExtSoapEngine\Configuration\TypeConverter\TypeConverterCollection;
use Soap\ExtSoapEngine\ExtSoapDriver;
use Soap\ExtSoapEngine\ExtSoapOptions;
use Soap\ExtSoapEngine\Transport\ExtSoapClientTransport;
use Soap\ExtSoapEngine\Transport\TraceableTransport;

$engine = new SimpleEngine(
    ExtSoapDriver::createFromClient(
        $client = AbusedClient::createFromOptions(
            ExtSoapOptions::defaults($wsdl, [
                'soap_version' => SOAP_1_2,
            ])
                ->disableWsdlCache()
                ->withClassMap(new ClassMapCollection())
                ->withTypeMap(new TypeConverterCollection())
        )
    ),
    $transport = new TraceableTransport(
        $client,
        new ExtSoapClientTransport($client)
    )
);
```

Fetching a SOAP Resource:

```
$result = $engine->request('SomeMethod', [(object)['param1' => true]]);

// Collecting last soap call:
var_dump($transport->collectLastRequestInfo());
```

You can still set advanced configuration on the actual SOAP client:

```
$client->__setLocation(...);
$client->__setSoapHeaders(...);
$client->__setCookie(...);
```

Reading / Parsing metadata

```
var_dump(
    $engine->getMetadata()->getMethods(),
    $engine->getMetadata()->getTypes()
);

$methodInfo = $engine->getMetadata()->getMethods()->fetchByName('SomeMethod');
```

Engine
------

[](#engine)

This package provides following engine components:

- **ExtSoapEncoder:** Uses PHP's `SoapClient` in order to encode a mixed request body into a SOAP request.
- **ExtSoapDecoder:** Uses PHP's `SoapClient` in order to decode a SOAP Response into mixed data.
- **ExtSoapMetadata:** Parses the methods and types from PHP's `SoapClient` into something more usable.
- **ExtSoapDriver:** Combines the ext-soap encoder, decoder and metadata tools into a usable `ext-soap` preset.

### Transports

[](#transports)

- **ExtSoapClientTransport:** Uses PHP's `SoapClient` to handle SOAP requests.
- **ExtSoapServerTransport:** Uses PHP's `SoapServer` to handle SOAP requests. It can e.g. be used during Unit tests.
- **TraceableTransport:** Can be used to decorate another transport and keeps track of the last request and response. It should be used as an alternative for fetching it on the SoapClient.

Configuration options
---------------------

[](#configuration-options)

### ExtSoapOptions

[](#extsoapoptions)

This package provides a little wrapper around all available `\SoapClient` [options](https://www.php.net/manual/en/soapclient.construct.php). It provides sensible default options. If you want to set specific options, you can do so in a sane way: It will validate the options before they are passed to the `\SoapClient`. This way, you'll spend less time browsing the official PHP documentation.

### ClassMap

[](#classmap)

By providing a class map, you let `ext-soap` know how data of specific SOAP types can be converted to actual classes.

**Usage:**

```
use Soap\ExtSoapEngine\Configuration\ClassMap\ClassMap;
use Soap\ExtSoapEngine\ExtSoapOptions;

$options = ExtSoapOptions::defaults($wsdl);
$classmap = $options->getClassMap();
$classmap->set(new ClassMap('WsdlType', 'PhpClassName'));
```

### TypeConverter

[](#typeconverter)

Some exotic XSD types are hard to transform to PHP objects. A typical example are dates: some people like it as a timestamp, some want it as a DateTime, ... By adding custom TypeConverters, it is possible to convert a WSDL type to / from a PHP type.

These TypeConverters are added by default:

- DateTimeTypeConverter
- DateTypeConverter
- DoubleTypeConverter
- DecimalTypeConverter

You can also create your own converter by implementing the `TypeConverterInterface`.

**Usage:**

```
use Soap\ExtSoapEngine\Configuration\TypeConverter;
use Soap\ExtSoapEngine\ExtSoapOptions;

$options = ExtSoapOptions::defaults($wsdl);
$typemap = $options->getTypeMap();
$typemap->add(new TypeCOnverter\DateTimeTypeConverter());
$typemap->add(new TypeConverter\DecimalTypeConverter());
$typemap->add(new TypeConverter\DoubleTypeConverter());
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1286d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16020878?v=4)[Artem Vasilev](/maintainers/kernusr)[@kernusr](https://github.com/kernusr)

---

Top Contributors

[![kernusr](https://avatars.githubusercontent.com/u/16020878?v=4)](https://github.com/kernusr "kernusr (47 commits)")[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (42 commits)")[![pableu](https://avatars.githubusercontent.com/u/305859?v=4)](https://github.com/pableu "pableu (1 commits)")[![wannevancamp](https://avatars.githubusercontent.com/u/3399877?v=4)](https://github.com/wannevancamp "wannevancamp (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-soap-backports-ext-soap-engine/health.svg)

```
[![Health](https://phpackages.com/badges/php-soap-backports-ext-soap-engine/health.svg)](https://phpackages.com/packages/php-soap-backports-ext-soap-engine)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[symfony/rate-limiter

Provides a Token Bucket implementation to rate limit input and output in your application

27054.3M290](/packages/symfony-rate-limiter)[symfony/ldap

Provides a LDAP client for PHP on top of PHP's ldap extension

1408.1M59](/packages/symfony-ldap)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19346.6k3](/packages/symfony-ux-cropperjs)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.5M12](/packages/php-soap-ext-soap-engine)[symfony/ux-toggle-password

Toggle visibility of password inputs for Symfony Forms

27600.4k5](/packages/symfony-ux-toggle-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
