Skip to content

Commit 8147243

Browse files
committed
minor #15350 Update NuSOAP client example (sebpacz)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Update NuSOAP client example The `$soapClient` created in the example is an instance of the native `\SoapClient` class, instead of NuSOAP. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- 4de542d Update NuSOAP client example
2 parents e7159d7 + 4de542d commit 8147243

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

controller/soap_web_service.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ In this case, the SOAP service will allow the client to call a method called
3838

3939
public function hello($name)
4040
{
41-
4241
$message = (new \Swift_Message('Hello Service'))
4342
->setTo('[email protected]')
4443
->setBody($name.' says hi!');
@@ -96,13 +95,13 @@ buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output
9695
into the content of the Response and clear the output buffer. Finally, you're
9796
ready to return the ``Response``.
9897

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
10099
assumes that the ``index()`` method in the controller above is accessible via
101100
the route ``/soap``::
102101

103102
$soapClient = new \SoapClient('http://example.com/index.php/soap?wsdl');
104103

105-
$result = $soapClient->call('hello', ['name' => 'Scott']);
104+
$result = $soapClient->__soapCall('hello', ['name' => 'Scott']);
106105

107106
An example WSDL is below.
108107

@@ -170,3 +169,4 @@ An example WSDL is below.
170169
.. _`NuSOAP`: https://sourceforge.net/projects/nusoap
171170
.. _`output buffering`: https://www.php.net/manual/en/book.outcontrol.php
172171
.. _`Laminas SOAP`: https://docs.laminas.dev/laminas-soap/server/
172+
.. _`SoapClient`: https://www.php.net/manual/en/class.soapclient.php

0 commit comments

Comments
 (0)