PHPackages                             viktorprogger/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. viktorprogger/soap-http-binding

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

viktorprogger/soap-http-binding
===============================

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

0.2.3(9y ago)07MITPHPPHP &gt;=5.4.0

Since Feb 29Pushed 6y agoCompare

[ Source](https://github.com/viktorprogger/soap-http-binding)[ Packagist](https://packagist.org/packages/viktorprogger/soap-http-binding)[ RSS](/packages/viktorprogger-soap-http-binding/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (8)Used By (0)

SOAP HTTP Binding [![Build Status](https://camo.githubusercontent.com/971a1356e08e575da8bf3359c0348b13275b5d9f0f047655e7737b6b28b45f4f/68747470733a2f2f7472617669732d63692e6f72672f6d656e672d7469616e2f736f61702d687474702d62696e64696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/meng-tian/soap-http-binding) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/511dc8c0dae6c850dc4ae6d0000eda75c4a920046ce2574ce4627dfca73606cb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d656e672d7469616e2f736f61702d687474702d62696e64696e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/meng-tian/soap-http-binding/?branch=master) [![codecov.io](https://camo.githubusercontent.com/dcd96fa3db6010692ece5cb0be7201358fd6828458c2b8cf3ea6b7f6f554e28f/68747470733a2f2f636f6465636f762e696f2f6769746875622f6d656e672d7469616e2f736f61702d687474702d62696e64696e672f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/meng-tian/soap-http-binding?branch=master)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

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

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

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

[](#requirement)

PHP 5.4

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;

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

$request = $httpBinding->request('GetAirportInformationByCountry', [['country' => 'United Kingdom']]);
echo \Zend\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 Zend\Diactoros\Response;
use Zend\Diactoros\Stream;

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

$interpreter = new Interpreter('http://www.webservicex.net/airport.asmx?WSDL');
$builder = new RequestBuilder();
$httpBinding = new HttpBinding($interpreter, $builder);
$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;

$builder = new RequestBuilder();
$request = $builder->isSOAP12()
    ->setEndpoint('http://www.endpoint.com')
    ->setHttpMethod('GET')
    ->getSoapHttpRequest();
echo \Zend\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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.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

Every ~13 days

Recently: every ~8 days

Total

7

Last Release

3641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10acad9038a7b3af2d70f9404bdd4e377bbeb4214277a7cf61ae6fe9884988e6?d=identicon)[miolae](/maintainers/miolae)

---

Top Contributors

[![realmtian](https://avatars.githubusercontent.com/u/4396851?v=4)](https://github.com/realmtian "realmtian (31 commits)")[![viktorprogger](https://avatars.githubusercontent.com/u/7670669?v=4)](https://github.com/viktorprogger "viktorprogger (4 commits)")

---

Tags

httppsr-7soap

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k296.6M806](/packages/symfony-psr-http-message-bridge)[php-http/message

HTTP Message related tools

1.3k263.9M678](/packages/php-http-message)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)

PHPackages © 2026

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