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
Seg Fault when generating types #373
Comments
Hello @arno14, This looks like an issue in ext-soap and you might report it on https://bugs.php.net/. <?php
$client = new SoapClient('https://service-test.protel.io/services/ProtelApiService.ProtelApiServiceHttpsSoap12Endpoint?wsdl');
$client->__getTypes(); This results in a segfault: Debugging it doesnt give me any additional information either:
The WSDL does load quite fast in soapUI, so I guess that the WSDL itself is ok. However, when I tried running it through a vanilla PHP wsdl parser, I also get a segfault:
However, If I disable HTTP cache in that custom parser, it keeps stuck in a loop:
So my best guess is that it gets stuck in some circular import and crashes at some point because it keeps on importing/including XML until it crashes or doenst make sense anymore? Probably SoapUI is clever enough to detect and fix this. |
Hi @veewee Thanks you for your time and for pointing out to me that the problem was with the PHP SOAP extension itself. For comparaison, I created a test script in node js for the same url, it works (it display the list of methods), unless it is very slow. I opened a ticket on php.net: https://bugs.php.net/bug.php?id=81154&thanks=4 |
I am trying to setup a project using this wsdl:
https://service-test.protel.io/services/ProtelApiService.ProtelApiServiceHttpsSoap12Endpoint?wsdl
I generate the soap-client.php file with command "wizard" , and then run the command "generate:types"
then I encouter a Segmentation Fault:
Erreur de segmentation (core dumped)
I tested on:
I tried to :
The others command "generate:classmap", "generate:client" fail the same way
I tried to debug using: https://jolicode.com/blog/find-segfaults-in-php-like-a-boss
I can see that the script get locked a few seconds on:
Phpro/SoapClient/Soap/Driver/ExtSoap/AbusedClient.php +43
then it continues and stop at
Phpro/SoapClient/Soap/Driver/ExtSoap/Metadata/XsdTypesParser.php +39
I think that the problem is relevant to the size of Soap Web service, and the fact that it references too many other xml files.
Are there any secret option that would allow to only generate the code for a short list of SOAP Operation and associated Types?
The text was updated successfully, but these errors were encountered: