0

Hi everybody,

Wondering if you could give me some help with an error I have with NuSoap and my C# .NET project.

I am trying to return an array of arrays from my PHP NuSoap Web Service to my .NET application.

My PHP Code:

 $server->wsdl->addComplexType(
     'GraphData', 'complexType', 'struct', 'all', '', array(
       'xPoints' => array('name' => 'xPoints', 'type' => 'xsd:int[]'),
       'yPoints' => array('name' => 'yPoints', 'type' => 'xsd:int[]'),
       'zPoints' => array('name' => 'zPoints', 'type' => 'xsd:int[]'),
     )
 );

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

 function GetGraphData($HorseId) {
   $horseData = array();
   $horseData[0] = array(
         "zPoints" => array(1, 2, 3),
         "xPoints" => array(4, 5, 6),
         "yPoints" => array(7, 8, 9)
   );

      $horseData[1] = array(
         "zPoints" => array(11, 22, 33),
         "xPoints" => array(44, 55, 66),
         "yPoints" => array(77, 88, 99)
   );
 }

 $server->register(
     'GetGraphData', array('HorseId' => 'xsd:int'), array('return' => 'tns:GraphDataArray'), $namespace, false, 'rpc', false, 'Gets graph data');

And the error it gives when I try to update my WebReference: Click Here

Any advice would be greatly appreciated, hopefully it's something simple!

Many thanks!

~ AWSLC

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.