|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-01-08 21:19 UTC] zippy1981 at gmail dot com
Description: ------------ I have a WCF web service written in .NET that has different endpoints. I want .NET clients to be able to talk to it using nettcp (a propietary microsoft protocol) and PHP to be able to talk to it using basicHttp (soap 1.1). However, if WSDL contains any endpoints other than http or https endpoints I get the following error: PHP Fatal error: SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://schemas.microsoft.com/soap/tcp' I think the following should occur: If no endpoint is explicitly specified in the constructor, PHP should pick the first compatible endpoint available in the wsdl and use it. If the endpoint is explicitly declared in the constructor, then PHP should not care about the available endpoints. Reproduce code: --------------- <?php // .NET Service that this calls exists at http://github.com/zippy1981/EchoService $client = new SoapClient ('http://localhost:8731/EchoService/?wsdl', array( 'location' => 'http://localhost:8731/EchoService/Basic', 'trace' => true, 'soap_version' => SOAP_1_1, 'connection_timeout' => 5 ) ); echo $client->echo(array('request' => "Hello World"))->EchoResult; ?> Expected result: ---------------- c:\php\php.exe EchoClient.php Hello World Actual result: -------------- PHP Fatal error: SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://schemas.microsoft.com/soap/tcp' PatchesBugTestImprovedv2 (last revision 2010-04-30 21:59 UTC by zippy1981 at gmail dot com)BugTestImproved (last revision 2010-04-06 12:49 UTC by zippy1981 at gmail dot com) BugTest (last revision 2010-04-05 15:26 UTC by zippy1981 at gmail dot com) non-http-endpoint-handling (last revision 2010-04-02 18:47 UTC by zippy1981 at gmail dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 19:00:01 2025 UTC |
Below is a patch that helps to fix the behavior. The following problems remain: 1) If the wsdl contains only non http endpoints, and the location parameter is not specified, a proper error message is not generated. 2) If the wsdl contains only non http endpoints, and the location parameter is specified, the error "Uncaught SoapFault exception: [Client] Function ("echo") is not a valid method for this service in File.php:21" is displayed. Index: ext/soap/php_sdl.c =================================================================== --- ext/soap/php_sdl.c (revision 297339) +++ ext/soap/php_sdl.c (working copy) @@ -832,7 +832,12 @@ if (strncmp((char*)tmp- >children->content, WSDL_HTTP_TRANSPORT, sizeof(WSDL_HTTP_TRANSPORT)) == 0) { soapBinding- >transport = SOAP_TRANSPORT_HTTP; } else { - soap_error1(E_ERROR, "Parsing WSDL: PHP-SOAP doesn't support transport '%s'", tmp->children->content); + // Since this is an E_NOTICE severity message, it will disappear into the ether. + soap_error1(E_NOTICE, "Parsing WSDL: PHP-SOAP doesn't support transport '%s'", tmp->children->content); + efree(soapBinding); + efree(tmpbinding); + trav = trav- >next; + continue; } } }