วิธีใช้ SOAP สำหรับ PHP

posted on 21 Aug 2009 12:07 by thakyoko  in Tutorial

SOAP
   ทำความเข้าใจ ที่นี่ : http://www.w3schools.com/SOAP/soap_intro.asp

ตรวจสอบ PHP ว่า SOAP ทำงานปกติ
 
 
phpinfo
() ; 
?>

ถ้าไม่มี ให้เพิ่ม extension ที่ php.ini
extension=php_soap.dll 

เริ่มเล่น
    SOAP สำหรับ PHP ต้องมี 3 ไฟล์เป็นส่วนประกอบหลัก
    1. server soap เพื่อเก็บ function ที่จะให้บริการ
    2. config เพื่อแจ้ง client ว่ามี service อะไรบ้างและประกอบด้วย parameter อะไร
    3. client soap เพื่อเรียกใช้

ตัวอย่าง 
1. server โค้ด soap_server.php

 

function plus($num1,$num2) {  // สร้าง function ที่ต้องการให้บริการ
  return $num1+$num2;
}

$server = new SoapServer("test.wsdl");   // กำหนดไฟล์ config
$server->addFunction("plus");   // กำหนด function ที่ให้บริการ
$server->handle();
?>

2. config โค้ด test.wsdl ยาว ขอย่อเฉพาะส่วนจำเป็น 

 
  
     
   
 

3. client โค้ด soap.php


  $client = new SoapClient("test.wsdl"); // เรียกใช้โดยอ่านที่ config test.wsdl
  var_dump($client->__getFunctions());     // แสดงรายการ function ทั้งหมด
  echo '1+1=';  
  print($client->plus(5,6));     // ส่งค่าให้ function เพื่อแสดงผลลัพธ์
?>
ผลลัพธ์

array0 => string 'float plus(float $num1, float $num2)' (length=36)

1+1=11

 

LiveAndroid v0.3

posted on 21 Aug 2009 08:02 by thakyoko  in OpenSource


 

 

Version 0.3

  released on 21 สิงหา 2552

โปรแกรมที่เพิ่มขึ้น
- androidVNC ไว้ Remote PC ผ่าน port 5900 (ควบคุมระยะไกล)
- Software Directory
เกมส์
- PilotLines เรียงบอล ได้ 5 แถวแล้วหาย Effect เยอะแต่ไม่สวย
- Craigs Race แข่งรถ มุมมองนกบิน
- Mario ภาคแรก ชื่อเป็นภาษาจีน(รูปเห็ดสีน้ำตาล แต่หน้าจอเล็ก)

ทดลองเล่น
 VMware Workstation 6.5.1 ไม่สามารถเชื่อมต่อ Internet ได้ทันที อาจต้อง config แต่ mouse smooth มาก
 VirtualBox 3.0.4 ใช้งาน Internet ได้ทันที

 

 

แหล่งที่มา : http://code.google.com/p/live-android/wiki/ReleaseNote_0_3

 

Features

  • OpenDNS added
  • Audio support
    • VirtualBox - Intel 8x0 AC97
    • VMware - Ensoniq AudioPCI 1371/1373
  • SD card support (512M)
  • Ethernet (DHCP)
  • Mouse wheel support
  • High-resolution support (800*600, 1024*768)
  • Apps added
    • Software Directory
    • AndroidVNC
    • PilotLines, Craigs Races, Super Mario
  • more net card driver added
    • Amd PCNET32 PCI
    • Broadcom 440x/47xx
    • CS89x0
    • Intel PRO/100+
    • NE2000/NE1000
    • Realtek RTL-8129/8130/8139

Open Source Business Intelligence - Jaspersoft

posted on 21 Aug 2009 07:47 by thakyoko  in OpenSource

Open Source Business Intelligence - Jaspersoft

  

รายละเอียด: Business Intelligence Tools - Overviews

edit @ 21 Aug 2009 07:53:13 by บิว