![]() |
CS/INFO 530 S05 TR 11:40-12:55 Olin 245CS/INFO 530: Architecture of Large-Scale Information Systems |
|
|
Project 1d: Web ServicesThis is the final step of the Project. In this step, as promised, you will convert the Event Provider and Bank logic to be accessed as Web Services. Due: 7 May 2005. The Web ServicesEach service (Provider and Bank) will be implemented as a Stateless Session Bean exported as a Web Service using JAX-RPC. A discussion of this appears in the O'Reilly EJB book. I have put a copy of the Workbook deployment descriptors and WSDL files here; the entire Workbook is available here. The BankRecall the Bank Web Service needs methods to
where
Now, for paying or billing:
where
The use of the ProviderRecall a Provider has methods to
Ideally these should be implemented as methods that return a structured type containing all information about an event. But you may find it more convenient to implement the functionality as multiple getter methods, each returning a simple type. Since the events themselves are accessed infrequently the extra network traffic resulting from this should not be egregious. (Note your casino should contact a provider site only once to learn about an event, and only once to determine the outcome). Either approach is acceptable. If you take thegetter approach, the method signature to learn about an event is
The return value is the unique event id of the next event
whose announcement time is greater than after.
(If there is no such event, the return value is 0).
The getter 8; methods have simple signatures:
where the result encoding for getOutcome is
cid parameter in any of the above signatures.
A provider is willing to tell anybody about its events,
and does not keep track of who has asked.
Note: Because it is invonvenient to implement more than one provider instance on your local machine, I will not ask you to do this – a single provider will suffice. The ImplementationYou will need WSDL files, Endpoint and Service interfaces, stateless Bean classes implementing the service methods described above, and of course the appropriate deployment descriptors. Of course, the method implementations should be straightforward adaptations of the JDBC code you implemented for Part 1c. But getting working WSDL and descriptor files is not trivial. A reasonable approach is to examing the WSDL and descriptor files from the Workbook examples and make the necessary modifications. Another thing you might consider is the Java2WSDL tool, which automatically generates a WSDL document from a plain Java interface for the Service Endpoint. Note that JBoss doesn't actually require a JAX-RPC precompilation step to generate stubs – it's logically there, but in JBoss it's done dynamically (and automatically) at deployment. This is the hard part! Eventually you should get your site working again as before, but now with a Bank service and a (single) Event Provider service implemented as stateless session EJBs and accessed through Web Services interfaces. Project Description File
Create a short design document
What to Submit
Create a
|