PHPackages                             ndexondeck/soapbuilder - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ndexondeck/soapbuilder

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ndexondeck/soapbuilder
======================

Powerful SOAP/XML builder

v1.0.0(8y ago)013MITPHPPHP &gt;=5.6

Since Apr 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ndexondeck/soapbuilder)[ Packagist](https://packagist.org/packages/ndexondeck/soapbuilder)[ RSS](/packages/ndexondeck-soapbuilder/feed)WikiDiscussions master Synced 2d ago

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

Soap Builder
============

[](#soap-builder)

Soap builder is a php OOP library that can help you build any form of XML string with so much ease and clarity. It is mostly powered by php magic methods, as it uses them to intuitively setup XML tags.

[![Total Downloads](https://camo.githubusercontent.com/05c58447c02f4d25499a65b85e0410e82cc7632c9a9e22fbd910b76a1c59e460/68747470733a2f2f706f7365722e707567782e6f72672f6e6465786f6e6465636b2f736f61706275696c6465722f646f776e6c6f6164732e737667)](https://packagist.org/packages/ndexondeck/lauditor)

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

[](#installation)

**Install with Composer:**

```
composer require ndexondeck/soapbuilder

```

Documents will be available soon, but for now see a few examples
----------------------------------------------------------------

[](#documents-will-be-available-soon-but-for-now-see-a-few-examples)

1. Build a Simple Soap Request
[](#build-a-simple-soap-request)

```
$soapBuilder = new Builder();

$soapBuilder->soap__Header = new Payload();

$soapBuilder->Body = new Payload();
$soapBuilder->Body->Username = new Payload('ndxondeck@gmail.com');
$soapBuilder->Body->Password = new Payload('ndex4Jesus');

echo $soapBuilder->getXml();
```

1. Build a more complex Soap request
[](#build-a-more-complex-soap-request)

```
 $soapBuilder = new Builder('soap',[
        "tem"=>"http://tempuri.org/",
        "sms"=>"http://schemas.datacontract.org/2004/07/SMSAppws",
        "wsa"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing",
    ],'1.2');

$soapBuilder->soap__Header = new Payload();
$soapBuilder->soap__Header->wsa__Action = new Payload('http://tempuri.org/IService/SendMessage',[
    "xmlns:wsa"=>"http://www.w3.org/2005/08/addressing"
]);
$soapBuilder->soap__Header->wsa__To = new Payload('https://sms.sender.example/Service.svc',[
    "xmlns:wsa"=>"http://www.w3.org/2005/08/addressing"
]);

$soapBuilder->soap__Body = new Payload();
$soapBuilder->soap__Body->tem__SendMessage = new Payload();
$soapBuilder->soap__Body->tem__SendMessage->tem__message = new Payload();
$soapBuilder->soap__Body->tem__SendMessage->tem__message->sms__Message = new Payload($msg);
$soapBuilder->soap__Body->tem__SendMessage->tem__message->sms__MobileNo = new Payload($phone);

echo $soapBuilder->getXml();
```

1. Build a simple XML string
[](#build-a-simple-xml-string)

```
$xmlBuilder = (new SoapBuilder())->setAsXml()->setVersion('1.0');
$xmlBuilder->SearchCriteria = new Payload();
$xmlBuilder->SearchCriteria->UserName = new Payload('John');

echo $xmlBuilder->getXml();
```

1. Build a more complex XML string
[](#build-a-more-complex-xml-string)

```
$xmlBuilder = new SoapBuilder();
$xmlBuilder->setVersion('1.0')->setAsResponse()->setAsXml();
$xmlBuilder->Response = new Payload();
$xmlBuilder->Response->ResponseCode = new Payload('00');
$xmlBuilder->Response->UserList = new PayloadCollection('Department');

$user_count = 0;
if(!empty($results)){
    foreach ($results as $department){

        $collection = new PayloadCollection('User',['Id'=>$department['id'], 'Name'=>$department['name']]);

        $this_count = 0;
        foreach ($department['users'] as $user){
            $collection->append($user,[],true);
            $user_count++;
            $this_count++;
        }

        if($this_count > 0){
            $xmlBuilder->Response->UserList->Department = $collection;
        }
    }
}

$xmlBuilder->Response->UserList->setElementAttributes(['TotalAvailable'=>$user_count]);

echo $xmlBuilder->getXml();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2949d ago

### Community

Maintainers

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

---

Top Contributors

[![nduka-kc](https://avatars.githubusercontent.com/u/67976331?v=4)](https://github.com/nduka-kc "nduka-kc (4 commits)")

---

Tags

xmlbuildersoap

### Embed Badge

![Health badge](/badges/ndexondeck-soapbuilder/health.svg)

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

###  Alternatives

[amabnl/amadeus-ws-client

SOAP Web Service client library for interacting with the Amadeus GDS through its SOAP interface

204248.5k](/packages/amabnl-amadeus-ws-client)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[bmatovu/laravel-xml

Laravel XML Support

91270.4k](/packages/bmatovu-laravel-xml)[tucker-eric/laravel-xml-middleware

A Laravel Middleware to accept XML requests

181.2M](/packages/tucker-eric-laravel-xml-middleware)[goetas-webservices/wsdl-reader

Pure PHP WSDL parser

10349.9k6](/packages/goetas-webservices-wsdl-reader)[flowgistics/laravel-xml

1674.2k2](/packages/flowgistics-laravel-xml)

PHPackages © 2026

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