TAILIEUCHUNG - Dive Into Python-Chapter 12. SOAP Web Services

Tham khảo tài liệu 'dive into python-chapter 12. soap web services', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 12. SOAP Web Services Chapter 11 focused on document-oriented web services over HTTP. The input parameter was the URL and the return value was an actual XML document which it was your responsibility to parse. This chapter will focus on SOAP web services which take a more structured approach. Rather than dealing with HTTP requests and XML documents directly SOAP allows you to simulate calling functions that return native data types. As you will see the illusion is almost perfect you can call a function through a SOAP library with the standard Python calling syntax and the function appears to return Python objects and values. But under the covers the SOAP library has actually performed a complex transaction involving multiple XML documents and a remote server. SOAP is a complex specification and it is somewhat misleading to say that SOAP is all about calling remote functions. Some people would pipe up to add that SOAP allows for one-way asynchronous message passing and document-oriented web services. And those people would be correct SOAP can be used that way and in many different ways. But this chapter will focus on so-called RPC-style SOAP -- calling a remote function and getting results back. . Diving In You use Google right It s a popular search engine. Have you ever wished you could programmatically access Google search results Now you can. Here is a program to search Google from Python. Example . from SOAPpy import WSDL you ll need to configure these two values see http apis WSDLFILE path to copy of APIKEY YOUR_GOOGLE_API_KEY server WSDLFILE def search q .Search Google and return list of title link description . results APIKEY q 0 10 False False utf-8 utf-8 return title utf-8 link utf-8 description utf-8 for r in ifname_ main_ import sys for r in search 1 5 print r title print r .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.