NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Maximum size of array that nusoap can return


Joined: 05 Dec 2006
Posts: 3
Reply with quote
Hello,

I have a function that returns 2-d array of strings. It times out when array gets too big. When I view the server debug note, it does return correct value and I guess in the process of serializing the returned array and posting it back to client, it timesout.

my return type is defined:

Code:
      $server->addComplexType('ArrayOfStrings',
                                          'complexType',
                                          'array',
                                          'sequence',
                                          'SOAP-ENC:Array',
                                          array(),
                                          array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')),
                                          'xsd:string'
        );


      $server->addComplexType('ResultArray',
                                          'complexType',
                                          'array',
                                          'sequence',
                                          'SOAP-ENC:Array',
                                          array(),
                                          array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:ArrayOfStrings[]')),
                                          'tns:ArrayOfStrings'
        );


My question is whether above return type declaration is correct and whether nusoap has limit on size of array that can be returned. I have no problem returning huge string and huge binary data. Only array return type fails.

Thanks


Last edited by pL3oO on Thu Dec 07, 2006 10:20 am; edited 1 time in total
View user's profileFind all posts by pL3oOSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
It's not clear what times out. Is it php or network socket or something else?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Dec 2006
Posts: 3
Reply with quote
It times out on below lines:

Code:

      $tmp = fgets($this->fp, 256);
      $tmplen = strlen($tmp);


Those two lines are in getResponse function of soap_transport_http class.
View user's profileFind all posts by pL3oOSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
would please tell me what time out message was given?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Dec 2006
Posts: 3
Reply with quote
The message I got was :
Code:

2006-12-09 17:02:15.053134 soap_transport_http: HTTP header: Content-Length: 661
2006-12-09 17:02:15.053234 soap_transport_http: wrote data to socket, length = 910
2006-12-09 17:03:15.043907 soap_transport_http: read line of 0 bytes:
2006-12-09 17:03:15.044008 soap_transport_http: socket read of headers timed out after length 0
2006-12-09 17:03:15.044054 soap_transport_http: read before timeout:

2006-12-09 17:03:15.044109 soap_transport_http: end of send()
2006-12-09 17:03:15.044274 soapclient: Error: HTTP Error: socket read of headers timed out


I also printed out server->response to see if response was generated and it did indeed have 60meg worth of xml generated from 2mb of array contents.
View user's profileFind all posts by pL3oOSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
You may want to increase timeout values.
Looke like you have 60 seconds:
2006-12-09 17:02:15.053234 soap_transport_http: wrote data to socket, length = 910
2006-12-09 17:03:15.043907 soap_transport_http: read line of 0 bytes

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Maximum size of array that nusoap can return
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic