Php Soap

  1. Php Soapaction
  2. Php Soap Server Example
  3. Php Soap Example

This is required when you are going to create or consume the SOAP web service from your PHP programs. SOAP is an acronym that stands for Simple Object Access Protocol. It is XML based messaging protocol that defines the semantic of the communication structure between two applications. Browse other questions tagged php xml soap or ask your own question. The Overflow Blog Accelerating Stack Overflow’s transformation. Podcast 333: From music to trading cards, software is transforming curation Featured on Meta New onboarding for review queues. To 'Drop the soap' is to accidently, or absent mindedly, put yourself in a vulnerable position. Derived from the idea that in a prison shower, if you were to drop the soap, and bend over to pick it up, you would expose your anus to rape.


To enable SOAP support, configure PHP with --enable-soap.

Phpc at cinqs dot net
4 years ago
If you received a
E: Couldn't find any package by regex 'php7.1-soap'
when using docker php:apache image
apt-get install php-soap
4 years ago
for Ubuntu 16.04 LTS
sudo apt-get install php7.0-soap
sudo systemctl restart apache2.service
wally at soggysoftware dot co dot uk
4 years ago
If you're using official PHP packages shipped with CentOS or RedHat version 6 or 7:
# yum install php-soap
(Restart Apache/nginx too if appropriate.)

Php Soapaction

3 years ago
If you have not yet updated the OS and also the PHP version
for Ubuntu 14.04 LTS
sudo apt-get install php5.6-soap
sudo service apache2 restart
2 years ago
for latest MacOS with brew, where Homebrew/PHP is deprecated:
brew install [email protected]
(change 7.2 to your version)

Php Soap Server Example

4 years ago
On PHP7.1 Ubuntu 16.04 LTS:
$ sudo apt-get install php7.1-soap
$ sudo service php7.1-fpm reload
  • Installing/Configuring

Php Soap Example

When you need to connect to services requiring to send extra header use this method.
Here how we can to it with PHP and SoapClient
class exampleChannelAdvisorAuth
public function
__construct($key, $pass)
$this->DeveloperKey = $key;
$this->Password = $pass;
$devKey = ';
$password = ';
$accountId = ';
// Create the SoapClient instance
$url = ';
$client = new SoapClient($url, array('trace' => 1, 'exception' => 0));
// Create the header
$auth = new ChannelAdvisorAuth($devKey, $password);
$header = new SoapHeader('', 'APICredentials', $auth, false);
// Call wsdl function
$result = $client->__soapCall('DeleteMarketplaceAd', array(
'DeleteMarketplaceAd' => array(
'accountID' => $accountId,
'marketplaceAdID' => '9938745' // The ads ID
NULL, $header);
// Echo the result
echo '<pre>'.print_r($result, true).'</pre>';
$result->DeleteMarketplaceAdResult->Status 'Success')
'Item deleted!';