PHPackages                             katalystsol/php-soap-client - 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. katalystsol/php-soap-client

ActiveLibrary

katalystsol/php-soap-client
===========================

A generic PHP SOAP Client

011PHP

Since Dec 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/katalystsol/php-soap-client)[ Packagist](https://packagist.org/packages/katalystsol/php-soap-client)[ RSS](/packages/katalystsol-php-soap-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-soap-client
===============

[](#php-soap-client)

A generic SOAP client

This was originally written as a SOAP Client in Laravel to access the HomeAway SOAP API. This is a work-in-progress to migrate that code to be a simple-to-use, generic SOAP client.

Goals
-----

[](#goals)

- Create a simple approach to interacting with a SOAP API
- Create a Class for each API endpoint method that only requires minimal data parameters for required and optional parameters.
- Have ability to support complex types / objects.
- Adhere as closely as possible to the Single Responsibility principle.
    - Each SOAP API endpoint/method will be its own Class, which configures the required parameters, optional parameters and/or complex types. It should only change if the SOAP API changes.

This package is compliant with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

Install
-------

[](#install)

Via Composer

```
$ composer require katalystsol/php-soap-client
```

Requirements
------------

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 5.6
- PHP 7.0
- PHP 7.1
- PHP 7.2
- PHP 7.3

It requires the following PHP extensions:

- JSON
- SimpleXML
- SOAP

Documentation
-------------

[](#documentation)

Constructive feedback is always welcome...

### Example Usage

[](#example-usage)

To use the class, you would:

1. Instantiate the client
2. Set up the parameters to pass to the method
3. Call the method to return the response

```
$wdsl = 'https://secure.instantsoftwareonline.com/StayUSA/ChannelPartners/wsWeblinkPlusAPI.asmx?WSDL';
$soapClientOptions = [
    'trace' => true,
];
$client = new SoapClientLogger(new \SoapClient($wdsl, $soapClientOptions));

$params = [
    'strUserId' => 'testUserId',
    'strPassword' => 'testPassword',
    'strCOID' => '1234',
];

$response = (new Consumer($client))->getBookingPolicies($params);
```

### Example SOAP Method class

[](#example-soap-method-class)

```
use Katalystsol\PhpSoapClient\ConsumerMethod;

class GetBookingPolicies extends ConsumerMethod
{
    protected $requiredParameters = [
        'strUserId',
        'strPassword',
        'strCOID',
    ];

    protected $optionalParameters = [
        'strProperty',
    ];
}
```

### Example Complex Type

[](#example-complex-type)

This would be a credit card class. It would also reference a separate complex type class "ClsAddress".

```
use Katalystsol\PhpSoapClient\ComplexType;

class ClsCreditCard extends ComplexType
{
    protected function setPropertyKeys()
    {
        $this->propertyKeys = [
            'strToken',
            'strCCType',
            'intExpMonth',
            'intExpYear',
            'strName',
            'objBillingAddress',
            'strEmail',
        ];
    }

    protected function setComplexTypes()
    {
        $this->complexTypes = [
            'objBillingAddress' => ClsAddress::class,
        ];
    }

    protected function setComplexTypeClassName()
    {
        $this->complexTypeClassName = get_class();
    }
}
```

- See the tests for more examples.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

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

### Community

---

Top Contributors

[![katalystsol](https://avatars.githubusercontent.com/u/1080447?v=4)](https://github.com/katalystsol "katalystsol (1 commits)")

---

Tags

phpsoap-apisoap-client

### Embed Badge

![Health badge](/badges/katalystsol-php-soap-client/health.svg)

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

PHPackages © 2026

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