Presentation

20
Framework for consuming SOAP/XML-RPC Web Services By Anjana Patil Group 5.3 1 Spring 2010, COP 6930 Class Project by Anjana Patil

description

Framework to use ksoap2 library to use web services.

Transcript of Presentation

Page 1: Presentation

Framework for consuming SOAP/XML-RPC Web Services

ByAnjana PatilGroup 5.3

1Spring 2010, COP 6930 Class Project by Anjana Patil

Page 2: Presentation

Project approach• Collect requirement specification

– Problem statement and objective

• Design core functionality– UML diagrams

• Implement core functionality– Coding Framework

• Test core functionality to see if it’s scalable and robust– Client applications coupled to framework

• Add layers to make it scalable and integrate with core functionality– Usage of framework to access Ebay web services, Amazon web

services and others.

Spring 2010, COP 6930 Class Project by Anjana Patil 2

Page 3: Presentation

Collect requirement specification

• Problem Statement: Web APIs hosted remotely, offer services over a network to varied clients such as mobile devices like Android. Although its good news that ksoap2 works seamlessly, programmers are required to write lengthy client applications to consume web services.

• Objectives: To consume SOAP/XML-RPC Web Services through an additional layer of abstraction which we shall call Framework. This Framework should facilitate writing client applications in couple of (or one) method call(s).

Project trying to accomplish: Framework to facilitate developers writing client applications.

3Spring 2010, COP 6930 Class Project by Anjana Patil

Page 4: Presentation

Design core functionality

• Use case diagram

Spring 2010, COP 6930 Class Project by Anjana Patil 4

Page 5: Presentation

Design core functionality conti..

Wrapping ksoap2 classes: Structural pattern is used to wrap a collection of ksoap2 classes into a single well-serving class (Framework). It provides simple interface to the clients allowing the complete access to the underlying subsystem.

5Spring 2010, COP 6930 Class Project by Anjana Patil

Page 6: Presentation

Design core functionality conti..Class Diagram

6Spring 2010, COP 6930 Class Project by Anjana Patil

Page 7: Presentation

Design core functionality conti.. Sequence Diagram

7Spring 2010, COP 6930 Class Project by Anjana Patil

Page 8: Presentation

Implement core functionality

• Components of Framework• Wrap a collection of ksoap2 classes into a single

well-serving class. A method implementation in this class must be able to make SOAP calls over HTTP using the ksoap2 collection of methods.

• XML configuration file serves as an input to the parser that initializes ksoap2 method parameters.

• The parameters such as URL, soap action, method name, are specified in an XML configuration file.

8Spring 2010, COP 6930 Class Project by Anjana Patil

Page 9: Presentation

Framework and it’s usage• Framework development

– Identify subsystems – ksoap2-android-assembly-2.3-jar-with-dependencies.jar is added to Java Build Path

– Design a class that can encapsulate the subsystems – The client uses (is coupled to) the Framework– Configuration xml file that feeds the Framework with

essential data to conduct web service • Client Application development

– Discover service semantics in WSDL - SOAP_ACTION, METHOD_NAME, NAMESPACE, URL from WSDL

– Client application to consume a web service

9Spring 2010, COP 6930 Class Project by Anjana Patil

Page 10: Presentation

Code Overview

10Spring 2010, COP 6930 Class Project by Anjana Patil

Page 11: Presentation

Code Overview conti..

Spring 2010, COP 6930 Class Project by Anjana Patil 11

Page 12: Presentation

Code Overview conti..

Spring 2010, COP 6930 Class Project by Anjana Patil 12

Page 13: Presentation

Testing the Framework

• Test core functionality to see if it’s scalable and robust– UI provides the user to choose from varied web

services providers.– Each web service has it’s layout and xml

configuration file.– Soap Response are delivered to the same UI.

13Spring 2010, COP 6930 Class Project by Anjana Patil

Page 14: Presentation

Screen Shots

Spring 2010, COP 6930 Class Project by Anjana Patil 14

Page 15: Presentation

Screen Shots conti..

Spring 2010, COP 6930 Class Project by Anjana Patil 15

Page 16: Presentation

Screen Shots – Stock Price

Spring 2010, COP 6930 Class Project by Anjana Patil 16

Page 17: Presentation

Screen Shots - Stock price

Spring 2010, COP 6930 Class Project by Anjana Patil 17

Page 18: Presentation

Screen Shots – Temp Conv.

Spring 2010, COP 6930 Class Project by Anjana Patil 18

Page 19: Presentation

Screen Shots EBay

Spring 2010, COP 6930 Class Project by Anjana Patil 19

Page 20: Presentation

What next?

• Framework can be built to consume Ecommerce web services such as Amazon Web Service (AWS) and EBay.– EBay services there is positive response, but the

message body is not complete.– Transfer the skill set gained during EBay to AWS.

20Spring 2010, COP 6930 Class Project by Anjana Patil