PHPackages                             meng-tian/soap-http-binding - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. meng-tian/soap-http-binding

ActiveLibrary[HTTP &amp; Networking](/categories/http)

meng-tian/soap-http-binding
===========================

A PHP library for binding SOAP messages to PSR-7 HTTP messages.

0.4.1(3y ago)162.5M—1.9%12[1 PRs](https://github.com/meng-tian/soap-http-binding/pulls)4MITPHPPHP &gt;=7.1.0CI failing

Since Feb 29Pushed 3y ago2 watchersCompare

[ Source](https://github.com/meng-tian/soap-http-binding)[ Packagist](https://packagist.org/packages/meng-tian/soap-http-binding)[ RSS](/packages/meng-tian-soap-http-binding/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (4)

SOAP HTTP Binding [![codecov.io](https://camo.githubusercontent.com/dcd96fa3db6010692ece5cb0be7201358fd6828458c2b8cf3ea6b7f6f554e28f/68747470733a2f2f636f6465636f762e696f2f6769746875622f6d656e672d7469616e2f736f61702d687474702d62696e64696e672f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/meng-tian/soap-http-binding?branch=master) [![workflow](https://github.com/meng-tian/soap-http-binding/actions/workflows/main.yaml/badge.svg)](https://github.com/meng-tian/soap-http-binding/actions/workflows/main.yaml/badge.svg)
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#soap-http-binding--)

This library binds `SOAP 1.1` and `SOAP 1.2` messages to PSR-7 HTTP messages.

Requirement
-----------

[](#requirement)

PHP 7.1

Install
-------

[](#install)

```
composer require meng-tian/soap-http-binding

```

Usage
-----

[](#usage)

`HttpBinding::request` embeds SOAP reqeust messages into PSR-7 HTTP requests.

```
use Meng\Soap\HttpBinding\HttpBinding;
use Meng\Soap\HttpBinding\RequestBuilder;
use Meng\Soap\Interpreter;
use Laminas\Diactoros\RequestFactory;
use Laminas\Diactoros\StreamFactory;

$interpreter = new Interpreter('http://www.webservicex.net/airport.asmx?WSDL');
$streamFactory = new StreamFactory();
$requestFactory = new RequestFactory();
$builder = new RequestBuilder($streamFactory, $requestFactory);
$httpBinding = new HttpBinding($interpreter, $builder, $streamFactory);

$request = $httpBinding->request('GetAirportInformationByCountry', [['country' => 'United Kingdom']]);
echo \Laminas\Diactoros\Request\Serializer::toString($request);
```

Output:

```
POST /airport.asmx HTTP/1.1
Content-Length: 322
SOAPAction: http://www.webserviceX.NET/GetAirportInformationByCountry
Content-Type: text/xml; charset="utf-8"
Host: www.webservicex.net

United Kingdom

```

`HttpBinding::response` retrieves SOAP response messages from PSR-7 HTTP responses:

```
use Meng\Soap\HttpBinding\HttpBinding;
use Meng\Soap\HttpBinding\RequestBuilder;
use Meng\Soap\Interpreter;
use Laminas\Diactoros\Response;
use Laminas\Diactoros\Stream;
use Laminas\Diactoros\RequestFactory;
use Laminas\Diactoros\StreamFactory;

$response =  'text/xml; charset=utf-8']);

$interpreter = new Interpreter('http://www.webservicex.net/airport.asmx?WSDL');
$streamFactory = new StreamFactory();
$requestFactory = new RequestFactory();
$builder = new RequestBuilder($streamFactory, $requestFactory);
$httpBinding = new HttpBinding($interpreter, $builder, $streamFactory);
$response = $httpBinding->response($response, 'GetAirportInformationByCountry');

print_r($response);
```

Output:

```
stdClass Object
(
    [GetAirportInformationByCountryResult] => some result
)

```

This library also support `SOAP 1.2` HTTP GET binding through `RequestBuilder` class :

```
use Meng\Soap\HttpBinding\RequestBuilder;
use Laminas\Diactoros\RequestFactory;
use Laminas\Diactoros\StreamFactory;

$streamFactory = new StreamFactory();
$requestFactory = new RequestFactory();
$builder = new RequestBuilder($streamFactory, $requestFactory);
$request = $builder->isSOAP12()
    ->setEndpoint('http://www.endpoint.com')
    ->setHttpMethod('GET')
    ->getSoapHttpRequest();
echo \Laminas\Diactoros\Request\Serializer::toString($request);
```

Output:

```
GET / HTTP/1.1
Accept: application/soap+xml
Host: www.endpoint.com

```

License
-------

[](#license)

This library is released under [MIT](https://github.com/meng-tian/soap-http-binding/blob/master/LICENSE) license.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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

Every ~245 days

Recently: every ~593 days

Total

11

Last Release

1274d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.4.0

0.3.0PHP &gt;=5.6.0

0.4.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c250a32e9aa4cc18178efc26b28d5a542033110d5630733380087aadf5d8e4ee?d=identicon)[meng-tian](/maintainers/meng-tian)

---

Top Contributors

[![realmtian](https://avatars.githubusercontent.com/u/4396851?v=4)](https://github.com/realmtian "realmtian (42 commits)")[![andrewtweber](https://avatars.githubusercontent.com/u/2760420?v=4)](https://github.com/andrewtweber "andrewtweber (2 commits)")

---

Tags

httpphpsoaphttppsr-7soap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/meng-tian-soap-http-binding/health.svg)

```
[![Health](https://phpackages.com/badges/meng-tian-soap-http-binding/health.svg)](https://phpackages.com/packages/meng-tian-soap-http-binding)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[http-interop/http-factory-guzzle

An HTTP Factory using Guzzle PSR7

581167.2M519](/packages/http-interop-http-factory-guzzle)[laminas/laminas-diactoros

PSR HTTP Message implementations

548105.8M965](/packages/laminas-laminas-diactoros)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

586.6M81](/packages/laminas-laminas-stratigility)

PHPackages © 2026

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