ขอคำแนะนำจากคนหน้าตาดี เกี่ยวกับ web service ( soap parser ) ด้วยครับ

เริ่มโดย zZzZ, 29 มิถุนายน 2009, 16:05:50

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

zZzZ

คือกำลังทำระบบอยู่ระบบหนึ่ง แล้วทางผู้ให้บริการ เขาให้บริการ Web services ด้วย protocal soap

เนื่องจากพวกผมไม่ค่อยถนัด soap ตอนนี้ก็เลยงมๆ มั่วๆเอา โดย เมื่อรับ soap message ก็ใช้ curl แกะ soap header ออก แล้วค่อยเอา xml data ไปใช้

มันก็ใช้ได้อยู่ แต่รุ้สึกว่ามันน่าจะไม่ใช่วิธีที่ดีนัก -_-

เลยอยากถามว่าตอนนี้เขาแกะเอาตัวแปรจาก soap มาใช้ด้วยวิธีอะไร ที่นิยมกันบ้างครับ
หรือมีคลาสอะไรที่ใช้ง่ายๆบ้างครับ สำหรับ PHP ขอรับ

ผมเชื่อว่าคนตอบกระทู้นี้ต้องหน้าตาดี แน่ๆ

ขอบคุณล่วงหน้าครับ
[direct=http://blackfridayhighlights.com/]PDD Wordpress-Amazon Demo[/direct]
[direct=http://www.facebook.com/pages/PandaDev/275145209179897?__req=hf] Support : PDD Wordpress-Amazon Plugin [/direct]
[direct=http://theworldtopbrands.com]Shopping by brands[/direct]
[direct=http://enduserreview.com]รีวิว[/direct]
[direct=http://findcouponcodesonline.com]Coupon[/direct]

ohmohm

มันมี class ของ soap ของมันเองนิ แต่ต้อง enable เอาคอมเมนต์ออก
extension=php_soap.dll

ไม่เคยเขียนเองเหมือนกัน แต่ลองไปดูที่นี่นะ
php.net/soap

Synchronize

เนื้อหาความรู้น่าสนใจ ใหม่ๆ
[direct=https://develop.un-no.com/w3/docs/clear-float-in-div]เทคนิคการแก้ไขปัญหาจากการ float ซ้อน float แล้ว clear[/direct]

[direct=https://service.un-no.com/unbbz]ทำเว็บได้ด้วยตัวเองฟรี ด้วยระบบเว็บสำเร็จรูป unbbz , เว็บธรรมดา , เว็บบอร์ด , เว็บขายของ ทำได้หมดเลย[/direct]

zZzZ

[direct=http://blackfridayhighlights.com/]PDD Wordpress-Amazon Demo[/direct]
[direct=http://www.facebook.com/pages/PandaDev/275145209179897?__req=hf] Support : PDD Wordpress-Amazon Plugin [/direct]
[direct=http://theworldtopbrands.com]Shopping by brands[/direct]
[direct=http://enduserreview.com]รีวิว[/direct]
[direct=http://findcouponcodesonline.com]Coupon[/direct]

Tee++;

ใช้ Soap PHP ดีที่สุดครับ NuSoap นี่ กิน Resourceไปหน่อย ลอง Benchmark เทียบกัน Performance Drop ลงเยอะพอสมควร ยิ่งถ้าเว็บคนเยอะๆ สุดท้ายต้องมางัดออก ลำบากเปล่า

ส่วนการใช้งาน Soap ต้องหัดอ่าน WSDL ก่อนครับ จะรู้ว่าเราต้องส่ง  มี methods อะไรบ้าง ต้องส่ง parameter อะไรเข้าไปประเภทไหน แล้วก็ จะบอกว่า หลังจาก เรียก method นี้ ต้องไปเรียกที่ไหน ต่อ ต้องส่งเป็น array กี่มิติ

ลอง Google: How to read WSDL + SOAP

ตัว WSDL จะบอกมาหมดเลยครับ ส่วน SOAP Service ที่ไม่มี WSDL แปลว่าไม่ได้ มาตรฐาน แนะนำว่าหลีกเลี่ยงดีที่สุด
[direct=http://laravel.in.th]Laravel in Thai[/direct]
[direct=http://jquerytips.com]jQueryTips by Tee++;[/direct]
[direct=https://www.facebook.com/jQueryTips]jQueryTips Page[/direct]
[direct=https://www.facebook.com/Laravel.in.th]Laravel in Thai Page[/direct]
[direct=https://twitter.com/Teepluss]Teepluss's Twitter[/direct]


zZzZ

+ จึ้ก งั้นเลิกสนใจ nusoap ละ

soap php คำตอบสุดท้าย

ลอง soap php ดูแล้ว
ยังรันไม่ค่อยได้ (ไม่ได้นั่นแหล่ะครับ) 55
งมต่อไป
[direct=http://blackfridayhighlights.com/]PDD Wordpress-Amazon Demo[/direct]
[direct=http://www.facebook.com/pages/PandaDev/275145209179897?__req=hf] Support : PDD Wordpress-Amazon Plugin [/direct]
[direct=http://theworldtopbrands.com]Shopping by brands[/direct]
[direct=http://enduserreview.com]รีวิว[/direct]
[direct=http://findcouponcodesonline.com]Coupon[/direct]

tdelphi

AIS ละสิท่า  ผมทำผ่านแล้วนะ  ฮ่า ฮ่า งมอยู่นานเหมือนกัน

install พวกนี้้หรือยังครับ
php-pear
php-pear-XML-Serializer
php-pear-XML-Util
php-pear-XML-Parser

ก็ใช้ได้เลย ไม่ต้องไปยุ่งกะ SOAP ก็ได้

โปรแกรมตัวอย่างของ AIS นะครับ รันผ่านเลย ลองดูสิ

zZzZ

อ่า  จดไว้ก่อน

ระบบท่องเที่ยวอ่ะครับ กะว่าจะทำแบบง่ายๆ

แต่ไม่ง่ายเลยแหะ  :P

ว่าแต่ ais มันมีให้ทำด้วยเหรอครับ เพิ่งรู้
เอา webservice มาใช้ทำอะไรหว่า
[direct=http://blackfridayhighlights.com/]PDD Wordpress-Amazon Demo[/direct]
[direct=http://www.facebook.com/pages/PandaDev/275145209179897?__req=hf] Support : PDD Wordpress-Amazon Plugin [/direct]
[direct=http://theworldtopbrands.com]Shopping by brands[/direct]
[direct=http://enduserreview.com]รีวิว[/direct]
[direct=http://findcouponcodesonline.com]Coupon[/direct]

tdelphi

อ่าว ..หน้าแตกเลย

เอาไว้ส่ง SMS นะครับ โปรโตคอลแบบใหม่ ชื่อว่า CDG

ถ้าังั้น ก็ต้องใช้ SOAP PHP ตามเดิมแล้วละ

thenetxx

-*- จริง ๆ แล้ว concept มันไม่มีอะไรนะ

เรียกไป ด้วย xml ที่ฝัง user/pass/ ชื่อ method ที่เรียก
มันก็รับกลับมาเป็น xml แล้วก็หาคลาสที่มัน แปลง xml เป็น array ก็ได้แล้วนี่นา
Develop site but can't develop life
ASIA