Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of dynamic property wsdl::$schemaTargetNamespace is deprecated #126

Open
syntaxerror opened this issue Nov 5, 2024 · 2 comments

Comments

@syntaxerror
Copy link

I was running a script on PHP 8.2 who includes this code:

`require_once('lib/nusoap.php');

$NAMESPACE = 'https://localhost/MyIntegrationWS';

$server = new soap_server;

$server->debug_flag=false;
$server->configureWSDL('MyIntegrationWSPHP', $NAMESPACE);
$server->wsdl->schemaTargetNamespace = $NAMESPACE;`

Which is returning a 'Creation of dynamic property wsdl::$schemaTargetNamespace is deprecated' php error.

ChatGPT recommends to add the following property declaration inside the wsdl class:

class wsdl { public $schemaTargetNamespace; // Other existing properties and methods... }

ChatGPT's explanation is that by declaring public $schemaTargetNamespace; in the wsdl class, you prevent PHP from generating a dynamic property, which eliminates the deprecation warning.

@parallels999
Copy link

Feel free to make a PR

@tenzap
Copy link
Contributor

tenzap commented Feb 15, 2025

@syntaxerror , isn't the problem in your code? Shouldn't you set schemaTargetNamespace as argument to configureWSDL() ?

    function configureWSDL($serviceName, $namespace = false, $endpoint = false, $style = 'rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants