@@ -38,7 +38,6 @@ In this case, the SOAP service will allow the client to call a method called
38
38
39
39
public function hello($name)
40
40
{
41
-
42
41
$message = (new \Swift_Message('Hello Service'))
43
42
->setTo('me@example.com')
44
43
->setBody($name.' says hi!');
@@ -96,13 +95,13 @@ buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output
96
95
into the content of the Response and clear the output buffer. Finally, you're
97
96
ready to return the ``Response ``.
98
97
99
- Below is an example calling the service using a ` NuSOAP `_ client. This example
98
+ Below is an example calling the service using a native ` SoapClient `_ client. This example
100
99
assumes that the ``index() `` method in the controller above is accessible via
101
100
the route ``/soap ``::
102
101
103
102
$soapClient = new \SoapClient('http://example.com/index.php/soap?wsdl');
104
103
105
- $result = $soapClient->call ('hello', ['name' => 'Scott']);
104
+ $result = $soapClient->__soapCall ('hello', ['name' => 'Scott']);
106
105
107
106
An example WSDL is below.
108
107
@@ -170,3 +169,4 @@ An example WSDL is below.
170
169
.. _`NuSOAP` : https://sourceforge.net/projects/nusoap
171
170
.. _`output buffering` : https://www.php.net/manual/en/book.outcontrol.php
172
171
.. _`Laminas SOAP` : https://docs.laminas.dev/laminas-soap/server/
172
+ .. _`SoapClient` : https://www.php.net/manual/en/class.soapclient.php
0 commit comments