|  | 
	                
  
    | 
	 
        ถามเรื่องการส่ง input ไปยัง web service ที่เป็น wsdl complexType ค่ะ     |  
    |  |  
 
              
  
    | 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (PHP) 
 		//Add ComplexType
		$server->wsdl->addComplexType( 
			'DataList', 
			'complexType', 
			'struct', 
			'all', 
			'', 
			   array( 
					'CustomerID' => array('name' => 'CustomerID', 'type' => 'xsd:string'), 
					'Name'  => array('name' => 'Name', 'type'  => 'xsd:string'),
					'Email'  => array('name' => 'Email', 'type'  => 'xsd:string'),
					'CountryCode'  => array('name' => 'CountryCode', 'type'  => 'xsd:string'),
					'Budget'  => array('name' => 'Budget', 'type'  => 'xsd:float'),
					'Used'  => array('name' => 'Used', 'type'  => 'xsd:float')
		   ) 
		); 
		
		//Add ComplexType
		$server->wsdl->addComplexType( 
			'DataListResult', 
			'complexType', 
			'array', 
			'', 
			'SOAP-ENC:Array', 
			array(), 
			array( 
				array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:DataList[]') 
			), 
			'tns:DataList' 
		); 
 Go to : PHP - Web Service กับ MySQL Database รับส่งค่า Result ผ่านเว็บเซอร์วิส (NuSoap)
 
 ใช้ JSON ดีกว่าครับ
 
 Go to : PHP และ JSON กับ Web Service การรับส่งข้อมูลจาก MySQL ในรูปแบบของ JSON
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2012-11-08 17:29:41 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              |  ตอบความคิดเห็นที่ : 1 เขียนโดย : mr.win เมื่อวันที่ 2012-11-08 17:29:41 
 รายละเอียดของการตอบ ::
 
ขอบคุณสำหรับคำแนะนำนะคะ แต่อยากทราบเกี่ยวกับการ call web service โดยการส่ง request เป็นarray ค่ะ 
ลองใส่แบบนี้แล้วมันไม่ได้ค่ะ รบกวนแนะนำอีกครั้งนะคะ ขอบคุณล่วงหน้าค่ะ
 
$param = array('ds_in' => array('DT_P1' => array('POLICY'=>$POLICY,  'FLEET_SEQ' => $FLEET_SEQ,'RECPT_SEQ' => $RECPT_SEQ,'ID_NO' => $ID_NO,'LOSS_DATE' =>$LOSS_DATE,'USER_ID'   => 'BKI','USER_NAME'   => 'WEBBKI')),'sFunc_type' => 'Info1');
 
$result = $client->call('callWs_PA_Health', array('parameters' => $param), '', '', false, true);
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2012-11-09 09:54:03 | By :
                            auu |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |  |