Has anyone successfully used NuSOAP+ComplexTypes+Flash before? I set up a NuSOAP service that has one complexType that is a struct, and another that is an array of that struct. These all work fine with a NuSOAP client (http://memist.com/hitorshit/client.php), but with Flash it is a different story.
In Flash I create the WebServiceConnector and make the soap call. This works fine for an echoString operation that takes and returns an xsd:string, but it seems to get confused when I call the operations that use complexTypes. When I get a result, I parse it into XML. Flash returns that it is an xml, but I can't traverse it or get any information about it.
Does this sound familiar to anyone?
Here are the ComplexTypes that I define:
$server->wsdl->addComplexType(
'MediaItem',
'complexType',
'struct',
'all',
'',
array(
'id' => array('name'=>'page','type'=>'xsd:int'),
'url' => array('name'=>'title','type'=>'xsd:string'),
'title' => array('name'=>'title','type'=>'xsd:string'),
'mediatype' => array('name'=>'title','type'=>'xsd:string'),
'genre' => array('name'=>'title','type'=>'xsd:string'),
'startTime' => array('name'=>'page','type'=>'xsd:int'),
'playLength' => array('name'=>'page','type'=>'xsd:int'),
'album' => array('name'=>'title','type'=>'xsd:string')
)
);
$server->wsdl->addComplexType(
'ArrayOfMediaItem',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'MediaItem[]')),
'MediaItem'
);
|