misc classes for SOAP

Hi!

I'm trying to write an application using Flex/SOAP interfaces. And I need to determine some interchange classes which will be used during SOAP requests and responses.

E.g. I have SOAP method login() in my controller that accepts authinfo class instance representing user's authentication information.

Where should I store that class definition? Should it be some kind of model? Or maybe a component? What if I only need it to specify its fields and no logic is required?

Did you check the phonebook demo?

Quote

Did you check the phonebook demo?

I definitely did. But nothing there has anything to do with my question as far as I can judge.

In the phonebook demo, the 'Contact' class is used for communication between Flex and PHP. Notice that 'Contact' is declared in 'classMap' in the CWebServiceAction in SiteController.

Yes I noticed all that. But it doesn't help. You see Contact is a model, its file Contact.php is stored in models directory.

I am not going to create models. I only need to define miscellaneous class that will represent some data structure used only in that SOAP interchange. Well, for example:



class AuthInfo {


	/**


	 * @var string login


	 * @soap


	 */


	public $login;


	/**


	 * @var string password


	 * @soap


	 */


	public $password;


}


That is enough for me.

It doesn't have to be model. Your class should be fine.

Could you please advise where to store this class definition file? This was the main question actually  ::)

You can save it in "models". Actually, as long as the class can be autoloaded, it should be fine.