I am very happy to have finished this assignment, finally. It took me a long time, and was pretty hard, but I feel I learned a lot and will benefit from having done it. I wanted to try .Net on this assignment, mostly because I have heard a lot about it, but have never tried it. I figured it was as good a time as any to learn it. In retrospect, I don’t know if that was true, but I’m still glad I did it.
The first thing I did was spend a few days learning about web services. I used the standard recourses, Google and wikipedia, and also asked some friends of mine to explain it me as they understand it, in their own words. Then I found examples online and studied them. I wanted to understand how they worked and try coding a few on my own, based on the examples. I did a few, and got as far as getting them to run currently on my local machine using ASP Deployment Server. I was feeling good at this point, because I had successfully created and tested a math web service, and a hello world service.
Now I wanted to try to consume a web service. This proved to much more difficult. Based on the definitions from WSDLs I created classes and the web methods, but couldn’t get the desired result. I would get errors ranging from connection to gateway, even when I hard coded the inputs. I tried many different weather web services. Some that used a city name as an input, others, the zip code or that latitude and longitude. I couldn’t get any of them to work. I know I must have been doing something wrong, but there wasn’t very much code for me to mess up on, and sometimes the code I was using was almost directly from a tutorial for using that specific web service in asp.net. So I hit a wall.
At this point, I considered trying java because I thought I would understand better what is going on if I had to create the wsdl or soap, or something. But then I didn’t want to give up on .net. So I kept on trucking. I finally found a web service that worked for me. All the other web services probably worked fine, but I couldn’t get them to work form some reason that I’d still like to find out. The service I found was a weather forecaster, so a little bit different, but I think the implementation and the idea are the same.
So after I got my service to run, after receiving a zip code, I worked on outputting the information as readable xml. Now I had to publish it. This part was easy in visual studio. I just had to click a button to publish it. Then I had to read a lot to find out which files to load on a publicly accessible server, and how to load them. My brother in law let me post my files on his server.
I like web services because it is a way to run methods, across platforms, over the internet. What makes it possible is that there is a standard, and they are documented. I noticed there were many weather web serviced that required a log in to use, which allows the developer, or business, to control who can use it, and even charge money. It seems easy enough to create and consume web services, and I think it’s a technology that will gain popularity. It is a cool idea. A server is lending its resources to another.
This assignment taught me about SOA. I see now, the benefits of loosely coupled modules and independent services. They can run independently of platform because of the standards. The application that calls the web service, or web method, doesn’t care what language the service is written in, or need to know. It receives the data it wants, and can then manipulate it as it needs for its purposes. It is a very smart was of sharing power and responsibility
I think it is a good idea, because it is easy to implement and share resources over a network. Web services make it easy to give access to a method, and can be a good way for a company or developer to get his name out there.
My weather web service can be found here http://lifferth.com/gabe/Service.asmx. The documentation for it is located here http://lifferth.com/gabe/Service.asmx?WSDL.
After it is all said and done. I enjoyed the assignment. I learned a lot about SOA, and how it is used. It also made me think about how it can be used in different situations.
Tuesday, February 20, 2007
Subscribe to:
Posts (Atom)