June 2017
Intermediate to advanced
536 pages
9h 49m
English
Creating a SOAP client in PHP is a relatively simple task when we are using the SoapClient class. Let's create the soap-service/client/index.php file with the following content:
<?php$options = [ 'location' => 'http://soap-service.server/index.php', 'uri' => 'http://soap-service.server/index.php', 'trace ' => true,];// NON-WSDL MODE: $client = new SoapClient($wsdl = null, $options);// WSDL MODE: $client = new SoapClient('http://soap-service.server/wsdl.xml', $options);$client = new SoapClient('http://soap-service.server/wsdl.xml', $options);echo $client->customerWelcome('John');echo $client->userWelcome('Mariya');
Executing the client code should result in the following output:
What happens under the hood when the SOAP ...
Read now
Unlock full access