My favorites | Sign in
Google
                
Details: Show all Hide all

Last 7 days

  • Dec 15, 2009
    issue 5 (Bug UTF8 Problem) commented on by furkancelik   -   On my library it seems its http://schemas.xmlsoap.org/soap/encoding/ what should I write there to solve the problem ? On my mysql DB chasset encoding is UTF-8 I send the wsdl adress to the client but they can not get all the characters. Thanks for your attention.
    On my library it seems its http://schemas.xmlsoap.org/soap/encoding/ what should I write there to solve the problem ? On my mysql DB chasset encoding is UTF-8 I send the wsdl adress to the client but they can not get all the characters. Thanks for your attention.
  • Dec 14, 2009
    issue 5 (Bug UTF8 Problem) reported by normenmoeller   -   What steps will reproduce the problem? 1. If you have to interact with a webservice that adds the data you send into a database (UTF8) 2. on your side everything is UTF8 and all the settings are configured to be UTF8 3. the other side will tell you that the data was encoded to UTF8 again After several hours of getting through the code I found the problem. In the function serializeEnvelope it just says utf8_encode without any checking whether it is suppossed to do this. So I removed this encode and now it works just fine.
    What steps will reproduce the problem? 1. If you have to interact with a webservice that adds the data you send into a database (UTF8) 2. on your side everything is UTF8 and all the settings are configured to be UTF8 3. the other side will tell you that the data was encoded to UTF8 again After several hours of getting through the code I found the problem. In the function serializeEnvelope it just says utf8_encode without any checking whether it is suppossed to do this. So I removed this encode and now it works just fine.

Earlier this year

  • Nov 15, 2009
    issue 4 (nusoap - EOF reached before processing content-length bytes) reported by JassenM   -   What steps will reproduce the problem? 1. Client sends soap request to server 2. Client receives soap data 3. Client receives EOF before processing all of http content-length bytes. What is the expected output? What do you see instead? All content-length bytes shall be received. What version of the product are you using? On what operating system? nusoap-for-php5 (0.9) PHP 5.2.11 Windows Server 2008 Please provide any additional information below. NuSoap experts, I'm moving my website, powered by PHP, from a Linux server to a Windows Server 2008 server. My website uses nusoap for XML web services. One of my scripts which run perfectly on the linux server, is failing on the windows server. On the windows server, the nusoap is failing to receive all data. For example, if 29,778 is expected from the SOAP server, only 6,729 bytes are being received by the client on the windows server before EOF. The feof() function call in nusoap getResponse() (around line number 2656) is detecting EOF prematurely before reading all the data. If I add a "usleep(250000)" after each "fread()" in nusoap.php getResponse() as shown below, all data is received as expected. I've added some debugging and determined that the feof() which is returning true is the feof in the while loop on line 2655 of nusoap.php in getResponse(). The following is the debug info for nusoap 0.7.2 (actually is google's nusoap for php5 - 0.9). Note the content-length and the length of data actually read on the socket before EOF. ... 2009-11-15 11:12:49.194406 soapclientNusoap: transporting via HTTP 2009-11-15 11:12:49.197422 soapclientNusoap: sending message, length=904 2009-11-15 11:12:49.194785 soap_transport_http: scheme = http 2009-11-15 11:12:49.195125 soap_transport_http: host = toywebservices.com 2009-11-15 11:12:49.195435 soap_transport_http: path = /toywebservice/toywebservice.asmx 2009-11-15 11:12:49.195755 soap_transport_http: query = WSDL 2009-11-15 11:12:49.196101 soap_transport_http: set Host: toywebservices.com 2009-11-15 11:12:49.196447 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:12:49.196784 soap_transport_http: set Content-Type: text/xml; charset=UTF-8 2009-11-15 11:12:49.197104 soap_transport_http: set SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:12:49.197770 soap_transport_http: entered send() soapclientsoap with data of length: 904 2009-11-15 11:12:49.198106 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host toywebservices.com, port 80 2009-11-15 11:12:49.198420 soap_transport_http: calling fsockopen with host toywebservices.com connection_timeout 0 2009-11-15 11:12:49.248629 soap_transport_http: set response timeout to 30 2009-11-15 11:12:49.249045 soap_transport_http: socket connected 2009-11-15 11:12:49.249386 soap_transport_http: set Content-Length: 904 2009-11-15 11:12:49.249723 soap_transport_http: HTTP request: POST /toywebservice/toywebservice.asmx?WSDL HTTP/1.0 2009-11-15 11:12:49.250047 soap_transport_http: HTTP header: Host: toywebservices.com 2009-11-15 11:12:49.250644 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:12:49.250870 soap_transport_http: HTTP header: Content-Type: text/xml; charset=UTF-8 2009-11-15 11:12:49.251095 soap_transport_http: HTTP header: SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:12:49.251322 soap_transport_http: HTTP header: Content-Length: 904 2009-11-15 11:12:49.251600 soap_transport_http: wrote data to socket, length = 1178 2009-11-15 11:12:49.495428 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2009-11-15 11:12:49.496245 soap_transport_http: read line of 19 bytes: Connection: close 2009-11-15 11:12:49.496577 soap_transport_http: read line of 37 bytes: Date: Sun, 15 Nov 2009 17:12:48 GMT 2009-11-15 11:12:49.496896 soap_transport_http: read line of 27 bytes: Server: Microsoft-IIS/6.0 2009-11-15 11:12:49.497215 soap_transport_http: read line of 23 bytes: X-Powered-By: ASP.NET 2009-11-15 11:12:49.497531 soap_transport_http: read line of 29 bytes: X-AspNet-Version: 2.0.50727 2009-11-15 11:12:49.497860 soap_transport_http: read line of 35 bytes: Cache-Control: private, max-age=0 2009-11-15 11:12:49.498177 soap_transport_http: read line of 39 bytes: Content-Type: text/xml; charset=utf-8 2009-11-15 11:12:49.498494 soap_transport_http: read line of 23 bytes: Content-Length: 29778 2009-11-15 11:12:49.498825 soap_transport_http: read line of 2 bytes: 2009-11-15 11:12:49.499211 soap_transport_http: found end of headers after length 251 2009-11-15 11:12:49.499648 soap_transport_http: want to read content of length 29778 <<<<<<<<<<<<<< Data received 29,778 B 2009-11-15 11:12:49.500080 soap_transport_http: read buffer of 3969 bytes 2009-11-15 11:12:49.550862 soap_transport_http: read buffer of 2760 bytes 2009-11-15 11:12:49.551665 soap_transport_http: read to EOF 2009-11-15 11:12:49.551984 soap_transport_http: read body of length 6729 <<<<<<<<<<<<<< data read much less than 29,778 B 2009-11-15 11:12:49.552329 soap_transport_http: received a total of 6980 bytes of data from server 2009-11-15 11:12:49.552910 soap_transport_http: closed socket 2009-11-15 11:12:49.553266 soap_transport_http: No Content-Encoding header 2009-11-15 11:12:49.553603 soap_transport_http: end of send() 2009-11-15 11:12:49.553950 soapclientNusoap: got response, length=6729 type=text/xml; charset=utf-8 2009-11-15 11:12:49.554268 soapclientNusoap: Entering parseResponse() for data of length 6729 and type text/xml; charset=utf-8 2009-11-15 11:12:49.554619 soapclientNusoap: Got response encoding: utf-8 2009-11-15 11:12:49.555015 soapclientNusoap: Use encoding: UTF-8 when creating soap_parser 2009-11-15 11:12:49.555648 soap_parser: Charset from HTTP Content-Type matches encoding from XML declaration 2009-11-15 11:12:49.555967 soap_parser: Entering soap_parser(), length=6729, encoding=UTF-8 2009-11-15 11:12:49.556838 soap_parser: found root struct GetToysResponse, pos 2 .. 2009-11-15 11:12:49.592188 soap_parser: XML error parsing SOAP payload on line 1: Invalid document end 2009-11-15 11:12:49.592534 soap_parser: XML payload:... ... 2009-11-15 11:12:49.593503 soapclientNusoap: Error: XML error parsing SOAP payload on line 1: Invalid document end </pre> nusoap.php getResponse() .... .. while (($strlen < $content_length) && (!feof($this->fp))) { echo "<br><br>loop count $loopCount"; echo "<br> top strlen $strlen"; $readlen = min(8192, $content_length - $strlen); $tmp = fread($this->fp, $readlen); $tmplen = strlen($tmp); $this->debug("read buffer of $tmplen bytes"); usleep(250000); # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $this->debug("$tmp"); if (($tmplen == 0) && (!feof($this->fp))) { $this->incoming_payload = $data; $this->debug('socket read of body timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of body timed out'); return false; } $strlen += $tmplen; $data .= $tmp; .... Here's the successful result when the usleep is added: 2009-11-15 11:30:03.923987 soapclientNusoap: transporting via HTTP 2009-11-15 11:30:03.927135 soapclientNusoap: sending message, length=904 2009-11-15 11:30:03.924362 soap_transport_http: scheme = http 2009-11-15 11:30:03.924740 soap_transport_http: host = toywebservices.com 2009-11-15 11:30:03.925052 soap_transport_http: path = /toywebservice/toywebservice.asmx 2009-11-15 11:30:03.925363 soap_transport_http: query = WSDL 2009-11-15 11:30:03.925771 soap_transport_http: set Host: toywebservices.com 2009-11-15 11:30:03.926142 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:30:03.926469 soap_transport_http: set Content-Type: text/xml; charset=UTF-8 2009-11-15 11:30:03.926817 soap_transport_http: set SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:30:03.927473 soap_transport_http: entered send() soapclientsoap with data of length: 904 2009-11-15 11:30:03.927840 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host toywebservices.com, port 80 2009-11-15 11:30:03.928155 soap_transport_http: calling fsockopen with host toywebservices.com connection_timeout 0 2009-11-15 11:30:03.972269 soap_transport_http: set response timeout to 30 2009-11-15 11:30:03.972654 soap_transport_http: socket connected 2009-11-15 11:30:03.972983 soap_transport_http: set Content-Length: 904 2009-11-15 11:30:03.973304 soap_transport_http: HTTP request: POST /toywebservice/toywebservice.asmx?WSDL HTTP/1.0 2009-11-15 11:30:03.973642 soap_transport_http: HTTP header: Host: toywebservices.com 2009-11-15 11:30:03.973962 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:30:03.974281 soap_transport_http: HTTP header: Content-Type: text/xml; charset=UTF-8 2009-11-15 11:30:03.974611 soap_transport_http: HTTP header: SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:30:03.974930 soap_transport_http: HTTP header: Content-Length: 904 2009-11-15 11:30:03.975299 soap_transport_http: wrote data to socket, length = 1178 2009-11-15 11:30:04.384516 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2009-11-15 11:30:04.384917 soap_transport_http: read line of 19 bytes: Connection: close 2009-11-15 11:30:04.385237 soap_transport_http: read line of 37 bytes: Date: Sun, 15 Nov 2009 17:30:03 GMT 2009-11-15 11:30:04.385955 soap_transport_http: read line of 27 bytes: Server: Microsoft-IIS/6.0 2009-11-15 11:30:04.386273 soap_transport_http: read line of 23 bytes: X-Powered-By: ASP.NET 2009-11-15 11:30:04.386593 soap_transport_http: read line of 29 bytes: X-AspNet-Version: 2.0.50727 2009-11-15 11:30:04.386975 soap_transport_http: read line of 35 bytes: Cache-Control: private, max-age=0 2009-11-15 11:30:04.387428 soap_transport_http: read line of 39 bytes: Content-Type: text/xml; charset=utf-8 2009-11-15 11:30:04.387896 soap_transport_http: read line of 23 bytes: Content-Length: 29778 2009-11-15 11:30:04.388216 soap_transport_http: read line of 2 bytes: 2009-11-15 11:30:04.388597 soap_transport_http: found end of headers after length 251 2009-11-15 11:30:04.389030 soap_transport_http: want to read content of length 29778 <<<<<<<<<<<<< Data is 29.778 Bytes 2009-11-15 11:30:04.389484 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:04.629347 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:04.879362 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:05.129402 soap_transport_http: read buffer of 5202 bytes 2009-11-15 11:30:05.379715 soap_transport_http: read to EOF 2009-11-15 11:30:05.380081 soap_transport_http: read body of length 29778 <<<<<<<<<<<<< Read all 29.778 Bytes 2009-11-15 11:30:05.380486 soap_transport_http: received a total of 30029 bytes of data from server 2009-11-15 11:30:05.380933 soap_transport_http: closed socket 2009-11-15 11:30:05.381278 soap_transport_http: No Content-Encoding header 2009-11-15 11:30:05.381613 soap_transport_http: end of send() 2009-11-15 11:30:05.381998 soapclientNusoap: got response, length=29778 type=text/xml; charset=utf-8 2009-11-15 11:30:05.382317 soapclientNusoap: Entering parseResponse() for data of length 29778 and type text/xml; charset=utf-8 2009-11-15 11:30:05.382654 soapclientNusoap: Got response encoding: utf-8 2009-11-15 11:30:05.383051 soapclientNusoap: Use encoding: UTF-8 when creating soap_parser 2009-11-15 11:30:05.383689 soap_parser: Charset from HTTP Content-Type matches encoding from XML declaration 2009-11-15 11:30:05.384006 soap_parser: Entering soap_parser(), length=29778, encoding=UTF-8 2009-11-15 11:30:05.384975 soap_parser: found root struct GetToysResponse, pos 2 ... .. 2009-11-15 11:30:05.543380 soap_parser: in buildVal, adding Java Vector GetToysResponse 2009-11-15 11:30:05.543746 soap_parser: parsed successfully, found root struct: 2 of name GetToysResponse 2009-11-15 11:30:05.546637 soapclientNusoap: sent message successfully and got a(n) array return=array(1) { .. ... Does anyone know the fix for this issue? I could leave the usleep in place, I'm just afraid that this is just a hack and not a valid fix. Thanks, Jas
    What steps will reproduce the problem? 1. Client sends soap request to server 2. Client receives soap data 3. Client receives EOF before processing all of http content-length bytes. What is the expected output? What do you see instead? All content-length bytes shall be received. What version of the product are you using? On what operating system? nusoap-for-php5 (0.9) PHP 5.2.11 Windows Server 2008 Please provide any additional information below. NuSoap experts, I'm moving my website, powered by PHP, from a Linux server to a Windows Server 2008 server. My website uses nusoap for XML web services. One of my scripts which run perfectly on the linux server, is failing on the windows server. On the windows server, the nusoap is failing to receive all data. For example, if 29,778 is expected from the SOAP server, only 6,729 bytes are being received by the client on the windows server before EOF. The feof() function call in nusoap getResponse() (around line number 2656) is detecting EOF prematurely before reading all the data. If I add a "usleep(250000)" after each "fread()" in nusoap.php getResponse() as shown below, all data is received as expected. I've added some debugging and determined that the feof() which is returning true is the feof in the while loop on line 2655 of nusoap.php in getResponse(). The following is the debug info for nusoap 0.7.2 (actually is google's nusoap for php5 - 0.9). Note the content-length and the length of data actually read on the socket before EOF. ... 2009-11-15 11:12:49.194406 soapclientNusoap: transporting via HTTP 2009-11-15 11:12:49.197422 soapclientNusoap: sending message, length=904 2009-11-15 11:12:49.194785 soap_transport_http: scheme = http 2009-11-15 11:12:49.195125 soap_transport_http: host = toywebservices.com 2009-11-15 11:12:49.195435 soap_transport_http: path = /toywebservice/toywebservice.asmx 2009-11-15 11:12:49.195755 soap_transport_http: query = WSDL 2009-11-15 11:12:49.196101 soap_transport_http: set Host: toywebservices.com 2009-11-15 11:12:49.196447 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:12:49.196784 soap_transport_http: set Content-Type: text/xml; charset=UTF-8 2009-11-15 11:12:49.197104 soap_transport_http: set SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:12:49.197770 soap_transport_http: entered send() soapclientsoap with data of length: 904 2009-11-15 11:12:49.198106 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host toywebservices.com, port 80 2009-11-15 11:12:49.198420 soap_transport_http: calling fsockopen with host toywebservices.com connection_timeout 0 2009-11-15 11:12:49.248629 soap_transport_http: set response timeout to 30 2009-11-15 11:12:49.249045 soap_transport_http: socket connected 2009-11-15 11:12:49.249386 soap_transport_http: set Content-Length: 904 2009-11-15 11:12:49.249723 soap_transport_http: HTTP request: POST /toywebservice/toywebservice.asmx?WSDL HTTP/1.0 2009-11-15 11:12:49.250047 soap_transport_http: HTTP header: Host: toywebservices.com 2009-11-15 11:12:49.250644 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:12:49.250870 soap_transport_http: HTTP header: Content-Type: text/xml; charset=UTF-8 2009-11-15 11:12:49.251095 soap_transport_http: HTTP header: SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:12:49.251322 soap_transport_http: HTTP header: Content-Length: 904 2009-11-15 11:12:49.251600 soap_transport_http: wrote data to socket, length = 1178 2009-11-15 11:12:49.495428 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2009-11-15 11:12:49.496245 soap_transport_http: read line of 19 bytes: Connection: close 2009-11-15 11:12:49.496577 soap_transport_http: read line of 37 bytes: Date: Sun, 15 Nov 2009 17:12:48 GMT 2009-11-15 11:12:49.496896 soap_transport_http: read line of 27 bytes: Server: Microsoft-IIS/6.0 2009-11-15 11:12:49.497215 soap_transport_http: read line of 23 bytes: X-Powered-By: ASP.NET 2009-11-15 11:12:49.497531 soap_transport_http: read line of 29 bytes: X-AspNet-Version: 2.0.50727 2009-11-15 11:12:49.497860 soap_transport_http: read line of 35 bytes: Cache-Control: private, max-age=0 2009-11-15 11:12:49.498177 soap_transport_http: read line of 39 bytes: Content-Type: text/xml; charset=utf-8 2009-11-15 11:12:49.498494 soap_transport_http: read line of 23 bytes: Content-Length: 29778 2009-11-15 11:12:49.498825 soap_transport_http: read line of 2 bytes: 2009-11-15 11:12:49.499211 soap_transport_http: found end of headers after length 251 2009-11-15 11:12:49.499648 soap_transport_http: want to read content of length 29778 <<<<<<<<<<<<<< Data received 29,778 B 2009-11-15 11:12:49.500080 soap_transport_http: read buffer of 3969 bytes 2009-11-15 11:12:49.550862 soap_transport_http: read buffer of 2760 bytes 2009-11-15 11:12:49.551665 soap_transport_http: read to EOF 2009-11-15 11:12:49.551984 soap_transport_http: read body of length 6729 <<<<<<<<<<<<<< data read much less than 29,778 B 2009-11-15 11:12:49.552329 soap_transport_http: received a total of 6980 bytes of data from server 2009-11-15 11:12:49.552910 soap_transport_http: closed socket 2009-11-15 11:12:49.553266 soap_transport_http: No Content-Encoding header 2009-11-15 11:12:49.553603 soap_transport_http: end of send() 2009-11-15 11:12:49.553950 soapclientNusoap: got response, length=6729 type=text/xml; charset=utf-8 2009-11-15 11:12:49.554268 soapclientNusoap: Entering parseResponse() for data of length 6729 and type text/xml; charset=utf-8 2009-11-15 11:12:49.554619 soapclientNusoap: Got response encoding: utf-8 2009-11-15 11:12:49.555015 soapclientNusoap: Use encoding: UTF-8 when creating soap_parser 2009-11-15 11:12:49.555648 soap_parser: Charset from HTTP Content-Type matches encoding from XML declaration 2009-11-15 11:12:49.555967 soap_parser: Entering soap_parser(), length=6729, encoding=UTF-8 2009-11-15 11:12:49.556838 soap_parser: found root struct GetToysResponse, pos 2 .. 2009-11-15 11:12:49.592188 soap_parser: XML error parsing SOAP payload on line 1: Invalid document end 2009-11-15 11:12:49.592534 soap_parser: XML payload:... ... 2009-11-15 11:12:49.593503 soapclientNusoap: Error: XML error parsing SOAP payload on line 1: Invalid document end </pre> nusoap.php getResponse() .... .. while (($strlen < $content_length) && (!feof($this->fp))) { echo "<br><br>loop count $loopCount"; echo "<br> top strlen $strlen"; $readlen = min(8192, $content_length - $strlen); $tmp = fread($this->fp, $readlen); $tmplen = strlen($tmp); $this->debug("read buffer of $tmplen bytes"); usleep(250000); # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $this->debug("$tmp"); if (($tmplen == 0) && (!feof($this->fp))) { $this->incoming_payload = $data; $this->debug('socket read of body timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of body timed out'); return false; } $strlen += $tmplen; $data .= $tmp; .... Here's the successful result when the usleep is added: 2009-11-15 11:30:03.923987 soapclientNusoap: transporting via HTTP 2009-11-15 11:30:03.927135 soapclientNusoap: sending message, length=904 2009-11-15 11:30:03.924362 soap_transport_http: scheme = http 2009-11-15 11:30:03.924740 soap_transport_http: host = toywebservices.com 2009-11-15 11:30:03.925052 soap_transport_http: path = /toywebservice/toywebservice.asmx 2009-11-15 11:30:03.925363 soap_transport_http: query = WSDL 2009-11-15 11:30:03.925771 soap_transport_http: set Host: toywebservices.com 2009-11-15 11:30:03.926142 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:30:03.926469 soap_transport_http: set Content-Type: text/xml; charset=UTF-8 2009-11-15 11:30:03.926817 soap_transport_http: set SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:30:03.927473 soap_transport_http: entered send() soapclientsoap with data of length: 904 2009-11-15 11:30:03.927840 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host toywebservices.com, port 80 2009-11-15 11:30:03.928155 soap_transport_http: calling fsockopen with host toywebservices.com connection_timeout 0 2009-11-15 11:30:03.972269 soap_transport_http: set response timeout to 30 2009-11-15 11:30:03.972654 soap_transport_http: socket connected 2009-11-15 11:30:03.972983 soap_transport_http: set Content-Length: 904 2009-11-15 11:30:03.973304 soap_transport_http: HTTP request: POST /toywebservice/toywebservice.asmx?WSDL HTTP/1.0 2009-11-15 11:30:03.973642 soap_transport_http: HTTP header: Host: toywebservices.com 2009-11-15 11:30:03.973962 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.2 (1.94) 2009-11-15 11:30:03.974281 soap_transport_http: HTTP header: Content-Type: text/xml; charset=UTF-8 2009-11-15 11:30:03.974611 soap_transport_http: HTTP header: SOAPAction: &quot;http://toywebservices.com/toywebservice/GetToys&quot; 2009-11-15 11:30:03.974930 soap_transport_http: HTTP header: Content-Length: 904 2009-11-15 11:30:03.975299 soap_transport_http: wrote data to socket, length = 1178 2009-11-15 11:30:04.384516 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2009-11-15 11:30:04.384917 soap_transport_http: read line of 19 bytes: Connection: close 2009-11-15 11:30:04.385237 soap_transport_http: read line of 37 bytes: Date: Sun, 15 Nov 2009 17:30:03 GMT 2009-11-15 11:30:04.385955 soap_transport_http: read line of 27 bytes: Server: Microsoft-IIS/6.0 2009-11-15 11:30:04.386273 soap_transport_http: read line of 23 bytes: X-Powered-By: ASP.NET 2009-11-15 11:30:04.386593 soap_transport_http: read line of 29 bytes: X-AspNet-Version: 2.0.50727 2009-11-15 11:30:04.386975 soap_transport_http: read line of 35 bytes: Cache-Control: private, max-age=0 2009-11-15 11:30:04.387428 soap_transport_http: read line of 39 bytes: Content-Type: text/xml; charset=utf-8 2009-11-15 11:30:04.387896 soap_transport_http: read line of 23 bytes: Content-Length: 29778 2009-11-15 11:30:04.388216 soap_transport_http: read line of 2 bytes: 2009-11-15 11:30:04.388597 soap_transport_http: found end of headers after length 251 2009-11-15 11:30:04.389030 soap_transport_http: want to read content of length 29778 <<<<<<<<<<<<< Data is 29.778 Bytes 2009-11-15 11:30:04.389484 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:04.629347 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:04.879362 soap_transport_http: read buffer of 8192 bytes 2009-11-15 11:30:05.129402 soap_transport_http: read buffer of 5202 bytes 2009-11-15 11:30:05.379715 soap_transport_http: read to EOF 2009-11-15 11:30:05.380081 soap_transport_http: read body of length 29778 <<<<<<<<<<<<< Read all 29.778 Bytes 2009-11-15 11:30:05.380486 soap_transport_http: received a total of 30029 bytes of data from server 2009-11-15 11:30:05.380933 soap_transport_http: closed socket 2009-11-15 11:30:05.381278 soap_transport_http: No Content-Encoding header 2009-11-15 11:30:05.381613 soap_transport_http: end of send() 2009-11-15 11:30:05.381998 soapclientNusoap: got response, length=29778 type=text/xml; charset=utf-8 2009-11-15 11:30:05.382317 soapclientNusoap: Entering parseResponse() for data of length 29778 and type text/xml; charset=utf-8 2009-11-15 11:30:05.382654 soapclientNusoap: Got response encoding: utf-8 2009-11-15 11:30:05.383051 soapclientNusoap: Use encoding: UTF-8 when creating soap_parser 2009-11-15 11:30:05.383689 soap_parser: Charset from HTTP Content-Type matches encoding from XML declaration 2009-11-15 11:30:05.384006 soap_parser: Entering soap_parser(), length=29778, encoding=UTF-8 2009-11-15 11:30:05.384975 soap_parser: found root struct GetToysResponse, pos 2 ... .. 2009-11-15 11:30:05.543380 soap_parser: in buildVal, adding Java Vector GetToysResponse 2009-11-15 11:30:05.543746 soap_parser: parsed successfully, found root struct: 2 of name GetToysResponse 2009-11-15 11:30:05.546637 soapclientNusoap: sent message successfully and got a(n) array return=array(1) { .. ... Does anyone know the fix for this issue? I could leave the usleep in place, I'm just afraid that this is just a hack and not a valid fix. Thanks, Jas
  • Apr 21, 2009
    issue 3 (Identifying client address by server) reported by samudayan   -   I have a question regarding a identifying the client by server. When I write a simple helloworld server and client codes all wsdl and other functions are working. But I want to identify the requesting client in server code and respond (To set in return value in hellowold function) that client address back to client. Please help me to solve this. My nusoap.php in lib folder and all code in 'http://localhost/services/' Cleint code: require_once('./lib/nusoap.php'); $client = new nusoap_client('http://localhost/services/server.php?wsdl' 'true'); echo $result = $client->call('helloworld'); Server code: (server.php) require_once('lib/nusoap.php'); $server = new soap_server(); $server->configureWSDL('hellowsdl','urn:hellowsdl'); $server->register('helloworld', array('name' = 'xsd:string'), array('return' = 'xsd:string'), 'urn:hellowsdl', 'urn:hellowsdl#hello', 'rpc', 'encoded', 'Says hello to the caller' ); function helloworld() { return "Hi, "; // I want to return requester(Client) address (Ip or url) here.................. // Return (This is your address.............) } $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA);
    I have a question regarding a identifying the client by server. When I write a simple helloworld server and client codes all wsdl and other functions are working. But I want to identify the requesting client in server code and respond (To set in return value in hellowold function) that client address back to client. Please help me to solve this. My nusoap.php in lib folder and all code in 'http://localhost/services/' Cleint code: require_once('./lib/nusoap.php'); $client = new nusoap_client('http://localhost/services/server.php?wsdl' 'true'); echo $result = $client->call('helloworld'); Server code: (server.php) require_once('lib/nusoap.php'); $server = new soap_server(); $server->configureWSDL('hellowsdl','urn:hellowsdl'); $server->register('helloworld', array('name' = 'xsd:string'), array('return' = 'xsd:string'), 'urn:hellowsdl', 'urn:hellowsdl#hello', 'rpc', 'encoded', 'Says hello to the caller' ); function helloworld() { return "Hi, "; // I want to return requester(Client) address (Ip or url) here.................. // Return (This is your address.............) } $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA);

Older

  • Oct 25, 2008
    issue 2 (Status of NuSoap and PHP5) reported by 1f6xum...@sneakemail.com   -   The version of nusoap associated with this project is 0.7.2. The SourceForge NuSoap project was updated to 0.7.3 and the classname was changed to nusoap_client. The NuSoap version provided with this project is older and missing some of the v0.7.3 improvements, but it also has changes specific to the SensAPIlity project. So anyone looking for a vanilla NuSoap for PHP5 will find 0.7.3 from SourceForge "should" work - at least PHP5 won't be the source of issues. And at some point someone might want to pull over 0.7.3 and add the hooks needed for SensAPIlity. Silly me was just porting the UTF-8 and other changes from this project into the 0.7.3 baseline, but unless you change your code to use nusoap_client rather than soapclientNusoap, you wouldn't be able to use it anyway. And seeing these projects here are a bit old, I'm not sure anyone would care about the mods, so I'm dropping the changes. Oh well.
    The version of nusoap associated with this project is 0.7.2. The SourceForge NuSoap project was updated to 0.7.3 and the classname was changed to nusoap_client. The NuSoap version provided with this project is older and missing some of the v0.7.3 improvements, but it also has changes specific to the SensAPIlity project. So anyone looking for a vanilla NuSoap for PHP5 will find 0.7.3 from SourceForge "should" work - at least PHP5 won't be the source of issues. And at some point someone might want to pull over 0.7.3 and add the hooks needed for SensAPIlity. Silly me was just porting the UTF-8 and other changes from this project into the 0.7.3 baseline, but unless you change your code to use nusoap_client rather than soapclientNusoap, you wouldn't be able to use it anyway. And seeing these projects here are a bit old, I'm not sure anyone would care about the mods, so I'm dropping the changes. Oh well.
  • Sep 09, 2008
    issue 1 (Call to undefined method soapclientnusoap::) commented on by varsityjim   -   Forgot to add. After looking up possible reasons for the error, some suggested making sure the correct number of parameters. Here's the code in my script: $results = $productClient->retrieveLatestTransactions(array( "developerKey" => $key, "websiteIds" => '', "lookBackXHours" => $lookBackXHours, "advertiserIds" => '', "countries" => '', "adIds" => '', "includeDetails" => $includeDetails, "sortBy" => Date, "sortOrder" => Desc )); and here's the info from https://rtpubcommission.api.cj.com/wsdl/version2/realtimeCommissionService.wsdl - <xsd:element name="retrieveLatestTransactions"> - <xsd:complexType> - <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="developerKey" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="websiteIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="lookBackXHours" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="advertiserIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="countries" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="adIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="includeDetails" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="sortBy" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="sortOrder" nillable="true" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>
    Forgot to add. After looking up possible reasons for the error, some suggested making sure the correct number of parameters. Here's the code in my script: $results = $productClient->retrieveLatestTransactions(array( "developerKey" => $key, "websiteIds" => '', "lookBackXHours" => $lookBackXHours, "advertiserIds" => '', "countries" => '', "adIds" => '', "includeDetails" => $includeDetails, "sortBy" => Date, "sortOrder" => Desc )); and here's the info from https://rtpubcommission.api.cj.com/wsdl/version2/realtimeCommissionService.wsdl - <xsd:element name="retrieveLatestTransactions"> - <xsd:complexType> - <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="developerKey" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="websiteIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="lookBackXHours" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="advertiserIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="countries" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="adIds" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="includeDetails" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="sortBy" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="1" name="sortOrder" nillable="true" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>
  • Sep 09, 2008
    issue 1 (Call to undefined method soapclientnusoap::) reported by varsityjim   -   What steps will reproduce the problem? 1. copy nusoap for php5 directories to website 2. add the include for nusoap.php 3. run page that used to work with SOAP What is the expected output? What do you see instead? I expect it to work as it used to with SOAP. My webhost (Dreamhost) upgraded and stopped supporting SOAP. It worked before pulling from Commission Junction's web service. What version of the product are you using? On what operating system? nusoap-php5-0.9 Dreamhost shared hosting Unix (not sure which) Please provide any additional information below. I get the following error when running my script: Fatal error: Call to undefined method soapclientNusoap::retrieveLatestTransactions() in /home/.tyg/(home)/ (file).php on line 96
    What steps will reproduce the problem? 1. copy nusoap for php5 directories to website 2. add the include for nusoap.php 3. run page that used to work with SOAP What is the expected output? What do you see instead? I expect it to work as it used to with SOAP. My webhost (Dreamhost) upgraded and stopped supporting SOAP. It worked before pulling from Commission Junction's web service. What version of the product are you using? On what operating system? nusoap-php5-0.9 Dreamhost shared hosting Unix (not sure which) Please provide any additional information below. I get the following error when running my script: Fatal error: Call to undefined method soapclientNusoap::retrieveLatestTransactions() in /home/.tyg/(home)/ (file).php on line 96