Hi,
I’m evaluating Yii 1.1.3 for use in a SOA project and am having problems with complex (or composite) types. I have read other posts about this matter, but cannot seem to find a solution. I have also read this documentation page on the topic, but am still having problems. Here’s what I have:
<?
require_once('includes/dbaccess.php');
require_once('includes/test.php');
class WriteController extends CController
{
public function actions()
{
return array(
'methods' => array(
'class' => 'CWebServiceAction',
'classMap' => array(
'TestClass' => 'TestClass',
),
),
);
}
/**
* method: submit_captured_data
* Submits some arbitrary captured data.
* Returns true.
*
* @param TestClass[] captured_data An array of captured data.
* @return TestClass[] Testing testing testing.
* @soap
*/
public function submit_captured_data($captured_data)
{
$retval = $captured_data;
return $retval;
}
...
My includes/test.php looks like this:
<?
class TestClass
{
/*
* @var string
* @soap
*/
public $param1;
/*
* @var string
* @soap
*/
public $param2;
}
?>
The composite type TestData is not properly generated in the WSDL (no param1 and param2 of type string):
...
<xsd:schema targetNamespace="urn:WriteControllerwsdl">
<xsd:complexType name="TestClassArray">
<xsd:complexContent>
<xsd:restriction base="soap-enc:Array">
<xsd:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:TestClass[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="TestClass">
<xsd:all/>
</xsd:complexType>
...
Any help would be really appreciated.
Thanks in advance.