nusoap และ wsdl จาก microsoft web service


พอดีจะใช้ nusoap ติดต่อกับ WebService ของค่าย Microsoft
ปรากฏว่า SOAP request ที่ส่งไปยัง WebService ไม่ได้เป็นไปตามที่ควรจะเป็น คือ มันไม่ได้ส่งค่า parameter ไปด้วย งง...

ค้นไป หามา ปรากฏว่า ต้องสร้าง proxy class เสียก่อน
$proxy = $client->getProxy();

code จะเป็น
$client = new soapclient(http://www.XXX.com/testWS.asmx?WSDL',true);
$proxy = $client->getProxy(); // dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl directly call methods from wsdl
$result = $proxy->CheckCallRate(array(
strOrigNo=>661875XXXX,
strDestNo=>661953XXXX
)
);
คำสำคัญ (Tags): #web#service#php
หมายเลขบันทึก: 18777เขียนเมื่อ 14 มีนาคม 2006 13:59 น. ()แก้ไขเมื่อ 13 มิถุนายน 2012 10:13 น. ()สัญญาอนุญาต: จำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท