PHPackages                             rogervila/laravel-soap-server - 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. rogervila/laravel-soap-server

ActiveLibrary[API Development](/categories/api)

rogervila/laravel-soap-server
=============================

PHP Laravel SOAP Server

1.0.0(1y ago)052[1 PRs](https://github.com/rogervila/laravel-soap-server/pulls)MITPHPCI passing

Since Mar 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rogervila/laravel-soap-server)[ Packagist](https://packagist.org/packages/rogervila/laravel-soap-server)[ RSS](/packages/rogervila-laravel-soap-server/feed)WikiDiscussions main Synced 3w ago

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

[![Laravel SOAP Server](https://camo.githubusercontent.com/c3d6de22a26d4d6caf1074fcd42b2b30467db6d215ee74d47c3107b500f6669d/68747470733a2f2f692e6962622e636f2f4a77304c72517a592f6c6176617273652d6c61732d6d616e6f732e706e67)](https://camo.githubusercontent.com/c3d6de22a26d4d6caf1074fcd42b2b30467db6d215ee74d47c3107b500f6669d/68747470733a2f2f692e6962622e636f2f4a77304c72517a592f6c6176617273652d6c61732d6d616e6f732e706e67)

[![Status](https://github.com/rogervila/laravel-soap-server/workflows/test/badge.svg)](https://github.com/rogervila/laravel-soap-server/actions)[![StyleCI](https://camo.githubusercontent.com/dfc738ca9311e674ba3df904cc7abda1694768828c41a4a78608e2ac75428a62/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231313635373132312f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/211657121)[![Quality Gate Status](https://camo.githubusercontent.com/2e1f3331f064ac1a7c90655b2714a16c5daf366bbda3105a9411dde9f9a78c5d/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d726f67657276696c615f6c61726176656c2d736f61702d736572766572266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=rogervila_laravel-soap-server)[![Coverage](https://camo.githubusercontent.com/5b5527a77f5db1efe9b311581971ca1d20ec05464e0ef3a8a590f1832a39afc5/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d726f67657276696c615f6c61726176656c2d736f61702d736572766572266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=rogervila_laravel-soap-server)

[![Latest Stable Version](https://camo.githubusercontent.com/8e73b0ad4c1a63809c8c9aaa996a5d6a61697f118639cc3a34b16c1d40c4ac92/68747470733a2f2f706f7365722e707567782e6f72672f726f67657276696c612f6c61726176656c2d736f61702d7365727665722f762f737461626c65)](https://packagist.org/packages/rogervila/laravel-soap-server)[![Total Downloads](https://camo.githubusercontent.com/31b7ec14c381c1a0d66b2f3dfc9b368002ecf9ad1321a7a295d6f38fecba6cc3/68747470733a2f2f706f7365722e707567782e6f72672f726f67657276696c612f6c61726176656c2d736f61702d7365727665722f646f776e6c6f616473)](https://packagist.org/packages/rogervila/laravel-soap-server)[![License](https://camo.githubusercontent.com/11490c8d271fc672545d32b05944fdf5e45a95f1c0ee9f37d2b4832d6b152a17/68747470733a2f2f706f7365722e707567782e6f72672f726f67657276696c612f6c61726176656c2d736f61702d7365727665722f6c6963656e7365)](https://packagist.org/packages/rogervila/laravel-soap-server)

Laravel SOAP Server
===================

[](#laravel-soap-server)

About
-----

[](#about)

Laravel SOAP Server is a package that simplifies the creation of SOAP web services in Laravel. It provides a base setup for developing SOAP services, including WSDL generation and request handling.

Installation
------------

[](#installation)

To install the package, use Composer:

```
composer require rogervila/laravel-soap-server
```

Usage
-----

[](#usage)

### Defining a Service

[](#defining-a-service)

Create a service class that will handle the SOAP requests. For example, a `UserService` class:

```
namespace App\Services;

use stdClass;

class UserService
{
    public function createUser(stdClass $request): array
    {
        // Handle the request and return a response
    }
}
```

### Creating a WSDL View

[](#creating-a-wsdl-view)

Create a Blade view for the WSDL definition. For example, `resources/views/wsdl.blade.php`:

```

```

### Defining Routes

[](#defining-routes)

Define a route to handle the SOAP requests. For example, in `routes/web.php`:

```
use App\Services\UserService;
use LaravelSoapServer\Soap;

/**
 * GET http://localhost:8000/user-soap-service?wsdl Returns the WSDL definition
 * POST http://localhost:8000/user-soap-service Handles the SOAP requests
 */
Route::any('/user-soap-service', function () {
    // Option 1
    return Soap::handle(view: 'wsdl', service: UserService::class);

    // Option 2
    return Soap::withView('wsdl')
        ->withService(UserService::class)
        ->withRequest(request()) // Optional: defaults to current request
        ->withOptions([]) // Optional: defaults to []
        ->handle();
});
```

### Testing the Service

[](#testing-the-service)

You can test the service using a SOAP client or by writing tests. For example, a test case:

```
namespace Tests\Feature;

use Tests\TestCase;

class SoapTest extends TestCase
{
    public function test_create_user()
    {
        $name = 'John Doe';
        $email = 'john.doe@example.com';
        $url = url('/user-soap-service');

        $payload =

                    $name
                    $email

        XML;

        $response = $this->call('POST', $url, [], [], [], [
            'HTTP_SOAPACTION' => 'CreateUser',
            'CONTENT_TYPE' => 'text/xml;charset=utf-8',
            'CONTENT_LENGTH' => strlen($payload),
        ], $payload);

        $response->assertStatus(200);
        $response->assertHeader('Content-Type', 'application/soap+xml;charset=utf-8');

        // ...
    }
}
```

License
-------

[](#license)

Laravel SOAP Server is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Icons made by [justicon](https://www.flaticon.es/iconos-gratis/manos "justicon") from [www.flaticon.com](https://www.flaticon.com/ "Flaticon")

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance70

Regular maintenance activity

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

469d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/351443b7d23e94fcf31b250db90f0b9578cc9fd8e0cefbed9666467e3e9cb571?d=identicon)[rogervila](/maintainers/rogervila)

---

Top Contributors

[![rogervila](https://avatars.githubusercontent.com/u/6053012?v=4)](https://github.com/rogervila "rogervila (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

Laravel SOAP Server

###  Code Quality

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rogervila-laravel-soap-server/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M920](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M126](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k13.5M60](/packages/knuckleswtf-scribe)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[justbetter/laravel-magento-client

A client to interact with Magento

49108.7k14](/packages/justbetter-laravel-magento-client)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.5k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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