After 4 long days of attempting to use the nuSOAP PHP library to create a client, we stumbled upon this gem of a tutorial on creating Java EE web service clients. It is so darn easy. Our test web service client project, VeniceClient, has been uploaded to the SF repository. Creating a basic barebones client for a web service (or several web services) takes under 10 minutes.
Currently, the web service 'PublicArtByID' does nothing but take an int parameter, double it, and stick it in the id of an outgoing XML representation of a PublicArt object. The Client currently takes an integer parameter from the user (no checking or anything) and invokes the Servlet, which sends it to the service. When the Servlet gets a response, it prints out the result.
This functionality can be accessed here. That is running on our development server in Worcester.
Thursday, November 6, 2008
Wednesday, November 5, 2008
SOAP and REST
Over the last iteration, we have relieved numerous questions regarding which web service technology is more appropriate for use with the Venice Framework. We decided to take a day to research the technologies, and produced the document available here. In short, both technologies have their advantages and disadvantages. In terms of what we see as being the end product, we have decided that SOAP more appropriately fills our needs because it allows for more complex communication between the service and the client.
Tuesday, November 4, 2008
Web Service Work
Today, we were able to successfully get our Web Service working and tested in soapUI. The Web Service itself still had some very annoying namespace issues to work out, but after that was cleared up, our test of the service worked perfectly. Justin is now working on getting a simple php application to interact with our service remotely, since this is likely what we will be doing when we develop our proof of concept application (which will show off both our framework and web service layers).
More posts to come later.
More posts to come later.
Monday, November 3, 2008
Tests for PublicArt
We have just completed the various tests for PublicArt which completes all of our trackers. We have been thinking what the best way to write the tests are. The recommended way that DBUnit does is to have a sample dataset, run some tests that will change the dataset, then use an "expected" dataset and compare them with the methods DBUnit provides to compare two datasets. The problem with this approach is that for each test we would have to generate an XML file to compare the resulting dataset. This would end up generating literally hundreds if not more xml files that need to be uploaded into the SVN. This may make sense for a large test that represented a complete use case, but not small tests of functionality. The second problem is that it would not really test our model/framework. As per the Hibernate article here http://www.hibernate.org/109.html on Equals and Hashcode, we implemented the methods for eaach model object so that duplicate objects are not generated as well as providing a explicit way for our tests to compare objects. The general manner in which the tests are written are as follows:
- Generate a PublicArt Object
- Start a Transaction
- (optional) Save the PublicArt Object
- Commit the transaction
- Open a new Transaction
- Load a new PublicArt Object from the database
- Compare the two objects to each other
- End the Transaction
Calling SOAP Web Services
Today was the first day of Iteration 2. Since our meeting with Fabio isn't until tomorrow, we took it upon ourselves to work on the trackers that absolutely must be in with this iteration. One such tracker is here. this tracker deals with creating a skeleton client that will access our web service.
We found an article, located here, that gives a good tutorial on how to call SOAP-based web services using straight-up HTML and JavaScript. There is another library, used here, that we found to be of interest as well. We have begun creating a simple web application based on the examples provided in those article.
We found an article, located here, that gives a good tutorial on how to call SOAP-based web services using straight-up HTML and JavaScript. There is another library, used here, that we found to be of interest as well. We have begun creating a simple web application based on the examples provided in those article.
Work on second section of report
One of the things that we worked on today was organizing for the second section of the report, which we hope to write this week while we are also working on the framework. I've uploaded our two-page outline of the second section of the report to SourceForge here
Comments are welcome since we are going to be writing the document during the rest of the week. We have also been trying to get academic resources as reference through the WPI library site, although it is difficult to find good resources on there.
Comments are welcome since we are going to be writing the document during the rest of the week. We have also been trying to get academic resources as reference through the WPI library site, although it is difficult to find good resources on there.
Sunday, November 2, 2008
Wrapping up Iteration 1: Web-Service portion
This week we successfully completed 35 units of work for iteration 1. This closed 5 trackers.
On the Web Service Layer, we were able to create a skeleton Web Service built on the SOAP xml protocol. Netbeans has a generator for projects like this, but it took a lot of customizing to get it to fit our project. We had to write our own WSDL and XSD files. The WSDL describes the service itself, and the XSD describes the data returned by the service. The service successfully builds and deploys in GlassFish, and we are currently looking for a good web service tester to simplify the testing process.
On the Web Service Layer, we were able to create a skeleton Web Service built on the SOAP xml protocol. Netbeans has a generator for projects like this, but it took a lot of customizing to get it to fit our project. We had to write our own WSDL and XSD files. The WSDL describes the service itself, and the XSD describes the data returned by the service. The service successfully builds and deploys in GlassFish, and we are currently looking for a good web service tester to simplify the testing process.
Subscribe to:
Posts (Atom)