Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #715 SOAP-0.8RC3 broken
Submitted: 2004-02-09 15:24 UTC
From: stanislav dot voroniy at portavita dot nl Assigned: arnaud
Status: Closed Package: SOAP
PHP Version: 4.3.4 OS: Linux RH 9
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-09 15:24 UTC] stanislav dot voroniy at portavita dot nl
Description: ------------ I dont have to much time for debbuging - I have a work to do, but SOAP-0.8RC3 definetly broken - a code that works file with 0.8RC2 after upgrade to RC3 returns soap_fault. With var_dump-inf fault object I see no reasons for fault - HTTP code is 200 and as message complete SOAP responce included.

Comments

 [2004-02-10 08:46 UTC] stanislav dot voroniy at portavita dot nl
Some debug info: In RC3 curl now returns full header, which was stripped in RC2. This is the cause of error I get, because your regular expression does not work correctly with the following header: HTTP/1.1 100 Continue Server: Microsoft-IIS/4.0 Date: Tue, 10 Feb 2004 08:42:46 GMT Content-Type: text/html Pragma: no-cache Expires: Tue, 30 Mar 1999 11:54:01 GMT Content-Length: 25106 HTTP/1.1 200 ......... i.e. I have two "headers instead of one. Previously it was skipped by curl, now you should care about it yourself.
 [2004-02-10 09:14 UTC] stanislav dot voroniy at portavita dot nl
I've made some changes to HTTP.php to fix the issue. Sorry, I'm sysadmin and system programmer, so my solution that uses recursion you can consider not nice, but at least it is working :-) Here is the patch: --- SOAP-0.8RC3/Transport/HTTP.php 2004-01-17 15:00:51.000000000 +0100 +++ SOAP/Transport/HTTP.php 2004-02-10 10:14:51.000000000 +0100 @@ -338,10 +338,13 @@ // find the response error, some servers response with 500 for soap faults $this->_parseHeaders($match[1]); - list($protocol, $code) = sscanf($this->result_headers[0], '%s %s'); + list($protocol, $code, $msg) = sscanf($this->result_headers[0], '%s %s %s'); unset($this->result_headers[0]); switch($code) { + case 100: // Continue + $this->incoming_payload = $match[2]; + return $this->_parseResponse(); case 400: $this->_raiseSoapFault("HTTP Response $code Bad Request"); return false; @@ -372,7 +375,7 @@ break; default: if ($code >= 400 && $code < 500) { - $this->_raiseSoapFault("HTTP Response $code Not Found"); + $this->_raiseSoapFault("HTTP Response $code Not Found, Server message: $msg"); return false; } }
 [2004-02-13 08:46 UTC] stanislav dot voroniy at portavita dot nl
That is me again. I still having strange troubles with accessing BEA Weblogic webservices. Now I've got 2 Content-Type: headers line, only last should be taken into account. Here is the patch: --- SOAP-0.8RC3/Transport/HTTP.php 2004-01-17 15:00:51.000000000 +0100 +++ SOAP/Transport/HTTP.php 2004-02-13 09:46:47.000000000 +0100 @@ -246,8 +246,10 @@ */ function _parseEncoding($headers) { - $h = stristr($headers,'Content-Type'); - preg_match('/^Content-Type:\s*(.*)$/im',$h,$ct); + $h = stristr($headers,'Content-Type'); + preg_match_all('/^Content-Type:\s*(.*)$/im',$h,$ct,PREG_SET_ORDER); + $n = count($ct); + $ct = $ct[$n-1]; $this->result_content_type = str_replace("\r","",$ct[1]); if (preg_match('/(.*?)(?:;\s?charset=)(.*)/i',$this->result_content_type,$m)) { // strip the string of \r
 [2004-03-04 12:21 UTC] stanislav dot voroniy at portavita dot nl
That is me again. Despite that nobody pays attention to my posts I continue posting bugs: in files WSDL.php after line 453 $classname = str_replace('.','_',$classname); + $classname = str_replace('-','_',$classname); and line 610 to be modified as follows: $classname = preg_replace('/[ .\-\(\)]+/', '_', $classname); Both changes fix the same bug - Class name can not contain "-" (minus) sign.
 [2004-04-03 10:21 UTC] arnaud
Hi, Would it possible for you to put a single unified diff online ?
 [2004-04-09 18:51 UTC] jdriddle_producer at yahoo dot com
I had the same issue with the parser choking on HTTP headers. Your patch did the trick. I'm not sure why the bug got marked closed, as I can't even find a cvs version to check if its been patched. Development on this package seems to have stopped. Got any ideas on how to make this library ouput the SOAP response as a nested array? ;)
 [2004-08-22 20:24 UTC] arnaud
This bug has just been closed. I went through the patch manually, an online unified diff would made things easier.