23
My First Web Services Example - XFire, Spring, SoapUI Albert Guo [email protected]

My First Web Services Example - XFire, Spring, SoapUI

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: My First Web Services Example - XFire, Spring, SoapUI

My First Web Services Example - XFire, Spring, SoapUIAlbert Guo

[email protected]

Page 2: My First Web Services Example - XFire, Spring, SoapUI

Agenda

• Setup Web Services Environment

• Setup Web Services IDE Environment

• Install and Validation Process

• Download Extra Jar Files

• Buzzwords

• Web Services Architecture

• Scenario

• Deployment descriptors of the Web application

• Testing Procedure

2

Page 3: My First Web Services Example - XFire, Spring, SoapUI

Setup Web Services Environment

http://java.sun.com/webservices/containers/tomcat_for_JWSDP_1_5.htmlhttp://java.sun.com/webservices/containers/tomcat_for_JWSDP_1_5.html

http://java.sun.com/webservices/downloads/1.5/http://java.sun.com/webservices/downloads/1.5/

http://java.sun.com/j2se/1.5.0/http://java.sun.com/j2se/1.5.0/

3

Page 4: My First Web Services Example - XFire, Spring, SoapUI

Setup Web Services IDE Environment

http://www.eclipse.org/downloads/http://www.eclipse.org/downloads/

http://www.myeclipseide.com/module-htmlpages-display-pid-4.htmlhttp://www.myeclipseide.com/module-htmlpages-display-pid-4.html

4

http://www.soapui.org/features.htmlhttp://www.soapui.org/features.html

Page 5: My First Web Services Example - XFire, Spring, SoapUI

Install and Validation Process

5

Page 6: My First Web Services Example - XFire, Spring, SoapUI

Install and Validation Process – cont.

6

Page 7: My First Web Services Example - XFire, Spring, SoapUI

Download Extra Jar Files

http://xfire.codehaus.org/http://xfire.codehaus.org/ http://springframework.org/http://springframework.org/

7

Page 8: My First Web Services Example - XFire, Spring, SoapUI

Buzzwords

8

Page 9: My First Web Services Example - XFire, Spring, SoapUI

Web Services Architecture

9

Page 10: My First Web Services Example - XFire, Spring, SoapUI

Scenario – Use Case Diagram

10

Page 11: My First Web Services Example - XFire, Spring, SoapUI

Scenario – Sequence Diagram

11

Page 12: My First Web Services Example - XFire, Spring, SoapUI

Scenario – Class Diagram

12

Page 13: My First Web Services Example - XFire, Spring, SoapUI

Scenario

13

Provide WeatherServices RequestProvide WeatherServices Request

Return Weather InformationReturn Weather Information

Page 14: My First Web Services Example - XFire, Spring, SoapUI

Deployment descriptors of the Web application – web.xml

14

Page 15: My First Web Services Example - XFire, Spring, SoapUI

Deployment descriptors of the Web application – server.xml

15

Page 16: My First Web Services Example - XFire, Spring, SoapUI

Testing Procedure

16

http://localhost:8080/XfireDemo/services/Weather?wsdlhttp://localhost:8080/XfireDemo/services/Weather?wsdl

Page 17: My First Web Services Example - XFire, Spring, SoapUI

Check Web Services is Working

17

http://localhost:8080/XfireDemo/services/Weather?wsdlhttp://localhost:8080/XfireDemo/services/Weather?wsdl

WSDL DeclarationWSDL Declaration

provides data type definitions used to describe the messages exchangedprovides data type definitions used to describe the messages exchanged

Page 18: My First Web Services Example - XFire, Spring, SoapUI

Check Web Services is Working – cont.

18

a set of abstract operations. Each operation refers to an input message and output messages

a set of abstract operations. Each operation refers to an input message and output messages

represents an abstract definition of the data being transmittedrepresents an abstract definition of the data being transmitted

specifies concrete protocol and data format Specifications for the operations and messages defined by a particular portType

specifies concrete protocol and data format Specifications for the operations and messages defined by a particular portType

used to aggregate a set of related portsused to aggregate a set of related ports

Page 19: My First Web Services Example - XFire, Spring, SoapUI

Apply soapUI to do Test – Create new WSDL Project

19

Page 20: My First Web Services Example - XFire, Spring, SoapUI

Apply soapUI to do Test – Create new WSDL Project (cont.)

20

Page 21: My First Web Services Example - XFire, Spring, SoapUI

Apply soapUI to do Test – Search Taipei’s Weather Status

21

RequestRequest ResultResult

Page 22: My First Web Services Example - XFire, Spring, SoapUI

Apply soapUI to do Test – Search Toronto’s Weather Status

22

RequestRequest ResultResult

Page 23: My First Web Services Example - XFire, Spring, SoapUI

Reference

• http://www.javaworld.com/javaworld/jw-05-2006/jw-0501-xfire.html?page=1

23