Edit report at https://bugs.php.net/bug.php?id=64704&edit=1
ID: 64704
User updated by: welfordmartin at gmail dot com
Reported by: welfordmartin at gmail dot com
Summary: Problem with ASP.NET Soap Servers
Status: Open
Type: Bug
Package: SOAP related
Operating System: All
PHP Version: 5.3.24
Block user comment: N
Private report: N
New Comment:
Sorry from the work around remove the die.
Previous Comments:
------------------------------------------------------------------------
[2013-04-24 17:13:49] welfordmartin at gmail dot com
Work Around for time being.
class NewSoapClient extends SoapClient{
public function __doRequest($request, $location, $action, $version,
$one_way = 0) {
preg_match_all("/xmlns:ns([0-9*])=\"(.[^\\\"]*)\\\"/", $request, $env);
foreach($env[0] as $key => $val){
$request = str_replace($val, "", $request);
preg_match_all("/<ns".$env[1][$key].":([A-Za-z][A-Za-z0-
9]*)/", $request, $test);
foreach($test[0] as $k => $v){
$request = str_replace($v, "<".$test[1][$k]."
xmlns=\"".$env[2][$k]."\"", $request);
$request = str_replace(str_replace("<", "</",
$test[0][$k]), "</".$test[1][$k], $request);
}
}
die(print_r(array($request, $test), true));
// parent call
return parent::__doRequest($request, $location, $action, $version);
}
}
------------------------------------------------------------------------
[2013-04-24 16:09:25] welfordmartin at gmail dot com
Recommended Fix:
It would be nice if there was an option in setting up the SoapClient that tells
it
to use inline xmlns instead of in Envelope namespacing
------------------------------------------------------------------------
[2013-04-24 16:07:57] welfordmartin at gmail dot com
Description:
------------
This might want changing to a Feature Request instead of bug but I'm not sure.
There is a problem in ASP.NET SOAP Server that for some reason does not support
using the Envelope xmlns:ns stuff inside the soap:header this is how php
SoapClient works <soap:Envelope ... xmlns:ns1="" xmlns:ns2="">
ASP.NET uses
<soap:header>
<Method xmlns="">
</Method>
</soap:header>
Please look at "The Test Scripts" for the problem that occures these are not
the
php code but the payload generated by SoapClient and the manual modifications i
had to to to get the code to work on my REST Testing client.
Test script:
---------------
Working:
http://pb.mgawow.co.uk/yvxCQe2S
Not Working PHP SoapClient Generated:
http://pb.mgawow.co.uk/r9xjaEW4
Expected result:
----------------
Working API Call
Actual result:
--------------
Fails causes a 500 error on remote server called
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64704&edit=1