PHPackages                             viktorprogger/php-soap-interpreter - 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. [API Development](/categories/api)
4. /
5. viktorprogger/php-soap-interpreter

ActiveLibrary[API Development](/categories/api)

viktorprogger/php-soap-interpreter
==================================

A PHP library for interpreting SOAP messages.

1.0.2(9y ago)08MITPHPPHP &gt;=5.4.0

Since Feb 7Pushed 6y agoCompare

[ Source](https://github.com/viktorprogger/php-soap-interpreter)[ Packagist](https://packagist.org/packages/viktorprogger/php-soap-interpreter)[ RSS](/packages/viktorprogger-php-soap-interpreter/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

PHP SOAP Interpreter [![Build Status](https://camo.githubusercontent.com/c94f07c10f9bd25d8bed139701580fb307b78c0cf669539a0b87ca8b1fae82f0/68747470733a2f2f7472617669732d63692e6f72672f6d656e672d7469616e2f7068702d736f61702d696e7465727072657465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/meng-tian/php-soap-interpreter) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/12f42486ff4b09353a3b2eb1ae5bc7371af2216b583642ca259a71aa8bf7d709/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d656e672d7469616e2f7068702d736f61702d696e7465727072657465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/meng-tian/php-soap-interpreter/?branch=master) [![codecov.io](https://camo.githubusercontent.com/5e950ba980c89ac5a1af5963c9b4e194b371bf198625b2314f54cc7ea31e2e1c/68747470733a2f2f636f6465636f762e696f2f6769746875622f6d656e672d7469616e2f7068702d736f61702d696e7465727072657465722f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/meng-tian/php-soap-interpreter?branch=master)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#php-soap-interpreter---)

A PHP library for interpreting `SOAP 1.1` and `SOAP 1.2` messages. It can be used in WSDL or non-WSDL mode. The implementation is built on the top of PHP's [SoapClient](http://php.net/manual/en/class.soapclient.php).

### Requirement

[](#requirement)

PHP 5.4 --enablelibxml --enable-soap

### Install

[](#install)

```
composer require meng-tian/php-soap-interpreter

```

### Usage

[](#usage)

An `Interpreter` instance is capable of generating SOAP request messages and translating SOAP response messages. Constructor of `Interpreter` class is the same as `SoapClient`. The first parameter is `wsdl`, the second parameter is an array of `options`.

It should be noted that *not* all `options` supported by `SoapClient` are supported by `Interpreter`. The responsibility of `Interpreter` is to interpreting SOAP messages, whereas the unsupported options are related to debugging or HTTP transportation. The supported `options` by `Interpreter` are: `location`, `uri`, `style`, `use`, `soap_version`, `encoding`, `exceptions`, `classmap`, `typemap`, `cache_wsdl` and `feature`. More detailed explanations of those options can be found in [SoapClient::SoapClient](http://php.net/manual/en/soapclient.soapclient.php).

### Examples

[](#examples)

###### Generate SOAP request message in WSDL mode

[](#generate-soap-request-message-in-wsdl-mode)

```
$interpreter = new Interpreter('http://www.webservicex.net/length.asmx?WSDL');
$request = $interpreter->request(
    'ChangeLengthUnit',
    [['LengthValue'=>'1', 'fromLengthUnit'=>'Inches', 'toLengthUnit'=>'Meters']]
);

print_r($request->getSoapMessage());
```

Output:

```

1InchesMeters

```

###### Generate SOAP request message in non-WSDL mode

[](#generate-soap-request-message-in-non-wsdl-mode)

```
// In non-WSDL mode, location and uri must be provided as they are required by SoapClient.
$interpreter = new Interpreter(null, ['location'=>'http://www.webservicex.net/length.asmx', 'uri'=>'http://www.webserviceX.NET/']);
$request = $interpreter->request(
    'ChangeLengthUnit',
    [
        new SoapParam('1', 'ns1:LengthValue'),
        new SoapParam('Inches', 'ns1:fromLengthUnit'),
        new SoapParam('Meters', 'ns1:toLengthUnit')
    ],
    ['soapaction'=>'http://www.webserviceX.NET/ChangeLengthUnit']
);

print_r($request->getSoapMessage());
```

Output:

```

1InchesMeters

```

###### Translate SOAP response message

[](#translate-soap-response-message)

```
$interpreter = new Interpreter('http://www.webservicex.net/length.asmx?WSDL');
$response =  0.0254
)
*/
```

### Relevant

[](#relevant)

- [SOAP HTTP Binding](https://github.com/meng-tian/soap-http-binding): binding SOAP messages to PSR-7 HTTP messages.
- [PHP Asynchronous SOAP](https://github.com/meng-tian/php-async-soap): asynchronous SOAP clients.

### Credits

[](#credits)

Thanks the free SOAP web serivices hosted from . They are used for testing this library.

### License

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% 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 ~25 days

Total

5

Last Release

3649d ago

Major Versions

0.2.0 → 1.0.02016-02-26

### 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 (37 commits)")[![viktorprogger](https://avatars.githubusercontent.com/u/7670669?v=4)](https://github.com/viktorprogger "viktorprogger (2 commits)")

---

Tags

soap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/viktorprogger-php-soap-interpreter/health.svg)

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

###  Alternatives

[laminas/laminas-soap

6121.8M37](/packages/laminas-laminas-soap)[gusapi/gusapi

Gus Api Library for PHP

1351.5M8](/packages/gusapi-gusapi)[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[phpforce/soap-client

A PHP client for the Salesforce SOAP API

831.9M1](/packages/phpforce-soap-client)[afipsdk/afip.php

Libreria para usar los Web Services de AFIP (Argentina)

284121.2k5](/packages/afipsdk-afipphp)[besimple/soap-client

Build and consume SOAP Client based web services

582.2M14](/packages/besimple-soap-client)

PHPackages © 2026

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