Note:
for all homeworks, turn in both hardcopy and electronic versions.
include the following for each problem:
- short summary of solution/approach
- printout showing server/client outputs.
- copy of code
Problem
1: Working with Python Client Server Tutorial (due: 16-Feb-07)
- Note: Python 2.x contains xmlrpclib, so you do not need to
install
- Download PythonWare archive from course website:
- progxmlrpc_examples.zip
[48k]
- the file contains several examples for each chapter of
the book: "Programming Web Services
with XML-RPC," by Laurent & Dumbill (ISBN: 0-596-00119-3).
- You will work with chapt6 example
- see lecture 7 notes.
- Copy *.txt file to *.py
- Fix bugs and get client & server examples working
- Run client from
- the python interpretor
- a client.py script
Problem 2:
Working with PyXML (Due:
22-Feb-07)
- Write a python script to create a SimpleMath XML
document
- Create a MathRequest and MathResponse XML documents
- struct should follow logical pattern:
<simpleMathRequest
xmlns:....>
<marysAdd ....>
.....
</marysAdd....>
...
</marysMathRequest>
- Must include elements for methods for the following 4 operations:
- Must support datatypes:
Problem 3: XML-RPC SimpleMath Web Service (Due:
22-Feb-07)
- You will write the SimpleMath Web Service and client
- the service will support the operations
- Must support datatypes:
- Args of function should reflect operator
- write a method in client to discover and list what
operations are available from server
- Both client and server should accept command line ags
- to connect to a specific server, eg. -h
http://acel.sdsu.edu:8888, or default to some other server
- to request an operation, eg. -o simpleMathAdd
arg1 arg2 ...
- return error messages appropriately
- run server and client from both interactive session and
from scripts
- Access server from telnet:
- hint: use features of the xmlrpc library calls to capture
the request and response streams generated when running your scripts;
- you will see the XML for the client request within the
server session
|