วันพฤหัสบดีที่ 3 มกราคม พ.ศ. 2562

ทดสอบ : Select Topic Web Service, midterm

นาย ผดุงศักดิ์ รักชู 58-010126-1014-8


ข้อ 1 : Student Service


เขียน service ของ server เพื่อรอรับ request จาก client ในที่นี้คือ sendProfile ซึ่งจะส่งข้อมูลกลับไปเมื่อมีการเรียกใช้ service นี้


จากนั้นมาเขียนคำสั่งฝั่ง client เพื่อเรียกใช้งาน service sendProfile


ผลลัพธ์



ข้อที่ 2: Transport Service


service : Add Destination Info

server code: ใส่ข้อมูล 4 อย่างลงใน service ได้แก่ date, name, address, weight เพื่อบันทึกค่าลงฐานข้อมูล


สร้างไฟล์ csv ขึ้นมา(transport.csv)

เขียน code ฝั่ง client เพื่อเรียกใช้งาน addDestinationInfo service
ผลลัพธ์(transport.csv)

service :  Destination Sent

server code: เมื่อใส่ name และหมายเลข order ของคนที่ต้องการ จะทำการอัพเดท status = sent 

เขียน code ฝั่ง client เพื่อเรียกใช้งาน destinationSent service
หลังจากรันจะพบว่าข้อมูลของลูกค้าที่เปลี่ยนเป็น sent มีเพียงของคุณ Miahn แต่ของคุณ Alexander ยังคงเป็น sending เนื่องจากเลข order ที่กรอกไม่ตรงกับหมายเลข order ของคุณ Alexander 

service :  Transport Status

server code: ส่งข้อมูลของลูกค่าที่มีชื่อตรงกับที่รับมา
เขียน code ฝั่ง client เพื่อเรียกใช้งาน transportStatus service
ผลลัพธ์

ไม่มีความคิดเห็น:

แสดงความคิดเห็น