how to post search via webservice

i want to query sth via webservice,now i can got the data,but i dont know how to render the search form in view file,here is my controller code:


		$arrOptions=array(

		'uri'=>'http://localhost/shop',

		'location'=>'http://localhost/shop/soap/get.php', 

		'trace'=>true,

		);

		$soapObject = new SoapClient(null,$arrOptions);

		$retData = $soapObject->search_goods_with_name('');

		$goodsDataProvider = new CArrayDataProvider($retData['info']);

and my view code:


<div class="search-form">

<?php $this->renderPartial('_searchgoods',array(

	'dataProvider'=>$goodsDataProvider,

)); ?>


<?php $this->widget('zii.widgets.grid.CGridView', array(

	'id'=>'shop-order-grid',

	'dataProvider'=>$goodsDataProvider,

	

	'columns'=>array(

		'goods_name',

		'shop_price',

		

	),

)); ?>

</div>



_searchgoods code


<div class="wide form">


<?php $form=$this->beginWidget('CActiveForm', array(

	'action'=>Yii::app()->createUrl($this->route),

	'method'=>'get',

)); ?>


	<div class="row">

		<?php echo $form->textField($model,'goods_name'); ?>

	</div>


	<div class="row buttons">

		<?php echo CHtml::submitButton('搜索'); ?>

	</div>


<?php $this->endWidget(); ?>


</div>

and the error msg is "CArrayDataProvider does not have a method named getValidators",can anyone help me?

In the search view there should not be a dataprovider.

Just comment out:




<?php $this->renderPartial('_searchgoods',array(

        'dataProvider'=>$goodsDataProvider,

)); ?>




If you have to write the search form, use a model (CFormModel) instead of a dataprovider.

thx,let me try

i drop the dataProvider in _searchgoods,and it works。Now i have another question:

the gii-generated code can do ajax search,but when i clicked the search button in my code upon,the page reflash,how can i search with ajax