Edit report at http://bugs.php.net/bug.php?id=50698&edit=1
ID: 50698
Updated by: dmitry@php.net
Reported by: zippy1981 at gmail dot com
Summary: SoapClient should handle wsdls with some incompatiable
endpoints
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: *General Issues
Operating System: Windows XP/7 and probably all.
PHP Version: 5.2.12, 5.3.1
Assigned To: dmitry
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-05-05 09:43:48] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=299013
Log: Fixed bug #50698 (SoapClient should handle wsdls with some
incompatiable endpoints). (Justin Dearing)
------------------------------------------------------------------------
[2010-04-02 20:48:18] zippy1981 at gmail dot com
Submitted a new patch with error handling.
------------------------------------------------------------------------
[2010-04-02 17:29:49] zippy1981 at gmail dot com
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;
}
}
}
------------------------------------------------------------------------
[2010-01-13 20:59:45] zippy1981 at gmail dot com
Thanks for your reply.
On my initial report I posted an example client. In a comment in the
example client is a link to a github repo with a .NET web service that
causes this issue (e.g. config file was bound to nettcp):
http://github.com/zippy1981/EchoService
Inside the .net service is also a copy of the PHP client.
The .NET code can be compiled on any windows machine with the free IDE
SharpDevelop (http://www.icsharpcode.net/OpenSource/SD/Download/)
I can provide a manually generated wsdl with false endpoints if needed.
I'll gladly help test a fix or provide a mock if needed.
------------------------------------------------------------------------
[2010-01-13 20:29:39] srinatar@php.net
thanks for the clarification. if you can provide a test case /script ,
it would help us to work on this. thanks again for taking time for
following up on this. your help will definitely help PHP make better !
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=50698--
Edit this bug report at http://bugs.php.net/bug.php?id=50698&edit=1