Reply to large return array => XML error parsing SOAP payload on line 1: unclosed token

Your name:

Reply:


Posted by Marc van Boven on 10/10/05 17:34

I'm stuck with the following problem:

My nusoap-client calls a server-function giveCombination(). The
function giveCombination should return something like

array(
[0] => array(
'a_id' => 6,
'b_id' => 9,
'c_id' => 3,
'd_id' => 43,
'a' => 'test',
'b' => 'exb',
'c' => 'exc',
'd' => 'sdfkjh'

)
[1] => array(
etc..
)
)

Now, this return-array grows quite large. Growing beyond 15
combinations nusoaps' returned value is false and nusoap gives the
error: "XML error parsing SOAP payload on line 1: unclosed token"

Indeed, the client->resonse ends like:
"></ns1:giveCominationResponse></SOAP-ENV:Body></SOAP-ENV:Envelope"

This only happens when the return-array is counts more then 15. When I
manually limit the return-array, the data is being recieved normally by
the client. Now the 16th enty does NOT contain any strange characters.

The function giveCombination is registered like
$server->register('giveCombination',
array(),
array('return' => 'tns:xCombinations'),
'urn:myserver',
'urn:myserver#giveCombination',
'rpc',
'encoded',
'no comment'
);

and

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

$server->wsdl->addComplexType(
'xCombination',
'complexType',
'struct',
'all',
'',
array(
'a_id' => array('name' => 'a_id', 'type' => 'xsd:int'),
'b_id' => array('name' => 'b_id', 'type' => 'xsd:int'),
'c_id' => array('name' => 'c_id', 'type' => 'xsd:int'),
'd_id' => array('name' => 'd_id', 'type' => 'xsd:int'),
'a' => array('name' => 'a', 'type' => 'xsd:string'),
'b' => array('name' => 'b', 'type' => 'xsd:string'),
'c' => array('name' => 'c', 'type' => 'xsd:string'),
'd' => array('name' => 'd', 'type' => 'xsd:string')
)
);

Anyone any ideas how to solve my problem, any suggestions where to look
for?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация