Top Banner
XML-based web services with the java 2 platform, Enterprise edition (j2E by anis karimpour-fard
34

XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Mar 30, 2015

Download

Documents

Alina Scroggin
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

XML-based web services

with the java 2 platform, Enterprise edition (j2EE)

by anis karimpour-fard

Page 2: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Overview

Web servicessmart web servicesjbossReferences

Page 3: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Web services

What are web servicesMajor challenges in building web

servicesWeb service development

technologyWeb services standardImplementing web servicesDevelopment tipsConclusion

Page 4: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

The business wanted to do transaction with the customer , so

application web was created.

The e-business wanted to integrate their processes with other

e-business , so the web service

was created.

Page 5: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service.

Page 6: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Web service provide an application integration technology that can be successfully used over the internet.

Page 7: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Build client-tier connectivity

to allow applets, applications, business partners,

and web browsers connect and make use of a web service.

implement the web service Including any workflow logic, data transformation logic,

business logic, and data access logic. This is the functionality behind the web service that performs work on behalf of the clients.

connect to back-end system which may include one or more databases, existing

enterprise information systems, business partners that publish their own web services, and a shared context repository for user information shared across many

systems.

Major challenges in building web services

Page 8: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Major subsystems and protocols in a J2EE-based with web services environment

Page 9: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Type of client Examples How this client connects

Business partners

Distributors, resellers, large

customers

XML-based web services technologies

(SOAP, UDDI, WSDL, ebXML)

Thin clients Web browsers, PDA, Wireless

devices

Lightweight protocol (HTTP)

Thick clients Applets, applications ,

existing systems

Heavyweight protocol (IIOP)

 

Page 10: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

web services development model with J2EE relies on the following four standard technologies:

XML technologies. The use of XML standards is very important in

the overall scheme of the web services universe.

Java technologies.

A critical component of this is the Java API for XML Parsing (JAXP) . The future will bring a few new JAX* APIs, mainly for dealing with the XML data formats and services. These future JAX* API’s will allow for greater ease and speed in development.

Page 11: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

TCP/IP The universal networking protocol.

Everything from pagers to mobile phones to laptops to mainframes can communicate through TCP/IP.

HTML

The universal user interface. You can use HTML tags to render data on just about any device you can think of.

What do these technologies have in common? They're all open, cross-platform standards. It's openness that makes the Web possible; that openness is also the foundation for Web services.

Page 12: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

BUSINESS PARTNER CONNECTIVITYBusiness partner can use different programming languages,

middleware, and hardware.

When request comes to j2ee web service deployment the following order of operations takes place:1) The XML document is received by a Java servlet

2) The servlet processes the incoming XML-based

request.

3) The servlet then calls one or more Enterprise

JavaBeans(EJB) components to perform

business data processing.

4) The EJB components perform their processing,

possibly calling external systems.

5) the EJB components returns data to the servlet.

6) the servlet then marshals this return value into

an XML document.

7) The servlet return XML to the client on a response

Page 13: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Processing a business partner request

Page 14: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Web Service Standard

UDDI (Universal Description, Discovery, and Integration)

Before a partner can make a web service call to a business, it must first locate a business with the service needed, discover the call interface and semantics, and write or configure software on their end to collaborate with the service. Thus we need a vehicle to publish our web service.

In another word

A business registry standard for indexing web services,

so that their descriptions can be located by development

tools and applications.

Page 15: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.
Page 16: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

JAXR

To support the functionality of UDDI on the Java

platform, the Java APIs for XML Registries (JAXR) is a

API specification that developers can use to access registries.

JAXP enables enterprise developers to add essential

XML functionality to their Java applications, in areas

such as e-commerce, enterprise application integration,

and dynamic web publishing,

Page 17: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

WSDL

For a business to discover a service it wants to use, it

needs to understand the call syntax and semantics prior

to actually making a call. The WSDL (Web Services

Description Language) specification is an XML document

which describes the interface, semantics, and

administrative of a call to the web service.

Page 18: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.
Page 19: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Implementing web service

1) service provider creates a web service

2) the service provider uses WSDL to describe the service to (UDDI registry).

3) the service provider registers the service (in a UDDI registry and /or ebXML registry or repository).

Page 20: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

4) another service or user locates and requests the registered service by querying UDDI and/or ebXML registry(ies).

5) the requesting service or user writes an application to bind the registered service using SOAP(in the case of UDDI) and/or ebxml.

6) data and messages are exchanged as XML over HTTP.

Page 21: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Development Tips :1: Request a service

Web service has the same issues as distributed services

Requested service is consider heavy weight operations

Local operation is much cheaper than distributed operation

2: Control issue With Web service you are tapping into

software modules that are not under your control. Plan for the time when it does not work.( The system worked in the last few month and now is updated to new version.)

Page 22: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

3: RPC-style architectures Do not expect instance response because web service

support Asynchronous response RPC-style architecture Synchronous response RPC-style architecture Messaging

you won’t be able to count on the reliability of

many services you call because the they aren’t

under your control. Provide backup plans for

important process

Page 23: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Conclusion1) Reduce cost

2) Improve quality

3) Increase function

4) Web service are here to stay

5) plenty of challenge and creative opportunities as only a few development tools are available

at this time.

6) Few standard available

7) companies like IBM, SUN and Microsoft believes the next revolution in computer science will be web services.

Page 24: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

Smart web serviceprovide high level of customization and

personalization context awareness, multinet capabilities, quality

of service, fully open interface

software device can sense

1) who you are

2) where you are

3) what kind of device you are using

4) what kind of network

5) your preference

(the context can will be share different devices and different model interaction at real time.)

Page 25: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.
Page 26: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

jboss

JBoss is an application server written in Java that can host business components developed in Java.

Page 27: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.
Page 28: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

What are the benefits of jboss?

dynamic "hot" deploy dynamic proxies JMX ( fully modular design that

enables you to replace virtually every component of the server.)

Page 29: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

JBoss supports: 1. stateless session beans 2. stateful session beans 3. BMP entity beans

4. CMP entity beans 1,2 and 3 are standard features you can reasonably expect an application server to provide. It's the quality of a CMP implementation and the developer tools around it that differentiate application servers. JBoss supplies JAWS (Just Another Web Storage) to allow developers map EJBs to

relational data storage.

Page 30: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

JBoss does not implement the servlet specification (or the JSP specification). Instead, they have integrated with two other open-source projects - Jakarta Tomcat and Jetty to get this. You can run JBoss with either Jetty or Tomcat integrated within the same VM (which means a huge performance boost since all calls are now local to the VM and there is no network io) or in separate VMs

Page 31: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

JBoss Pros 1. The install process is very easy and more importantly self-contained. JBoss does not use the registry (on Windows) or any other platform-specific mechanism for configuration. All information is stored in text files. 2. JBoss has built-in SOAP support (via the ZOAP integration).3. JBoss has been JMX enabled right from the start and was built with management in mind from the ground up.

4.JBoss is very resource friendly. It takes only a couple of seconds to start up (and EJBs deploy quickly too) and will comfortably run on a machine with 128 MB RAM. This is great for development

Page 32: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

JBoss Cons

1. There is no support for clustering .There are two methods for scaling application

servers: horizontal scaling and vertical scaling. JBoss supports vertical scaling of hardware only.

• Horizontal scaling involves deploying multiple application server instances.

• Vertical scaling means deploying a (single) larger, more powerful machine that can support more users, with a higher throughput or service time, with almost linear scaling.

Page 33: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

• 2. Parts of the documentation are missing and / or out of date. This especially impacts new / weak developers since they only have the documentation to go on and are not in a position to start trawling through source code.

• 3.Compared to BEA, the JBoss developer community is small.

Page 34: XML-based web services with the java 2 platform, Enterprise edition (j2EE) by anis karimpour-fard.

References

Sun micro system

http://www.sun.com

J2 Platform enterprise edition(J2EE)

http://www.j2ee.com

JBOSS organization

http://www.jboss.org