PHPackages                             codebach/soap - 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. codebach/soap

ActiveLibrary[API Development](/categories/api)

codebach/soap
=============

Build and consume SOAP and WSDL based web services

v1.0(8y ago)04MITPHPPHP &gt;=5.3.0

Since Aug 9Pushed 8y ago1 watchersCompare

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

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

Extended Version of BeSimpleSoap
================================

[](#extended-version-of-besimplesoap)

Here you go, soap lovers. A lot of new features are extended to BesimpleSoap.

### New Features (Configurations)

[](#new-features-configurations)

#### SoapClient

[](#soapclient)

- Loading wsdl locally and using different url to make request (not to local wsdl file)
- Basic Http Authentication Support

#### SoapServer

[](#soapserver)

- Document-Wrapped support
- Configurable wsdl definition name attribute
- Ws Security with signing the response
- Multiple namespace support

### Installation

[](#installation)

Tell composer to install

```
composer require codebach/soap
```

### Usage

[](#usage)

Example full configuration:

```
be_simple_soap:
    clients:
        # Wsdl file and request url same place (Basic Usage)
        FooService:
            wsdl: wsdl_service_url

        # Wsdl file and request url different place
        BarService:
            wsdl: wsdl_file_to_load
            request_url:  url_to_make_soap_requests
            basic_http_auth:
                login: login
                password: password

    services:
        # Single Namespace (Basic Usage)
        FooServer:
            namespace:     namespace
            binding:       document-wrapped # Or rpc-literal
            version:       2
            resource:      "@FooBundle/Controller/FooController.php"
            resource_type: annotation
            cache_type:    none

        # Multiple Namespace
        BarServer:
            namespace:      namespace
            binding:        document-wrapped # Or rpc-literal
            version:        2
            resource:       '@BarBundle/Controller/BarController.php'
            resource_type:  annotation
            cache_type:     none
            target_name:    ns1 # Service definition name attribute
            public_key:     public_key_to_sign_response
            private_key:    private_key_to_sign_response
            namespace_types:
              - { name: 'ns2', url: name_space2_url}
              - { name: 'ns3', url: name_space3_url}
```

#### Multiple Namespace Usage

[](#multiple-namespace-usage)

To put the ComplexType in different (e.g: configured in yaml file above), use new Annotation class `BeSimple\SoapBundle\ServiceDefinition\Annotation\Type` and new parameter `target` of `BeSimple\SoapBundle\ServiceDefinition\Annotation\ComplexType` class

Make the server configuration:

```
be_simple_soap:
    services:
        FooServer:
            namespace:      default_namespace
            binding:        document-wrapped
            version:        2
            resource:       '@FooBundle/Controller/DefaultController.php'
            resource_type:  annotation
            cache_type:     none
            target_name:    ns1
            namespace_types:
              - { name: 'ns2', url: 'foo_namespace'}
              - { name: 'ns3', url: 'bar_namespace'}
```

Add Method:

```
use FooBundle\Server\SoapRequest;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    /**
     * @Soap\Method("soapRequest")
     * @Soap\Param("request", phpType = "FooBundle\Server\SoapRequest")
     * @Soap\Result("soapResponse", phpType = "FooBundle\Server\SoapResponse")
     */
    public function soapRequestAction(SoapRequest $request)
    {
    }
}
```

Bar.php

```
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

/**
 * @Soap\Alias("Bar")
 * @Soap\Type("ns3")
 */
class Bar
{
    /**
     * @var string
     *
     * @Soap\ComplexType("string")
     */
    private $value;

    /**
     * @return string
     */
    public function getValue(): string
    {
        return $this->value;
    }

    /**
     * @param string $value
     */
    public function setValue(string $value)
    {
        $this->value = $value;
    }
}
```

Foo.php

```
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

/**
 * @Soap\Alias("Foo")
 * @Soap\Type("ns2")
 */
class Foo
{
    /**
     * @var Bar
     *
     * @Soap\ComplexType("FooBundle\Server\Bar", target="ns3")
     */
    private $bar;

    /**
     * @return Bar
     */
    public function getBar(): Bar
    {
        return $this->bar;
    }

    /**
     * @param Bar $bar
     */
    public function setBar(Bar $bar)
    {
        $this->bar = $bar;
    }
}
```

SoapRequest.php

```
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

/**
 * @Soap\Alias("SoapRequest")
 *
 * Default namespace is ns1
 */
class SoapRequest
{
    /**
     * @var Foo
     *
     * @Soap\ComplexType("FooBundle\Server\Foo", target="ns2")
     */
    private $foo;

    /**
     * @return Foo
     */
    public function getFoo(): Foo
    {
        return $this->foo;
    }

    /**
     * @param Foo $foo
     */
    public function setFoo(Foo $foo)
    {
        $this->foo = $foo;
    }
}
```

And here is the xml output of our server:

```

```

### Components

[](#components)

BeSimpleSoap consists of five components ...

#### BeSimpleSoapBundle

[](#besimplesoapbundle)

The BeSimpleSoapBundle is a Symfony2 bundle to build WSDL and SOAP based web services. For further information see the [README](https://github.com/codebach/Soap/blob/master/src/BeSimple/SoapBundle/README.md).

#### BeSimpleSoapClient

[](#besimplesoapclient)

The BeSimpleSoapClient is a component that extends the native PHP SoapClient with further features like SwA, MTOM and WS-Security. For further information see the [README](https://github.com/codebach/Soap/blob/master/src/BeSimple/SoapClient/README.md).

#### BeSimpleSoapCommon

[](#besimplesoapcommon)

The BeSimpleSoapCommon component contains functionylity shared by both the server and client implementations. For further information see the [README](https://github.com/codebach/Soap/blob/master/src/BeSimple/SoapCommon/README.md).

#### BeSimpleSoapServer

[](#besimplesoapserver)

The BeSimpleSoapServer is a component that extends the native PHP SoapServer with further features like SwA, MTOM and WS-Security. For further information see the [README](https://github.com/codebach/Soap/blob/master/src/BeSimple/SoapServer/README.md).

#### BeSimpleSoapWsdl

[](#besimplesoapwsdl)

For further information see the [README](https://github.com/codebach/Soap/blob/master/src/BeSimple/SoapWsdl/README.md).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

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

3248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8a2ce15bcc7c7b8d989838dacde2eac3ebc602fcade0a939dbdd78cc1908a7b?d=identicon)[Codebach](/maintainers/Codebach)

---

Top Contributors

[![francisbesset](https://avatars.githubusercontent.com/u/471525?v=4)](https://github.com/francisbesset "francisbesset (305 commits)")[![aschamberger](https://avatars.githubusercontent.com/u/1042049?v=4)](https://github.com/aschamberger "aschamberger (97 commits)")[![christiankerl](https://avatars.githubusercontent.com/u/425341?v=4)](https://github.com/christiankerl "christiankerl (72 commits)")[![codebach](https://avatars.githubusercontent.com/u/10575905?v=4)](https://github.com/codebach "codebach (17 commits)")[![mremi](https://avatars.githubusercontent.com/u/548536?v=4)](https://github.com/mremi "mremi (5 commits)")[![alemorozov](https://avatars.githubusercontent.com/u/1452075?v=4)](https://github.com/alemorozov "alemorozov (4 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (2 commits)")[![sarunas](https://avatars.githubusercontent.com/u/250523?v=4)](https://github.com/sarunas "sarunas (2 commits)")[![vytautasgimbutas](https://avatars.githubusercontent.com/u/1172971?v=4)](https://github.com/vytautasgimbutas "vytautasgimbutas (1 commits)")[![ch3ric](https://avatars.githubusercontent.com/u/858068?v=4)](https://github.com/ch3ric "ch3ric (1 commits)")[![davefx](https://avatars.githubusercontent.com/u/292309?v=4)](https://github.com/davefx "davefx (1 commits)")[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (1 commits)")[![ldantunez](https://avatars.githubusercontent.com/u/2373448?v=4)](https://github.com/ldantunez "ldantunez (1 commits)")[![matthiasnoback](https://avatars.githubusercontent.com/u/1193078?v=4)](https://github.com/matthiasnoback "matthiasnoback (1 commits)")[![rolebi](https://avatars.githubusercontent.com/u/2950183?v=4)](https://github.com/rolebi "rolebi (1 commits)")

---

Tags

soap

### Embed Badge

![Health badge](/badges/codebach-soap/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M379](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k156.8M1.2k](/packages/symfony-web-profiler-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

567.3M123](/packages/symfony-ux-icons)[oro/platform

Business Application Platform (BAP)

642140.7k110](/packages/oro-platform)[besimple/soap

Build and consume SOAP and WSDL based web services

106561.4k2](/packages/besimple-soap)

PHPackages © 2026

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