Web Services

1.- Web services as a Client:

video 1:





video 2: https://www.youtube.com/watch?v=C53G6R5EVys





 
If you want to see an introduction to RESTful web services, check this video.

Read from the "Bible" Book (pages 645 - 663 ) and answers the following questions:

  1. Which other technologies allow several systems to interconnect? List them and also their disadvantages
  2. What is SOA? Which are its advantages?
  3. Explain the philosophy of a web service
  4. Can we use technologies different from J2EE? Give examples (you can use the web if you don't find it at the Book)
  5. Does it has sense to use web services inside an intranet?
  6. If you are a manager that has to run a project with these technologies. Would you be worried about its costs?
  7. Give the name of some vendors that support these standards
    IBM, Microsoft, BEA Systems, Oracle, etc. More than 600 members.
  8. How can new Web services be discovered? Is there a technology that help us to do it?
  9. Imagine an application that could use Web Services, different from the ones mentioned at the book.
  10. Prepare a question/answer from the book to ask your colleagues
Solution

Basic steps to create Web Services with NetBeans

Video 3: https://www.youtube.com/watch?v=6hqDMS-oJ9k




Video 4: https://www.youtube.com/watch?v=KFlDdb65w3U



Program to browse web servcies:
soap ui: program to browse web services:
http://www.soapui.org/   (you have a free version)

Now, try to do the same as in the videos with any of the following web services found in the following webs:

Sample of webs to find web services:
http://webservicex.net/New/  
used in class for the country of an IP: http://www.webservicex.net/geoipservice.asmx?WSDL

weather forecast:

 
Others:
http://live.capescience.com/wsdl/GlobalWeather.wsdl

http://www.google.com/apis/

Webs recommmended by Marc:
http://www.programmableweb.com/apitag/shipping?apicat=Shipping&protocol=SOAP&format=XML  LA HOSTIA!
http://www.webservicex.net/


Exercice:
Giging the WSDL

Create a program to check the weather in "Mahon", "Spain".

Check here the solution and information about the whole process


The teacher has installed a Web Server Server with Neatbeans at the IP that follows. Create a Java program or better a Form+Servlet program to query two numbers and calculate their addition using the Web Service Calculator.

Try to access the teacher's web service server at:
http://192.168.2.58:8080/CalculatorApp/CalculatorWSService?wsdl 

Once you have finished, install in your own computer the Web Service Server and try it in local.
Calculator server code for Netbeans


Solution of Form + Servlet to access as a client:
Calculator client code for Netbeans


2.- Web services as a Server:

Some concepts to review:
  • Web servers: Example Apache or IIS (Microsoft's Internet Information Server). You can install them a module to have a php server, for example.
  • Application Server. Two kinds:
    • not complete Application Server. Example: Tomcat. You can use them for Servlets/JSPs.
    • complete Application Server. Example: Glassfish, JBoss, WebSphere, etc.They are full J2EE compliant and, besides to use them for Servlets/JSPs, you can use them to expose WebServices, EJBs, etc. 
      Review what is a Java Annotation
Watch the following video (7 from this series) to see how to create a simple Web Service Server in a simple Java application. If you want to know how to install the application server GlassFish, watch the videos 5 and 6. Another option is to install and use Netbeans (IDE) that comes with GlassFish integrated in it.
Video 7: https://www.youtube.com/watch?v=u5cQkVgq6jE



Video 8: https://www.youtube.com/watch?v=HLzM92ZnisY





Comments