By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,712 Members | 1,591 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,712 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?

Oct 10 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.