PHPackages                             lawiet/nusoap - 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. lawiet/nusoap

ActiveLibrary[API Development](/categories/api)

lawiet/nusoap
=============

NuSOAP PHP library

0.1(8y ago)617.3k2LGPLv2PHPPHP &gt;=5.4.0

Since Sep 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Lawiet/nusoap)[ Packagist](https://packagist.org/packages/lawiet/nusoap)[ RSS](/packages/lawiet-nusoap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

NuSOAP for PHP
==============

[](#nusoap-for-php)

Fork of NuSOAP fixed for PHP 5.4+ and 7.x

Work in namespace (maintenance)

All credits belongs to official author(s): .

Install
-------

[](#install)

```
composer require lawiet/nusoap
```

Usage Client
------------

[](#usage-client)

```
// Config
$client = new NuSoapClient('http://localhost/nusoap/server.php?wsdl', 'wsdl');
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = FALSE;
$error  = $client->getError();

// Calls
$result = $client->call($action, $data);

if ($client->fault) {
    echo "Fault";
    print_r($result);
    echo "";
} else {
    $error = $client->getError();
    if ($error) {
        echo "Error" . $error . "";
    } else {
        echo "Main";
        echo $result;
    }
}
```

Usage Server
------------

[](#usage-server)

```
// Create the server instance
$server = new NuSoapServer();

$server->configureWSDL('server', 'urn:server');

$server->wsdl->schemaTargetNamespace = 'urn:server';

//SOAP complex type return type (an array/struct)
$server->wsdl->addComplexType(
    'Person',
    'complexType',
    'struct',
    'all',
    '',
    array(
        'id_user' => array('name' => 'id_user', 'type' => 'xsd:int'),
        'fullname' => array('name' => 'fullname', 'type' => 'xsd:string'),
        'email' => array('name' => 'email', 'type' => 'xsd:string'),
        'level' => array('name' => 'level', 'type' => 'xsd:int')
    )
);

//first simple function
$server->register('hello',
			array('username' => 'xsd:string'),  //parameter
			array('return' => 'xsd:string'),  //output
			'urn:server',   //namespace
			'urn:server#helloServer',  //soapaction
			'rpc', // style
			'encoded', // use
			'Just say hello');  //description

//this is the second webservice entry point/function
$server->register('login',
			array('username' => 'xsd:string', 'password'=>'xsd:string'),  //parameters
			array('return' => 'tns:Person'),  //output
			'urn:server',   //namespace
			'urn:server#loginServer',  //soapaction
			'rpc', // style
			'encoded', // use
			'Check user login');  //description

//first function implementation
function hello($username) {
        return 'Howdy, '.$username.'!';
}

//second function implementation
function login($username, $password) {
        //should do some database query here
        // .... ..... ..... .....
        //just some dummy result
        return array(
		'id_user'=>1,
		'fullname'=>'John Reese',
		'email'=>'john@reese.com',
		'level'=>99
	);
}

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';

$server->service($HTTP_RAW_POST_DATA);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

3176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41e0e18f92ca8099b4dc400f0233e7d759301bfa27b4a77e8986479627eaf920?d=identicon)[Lawiet](/maintainers/Lawiet)

---

Top Contributors

[![Lawiet](https://avatars.githubusercontent.com/u/11633133?v=4)](https://github.com/Lawiet "Lawiet (15 commits)")

---

Tags

wssoapwsdlnusoapweb serviceswebservices

### Embed Badge

![Health badge](/badges/lawiet-nusoap/health.svg)

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

###  Alternatives

[phpforce/soap-client

A PHP client for the Salesforce SOAP API

831.9M1](/packages/phpforce-soap-client)[php2wsdl/php2wsdl

Create WSDL files form PHP classes.

51504.8k3](/packages/php2wsdl-php2wsdl)[camcima/camcima-soap-client

Wrapper around PHP SoapClient class

2672.0k2](/packages/camcima-camcima-soap-client)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[skautis/skautis

Library for API calls to SkautIS

1329.7k4](/packages/skautis-skautis)

PHPackages © 2026

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