SOAP - Class Mapping

Hello,

on docs we have a little example:




class PostController extends CController

{

    public function actions()

    {

        return array(

            'service'=>array(

                'class'=>'CWebServiceAction',

                'classMap'=>array(

                    'Post'=>'Post',  // 

                ),

            ),

        );



and I do something like this:




                'classMap' => array(

                    'File', // setup mapping

                ),

...

...

...

      /**

     * Returns all predictions.

     * @return File[] the members records

     * @soap

     */

    public function getPredictions() {

        return File::model()->findAll(); // returns 3 rec.

    }



returned XML:




...

    <SOAP-ENV:Body>

        <ns1:getPredictionsResponse>

            <return SOAP-ENC:arrayType="ns1:File[3]" xsi:type="ns1:FileArray">

                <item xsi:type="ns1:File"/>

                <item xsi:type="ns1:File"/>

                <item xsi:type="ns1:File"/>

            </return>

        </ns1:getPredictionsResponse>

    </SOAP-ENV:Body>



but <item xsi:type="ns1:File"/> is EMPTY, what is wrong for my code?

Thanks!

You have to adapt the model e.g. like I did here.

/Tommy

thanks a lot!