views:

174

answers:

4

Hi, I just recently started with object oriented programming, using java. Before I was programming in old visual basic which wasn't object oriented and in old php which wasn't object oriented ..

Now my question : Where can I learn about webservices and object oriented programming through concrete examples? (real life examples not hello world type)

I read all of the articles which I could find on wikipedia, google etc. Does anyone have 1st hand expirience from switching to object-oriented programming , of course I'm more interested in success stories :D

Thank you

A: 

The two are entirely different beasts. I would suggest looking at existing frameworks that help you implement web services with Java. For instance you can look at the Spring Framework Web Services project which makes it trivially easy to create web services if you already know Java and Spring. But you can look at their code to see how they did what they did.

You can also consider this article that explains using struts2 framework to develop web services.

Vincent Ramdhanie
I haven't used spring so far, I'm reading a book Maning: spring in action, it introduces so many new things it overloads my brain sometimes .. now I'm going trough some examples from there to try to understand it better ..
Gandalf StormCrow
Thanks, that Spring WS tutorial is excellent! I will be referring to it from now on.
Adriaan Koster
+3  A: 

You should treat learning about webservices (and what exactly do you mean by this?) and OO as two seperate subjects. Both are orthogonal to each other. Learning object orientation is independent of learning how to deliver services over the internet.

With regards to learning OO this might help.

With regards to web services - you'll need to provide a bit more colour - are you looking to develop web applications? If you are looking to develop a webapp there are a bewildering array of java web frameworks to chose from (wicket, tapestry, spring, struts, grails, aribaweb, the list just goes on and on). If you're just starting out with Java & OO you might overwhelm yourself by diving straight in to a webapp framework. I'd suggest learn some Java & OO first, then play around with the Java Servlets/JSP pages, which should give you the basics, and finally pick a framework like grails or tapestry to learn.

If you don't need a webapp and your just accessing/exposing another service over the web then you have most of what you need for network IO in the core J2SE stack, with the addition of possibly some XML/JSON parsing libraries. Java also has a full blown Web Services API - but it's may well be overkill for your needs. You could implement a simple http webservice by simply using Tomcat and Servlets and reading/writing the request response as xml/json.

Joel
I agree, just didn't want to ask 2 questions, this way it makes it more interesting for web services and OO people can suggest me something useful I hope..
Gandalf StormCrow
No I'm not trying to develope web application, I'm trying to develope application in java which will use web service to access another application to do something(for now write to database), later it may be something else, some kind of manager(webservice) which will handle different requests ..
Gandalf StormCrow
ah, that makes it much simpler.
Joel
Thank you Joel for your explanations, I had in my mind something like that reading/writing as json, lets wait for some more answers I'll vote your answer for now, I might accept it some time later after I get some more responses
Gandalf StormCrow
A: 

Apache CXF comes with a slew of examples of web services for a variety (SOAP, REST, etc) of protocols, transports, etc. The examples include inheritance issues that come up in service design (i.e., OO), not to mention CXF itself as a giant example of a Java system.

bmargulies
A: 

Go to Axis2 site, they have published very good example (Stock update ) . This Axis2 is a SOAP engine.

Thomman