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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc van Boven

    #1

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

    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:giveCominat ionResponse></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('give Combination',
    array(),
    array('return' => 'tns:xCombinati ons'),
    'urn:myserver',
    'urn:myserver#g iveCombination' ,
    'rpc',
    'encoded',
    'no comment'
    );

    and

    $server->wsdl->addComplexType (
    'xCombinations' ,
    'complexType',
    'array',
    '',
    'SOAP-ENC:Array',
    array(),
    array(array('re f'=>'SOAP-ENC:arrayType', 'wsdl:arrayType '=>'tns:xCombin ation[]')),
    '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?

Working...